---
title: REST
description: Learn about the REST trigger
documentId: ipaas-legacy-rest-trigger
locale: en-US
---

With the **REST** trigger, you can execute the integration flow through an external call using one of the HTTP methods.

Below, learn how to add it to the canvas and configure its form.

## Add the REST trigger to the canvas

<Steps>
  <Step>
  Click the ![cursor clicking icon](https://creative-ball-51b3fc85c0.media.strapiapp.com/triggers_Icon_b3edc4ff83.png) icon in the left editing menu;
  </Step>
  <Step>
  Select the **REST** trigger.

  The ![](https://creative-ball-51b3fc85c0.media.strapiapp.com/flow_Start_Icon_5e71220cc1.png) **Start** is replaced by the trigger as soon as you add it to the canvas.
  </Step>
  <Step>
  Configure its form.
  </Step>
</Steps>

<Callout type="tip" title="TIP">
To remove the **REST** trigger from the canvas, select it and click the ![trash icon](https://creative-ball-51b3fc85c0.media.strapiapp.com/remove_Icon_486c52eeeb.png) button.
Deleting the trigger will disable the **Test Mode** function.
</Callout>

## Configuring the form

<Steps>
  <Step>
  Select the trigger on the canvas.
  </Step>
  <Step>
  Click the edit icon ![pencil icon](https://creative-ball-51b3fc85c0.media.strapiapp.com/edit_icon_34464736ca.png).
  </Step>
  <Step>
  Fill in the following form fields:
  
  * **Name**: enter the trigger name. The name cannot be used more than once in the same integration flow. By default, the field displays the name **REST Trigger**.
  * **Method**: select the HTTP method to be used.
  * **Communication Type**: define whether the call will be synchronous (SYNC) or asynchronous (ASYNC). By default, the SYNC option will be selected.

  <Callout type="note" title="NOTE">
  For an asynchronous call, the system will return a 202 response.
  </Callout>

  * **Header**/**Key**: enter the *Header* parameters. Alphanumeric field that allows special characters (`_`, `.` and `-`), with a limit of 60 characters.
  * **Query**/**Key**: enter the *Query* parameters. Alphanumeric field that allows special characters (`_`, `.` and `-`), with a limit of 60 characters.

  <Callout type="note" title="NOTE">
  Registering the same *key* more than once is not allowed.
  </Callout>
  </Step>
  <Step>
  If you don't need to define the [payload](#payload-definition), click **SAVE**.
  </Step>
</Steps>

<Callout type="tip" title="TIP">
To delete a *key* in any of the components, click the ![trash icon](https://creative-ball-51b3fc85c0.media.strapiapp.com/remove_Icon_486c52eeeb.png) button to the right of the *key*.
To add a new *key*, click the **+** icon.
</Callout>

![restTriggerScreen.png](https://creative-ball-51b3fc85c0.media.strapiapp.com/rest_Trigger_Screen_742095d55c.png)

### Payload definition

Mapping the structure of the REST trigger's input *payload* will facilitate the use of mapped fields in other components of the integration flow.
You can edit the *payload* definitions at any stage of creating the integration flow.

<Callout type="note" title="NOTE">
If you have already created a JSON *schema*, when you click **PAYLOAD DEFINITION**, you will see the data already registered.
</Callout>

To configure the input *payload* structure, follow the steps below:

<Steps>
  <Step>
  Click **PAYLOAD DEFINITION** in the upper right corner of the **REST** trigger screen.
  </Step>
  <Step>
  In the window that opens, you will find two columns:

  * **JSON SCHEMA**: In this column, enter the JSON *schema* that will define the structure transmitted in the request input. There is no character limit. To validate the data format, click the refresh icon on the right ![refresh icon](https://creative-ball-51b3fc85c0.media.strapiapp.com/check_Icon_3124505bc9.png).

  * **JSON STRUCTURE**: This column is read-only. It is used for viewing and validating the data format from the **JSON SCHEMA** column.
  </Step>
  <Step>
  To delete an attribute from the *payload* definition, delete the corresponding row in the JSON *schema* column.
  </Step>
  <Step>
  To confirm the data, click **CONFIRM**.

  <Callout type="note" title="NOTE">
  If the JSON *schema* is not in the correct format, you will see a message that the JSON *schema* is incorrect.
  </Callout>
  </Step>
  <Step>
  Back on the **REST** trigger configuration screen, click **SAVE** to save the records.
  </Step>
</Steps>

<Callout type="tip" title="TIP">
For more information about JSON *schema* specifications and how to create a validation file according to your needs, visit [JSON SCHEMA](http://json-schema.org).
</Callout>

![configuring payload](https://creative-ball-51b3fc85c0.media.strapiapp.com/payload_rest_trigger_213eae7b08.gif)
