> For the complete documentation index, see [llms.txt](https://docs.langstack.com/welcome/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.langstack.com/welcome/get-started/learn-langstack/validation-pipeline/exercise-customer-information/step-2-create-the-api-gateway.md).

# Step 2: Create the API gateway

To enable the validation to be executed, an API gateway needs to be created and defined. Create the API gateway for the validation and label it the same as “UserName\_Acc\_customers\_validation”.

* To go to the API gateway template, click “API gateway” under the “APIs and integration” menu on the left side panel.

<figure><img src="https://media.langstack.com/documentation/media/images/code/training_manual/chapter_11/ch11apigtwymenu.png" alt=""><figcaption></figcaption></figure>

* To create a new API gateway, click the \[+ API gateway] button.

<figure><img src="https://media.langstack.com/documentation/media/images/code/training_manual/chapter_11/ch11addapigtwy.png" alt=""><figcaption></figcaption></figure>

* To define the API gateway, add the following details:
  1. Enter the API gateway as “UserName\_Acc\_customers\_validation”.
  2. Optionally add the description for this API gateway.
  3. By default, the Details tab is selected.\
     From the drop-down, select API as “UserName\_Acc\_AddCustomer”. The user adds customer details in the API, and the details are added into the entity “UserName\_Acc\_customers” after validation.

<figure><img src="https://media.langstack.com/documentation/media/images/code/training_manual/chapter_11/ch11apigtwynameaddcust.png" alt=""><figcaption></figcaption></figure>

* To save the API gateway, click the \[Save] button.\
  The Delivery URL section displays the selected API URL.

<figure><img src="https://media.langstack.com/documentation/media/images/code/training_manual/chapter_11/ch11apigtwyurl.png" alt=""><figcaption></figcaption></figure>

* Enable the API gateway by clicking the “Enabled” toggle button.

<figure><img src="https://media.langstack.com/documentation/media/images/code/training_manual/chapter_11/ch11enableapigtwy.png" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Note: If this button is disabled, the validation will not have an API gateway to be executed through.
{% endhint %}

* To see the Target Entity and Validation pipelines defined for it, go to the Entities tab. Select Validation as “UserName\_Acc\_customers\_validation”.

<figure><img src="https://media.langstack.com/documentation/media/images/code/training_manual/chapter_11/ch11apigtwyentvalid.png" alt=""><figcaption></figcaption></figure>

* To save the API gateway settings, click the \[Save] button. This API gateway processes the data in the API with the Validation pipeline defined.

<figure><img src="https://media.langstack.com/documentation/media/images/code/training_manual/chapter_11/ch11saveapigtwy.png" alt=""><figcaption></figcaption></figure>
