> For the complete documentation index, see [llms.txt](https://doc.wearepatchworks.com/product-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.wearepatchworks.com/product-documentation/developer-hub/connector-builder/building-your-own-connector/4-endpoints/endpoint-options/body.md).

# Body

## Introduction

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

Any parameters added here are passed in the endpoint request body. You can define `required` body parameters and `optional` body parameters:&#x20;

<div align="left"><figure><img src="/files/VnqQGInQobY3Q20PjrJ5" alt=""><figcaption></figcaption></figure></div>

{% hint style="warning" %}
It's important to note that when a [process flow](/product-documentation/process-flows/about-process-flows.md) runs and reaches a target connector step (typically, a [connector shape](/product-documentation/process-flows/building-process-flows/process-flow-shapes/standard-shapes/connector-shape.md) associated with a `POST`, `PUT`, `PATCH` or `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.
{% endhint %}

{% hint style="info" %}
When an [authentication method](/product-documentation/developer-hub/connector-builder/building-your-own-connector/4-endpoints/endpoint-options/authentication.md) 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.
{% endhint %}

The `body` tab is split into upper and lower panels:

* [Required body parameters](#required-body-parameters)
* [Body filters](#body-filters)

## 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](#none), or added as [raw](#raw-data), [form](#form-data), or [text](#text) data:

<div align="left"><figure><img src="/files/LMm8aQNZv07jVkYBvFne" alt=""><figcaption></figcaption></figure></div>

### Raw data

Use this option to pass static content or an incoming payload into the request body. Select the `raw` option and choose the required data type:

<div align="left"><figure><img src="/files/Hcf6a801MSfKqxWyLraH" alt=""><figcaption></figcaption></figure></div>

...then (if required) use the editor provided to add the required data:

<div align="left"><figure><img src="/files/fSbAyvd9BZDSKBB2Yn9D" alt=""><figcaption></figcaption></figure></div>

{% hint style="info" %}
If no static content is added, any incoming payload is passed into the request body.
{% endhint %}

### Form data

Select the `form` option to add data as key pairs:

<div align="left"><figure><img src="/files/wgjgQDgnM0DKEHsiMHjX" alt=""><figcaption></figcaption></figure></div>

{% hint style="warning" %}
If you use form data to send data as files, please be aware that [pre-request scripts](/product-documentation/developer-hub/connector-builder/building-your-own-connector/4-endpoints/endpoint-options/pre-request-script.md) cannot be used.
{% endhint %}

### Text

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

<div align="left"><figure><img src="/files/9Ug8fyBmG1x8EYQEpDUX" alt=""><figcaption></figcaption></figure></div>

### None

Set this option to `none` if no body content is expected.&#x20;

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.

{% hint style="warning" %}
To send an empty body, no `Content-Type` header should be set. If a `Content-Type` header IS set (within [header](/product-documentation/developer-hub/connector-builder/building-your-own-connector/4-endpoints/endpoint-options/header.md) options), then `none`  falls back to sending the default payload (i.e. any output of the previous shape).
{% endhint %}

## Body filters

If you have parameters that you want to expose to users when they configure a [connection shape](/product-documentation/process-flows/building-process-flows/process-flow-shapes/standard-shapes/connector-shape.md) to use this endpoint in [process flows](/product-documentation/process-flows/about-process-flows.md), and then pass provided values into the endpoint request body, add them to the lower panel:

<div align="left"><figure><img src="/files/JY9zup5PALAibcFhR7zF" alt=""><figcaption></figcaption></figure></div>

`Body filters` are available for your users to update with their own required values, in process flows. These work in the same way [as noted for optional URL parameters](/product-documentation/developer-hub/connector-builder/building-your-own-connector/4-endpoints/endpoint-options/url.md#optional-parameters), except any values provided by users (via the [connector shape](/product-documentation/process-flows/building-process-flows/process-flow-shapes/standard-shapes/connector-shape.md) in [process flows](/product-documentation/process-flows/about-process-flows.md)) are passed into the request body, rather than being added as URL queries.&#x20;

## More information

Techniques for adding body parameters are the same as all other types of parameters that you may encounter in the connector builder. For information, please see [Working with parameters](/product-documentation/developer-hub/connector-builder/building-your-own-connector/techniques-for-working-with-variables-and-parameters/working-with-parameters.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://doc.wearepatchworks.com/product-documentation/developer-hub/connector-builder/building-your-own-connector/4-endpoints/endpoint-options/body.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
