> For the complete documentation index, see [llms.txt](https://docs.does.qa/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.does.qa/test-steps/integration/post.md).

# POST

POST sends data to an HTTP endpoint and stores the response. Use it to create resources, log in through an API, or seed data before UI steps.

![POST Test Step](https://app.does.qa/screenshots/node/integration_api_post.png)

## When to use it

* Create a record the UI will open next.
* Exchange credentials for a token, then pass that token in Headers on later API steps.
* Assert the response with [Check JSON Value](/test-steps/check/check-json-value.md) using the same storage name.

See [Test APIs in a Flow](/guides/test-apis-in-a-flow.md) for a full example.

## Configure

### Basics

| Field                     | What to set                                                                                 |
| ------------------------- | ------------------------------------------------------------------------------------------- |
| **URL**                   | Fully qualified URL, or a [Value](/values/value-store.md) that expands to one               |
| **Body Content-Type**     | `JSON` (default), `JSON:API`, `XML`, `Plain Text`, `URL Encoded`, `Form Data`, or `No Body` |
| **Body**                  | Request body (editor matches Content-Type)                                                  |
| **Response Storage Name** | Name for the stored response (`response` by default)                                        |

### Advanced

| Field                              | What to set                                                               |
| ---------------------------------- | ------------------------------------------------------------------------- |
| **Headers**                        | Request headers as JSON                                                   |
| **Expected Response Status Codes** | Defaults to `2xx`. Choose `201` or other codes when the API requires them |
| **Response Object**                | `Body` (default), `Headers`, or `Complete`                                |
| **Status on fail**                 | [Failed Status](/test-step-options/failed-status.md)                      |

{% hint style="info" %}
**Pro tip:** Keep API hosts and secrets in Assets Values or Recipe overwrites so the same Flow works across environments.
{% endhint %}

## Related

* [GET](/test-steps/integration/get.md)
* [PUT](/test-steps/integration/put.md)
* [PATCH](/test-steps/integration/patch.md)
* [DELETE](/test-steps/integration/delete.md)
* [Test APIs in a Flow](/guides/test-apis-in-a-flow.md)
* [Integration](/test-steps/integration.md)

**Tags:** `integration`, `api`, `post`, `rest`
