Body

Introduction

The body tab is primarily used for creating or updating resources (i.e. for POST, PUT, PATCH and DELETE requests).

Any parameters added here are passed in the endpoint request body. You can define default body parameters, and optional body parameters:

It's important to note that when a process flow runs and reaches a destination connection (i.e. a connection shape associated with a POST, PUT, PATCH and DELETE endpoint), the payload generated from previous steps is automatically added to the body of that request. You do not need to add anything to the endpoint body tab for this to happen - it's automatic.

When an authentication method is applied for an endpoint, any header and body parameters specified for the authentication method are also sent in the endpoint requests - you don't need to add them twice.

The body tab is split into upper and lower panels:

Required body parameters

If you have parameters that must always be passed in the endpoint request body, add them to the required body parameters panel. Default parameters are passed straight into requests - users are never asked to provide values for these.

Required body content can be none, or added as raw, form, or text data:

Raw data

Select the raw option and choose the required data type:

...then use the editor provided to add required data:

To make working with raw data much easier (including IntelliSense, validation, and code colourisation) the Monaco editor is integrated here.

Form data

Select the form option to add data as key pairs:

Text

Select the text option and add the required text content to the body content field:

None

Set this option to none if no body content is expected.

It's important to note that this option is ignored if data is found in the body. This handles scenarios where body content isn't typically expected so body format is set to none, but later (for example) a custom script is introduced which adds a payload to the body.

In order to send an empty body, no Content-Type header should be set. If a Content-Type header IS set (within header options), then 'none' will still fall back to sending the default payload (the output of the previous shape).

Body filters

If you have parameters that you want to expose to users when they configure a connection shape to use this endpoint in process flows and then pass provided values into the endpoint request body, add them to the lower panel:

Body filters are available for your users to update with their own required values, in process flows. These work in exactly the same way as noted for optional URL parameters, except any values provided by users (via the connection shape in process flows) are passed into the request body, rather than being added as URL queries.

More information

Techniques for adding header parameters are the same as all other types of parameters that you may encounter in the connector builder. For information about these options please see the Working with parameters page.

Last updated