> For the complete documentation index, see [llms.txt](https://ieg4.gitbook.io/edesigner-new/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ieg4.gitbook.io/edesigner-new/no-code-integrations/api-functions.md).

# API Functions

Configure forms to use external APIs for validation and data-driven field population.

### **Overview**

eDesigner now includes powerful integration capabilities that allow forms to connect to external systems using custom APIs.

These integrations enable you to:

* Validate user input against external services
* Dynamically populate form fields

Two new options are available in the Design menu:

* API Functions
* Custom Validators

{% hint style="info" %}
**Contact IEG4 Support to upgrade to a supported version and enable API Functions**
{% endhint %}

### API Functions

**Purpose**

API Functions define the external APIs that your forms can call

<figure><img src="https://2446085776-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0Xv5e5CMqZNlA8r5Exkm%2Fuploads%2FIQJ4Jyxj60hYav6TvF7b%2FAPI-Functions-menu.png?alt=media&amp;token=5298f47c-01af-495c-8890-079c4608667c" alt=""><figcaption></figcaption></figure>

**How to Configure**

1. Open the Design menu
2. Select API Functions
3. Add a new API Function
4. Enter the following details:

* Name – A meaningful name for the API
* Description – A description of the API
* Endpoint URL – The API endpoint to call
* API Key Header Name *(optional)*
* API Key *(optional)*

API key settings are only required if your API uses authentication.

You can create multiple API Functions and reuse them across different forms.

<figure><img src="https://2446085776-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0Xv5e5CMqZNlA8r5Exkm%2Fuploads%2Fo2SRcYmHGbkcJWHBHvlN%2FAPI-Functions.png?alt=media&amp;token=0e9996f7-45db-402f-b64b-fa5c1f5b9585" alt=""><figcaption></figcaption></figure>

#### API Request Format

When a form calls an API Function, it sends the current form data in a structured JSON format.

**Structure**

JSON

body → pages\[] → controls\[]

&#x20;

Each control represents a field:

JSON

{

"id": "\<field identifier>",

"value": "\<string value>"

}

&#x20;

**Key Characteristics**

* All values are sent as strings
* Data is grouped by page
* Each field is identified by its ID, not its label
* Some fields may contain JSON encoded as a string, which must be parsed before use

**Note**

API Functions use data from the form XML, which is generated as users complete the form.

Form data is only available after a page has been completed.

This means:

* API calls will only include data from previously completed pages
* Data entered on the current page is not available until the user clicks Next

When designing integrations (such as validation or data lookups), ensure that the API Function is used on a page that comes **after** all required input fields.
