# API Recipes - New API Request Trigger

This trigger creates a new REST API endpoint and runs when a new API request is received. Once configured, the endpoint can be called in other recipes or third-party systems as an API Platform REST endpoint.


# Requirements

To use this trigger, you need:

  • Access to the API Platform feature. If you don't see this option in the Tools menu, reach out to your Customer Success Manager.

# Input

The New API request trigger has two types of input fields:

  • Request - Fields that define how requests sent to the endpoint are structured.
  • Response - Fields that define the structure of responses the endpoint sends to requests.

# Input Request Fields

The fields in the Request section define how requests sent to the endpoint are structured.

Field Description
Content type Defines the data format of the request. Defaults to JSON if left blank.
Request header Defines the parameters request headers must have.
Request schema Defines the expected schema request bodies must have.

# Input Response Fields

The fields in the Response section define the structure of responses the endpoint sends to requests.

Field Description
Content type Defines the data format of the response. Defaults to JSON if left blank.
Response header Defines the parameters response headers will have.
Responses Defines the possible responses to a request sent to the endpoint.

This field also has some additional sub-fields:

Field Description
Name The name of the response. For example: Unauthorized or Created
Code The HTTP status code to be associated with the response which identifies the type of response. For example: Unauthorized responses are associated with 401 status codes.
Schema Defines the expected schema response bodies will have.

# Output

Field Description
Context Metadata about the API request.

This field also has some additional sub-fields:

Field Description
Calling job ID The ID of the job associated with the request.
Calling recipe ID If called from a recipe, the ID of the recipe that sent the request.
Calling IP address The IP address of the client calling this recipe as a REST endpoint.
Access profile Details about the access profile used to perform the request.
API client Contains details about the API client used to perform the request.
JWT claims Only available if a JWT token is used. Contains details about the JWT claims used to authenticate the request.
Request Contains details about the request's content type and body.

This field also has some additional sub-fields:

Field Description
Content type Applicable only if the request's Content type is Raw. The Content-Type header value from the request.
Request body (raw) Applicable only if the request's Content type is Raw. The full, raw body of the request.
Request body (JSON) Applicable only if the request's Content type is JSON. A JSON object containing all the fields defined in the Request schema.

# Additional Resources