> 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/put.md).

# PUT

PUT sends a full replacement body to an HTTP endpoint and stores the response. Use it to create or replace a resource when the API expects the complete record in the request.

For a walkthrough of auth Headers, storage names, and JSON asserts, see [Test APIs in a Flow](/guides/test-apis-in-a-flow.md).

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

## When to use it

* Replace an entire record after the UI edits every field.
* Seed a known resource state before browser steps run against it.
* Assert the response with [Check JSON Value](/test-steps/check/check-json-value.md) using the same storage name.

## Configure

### Basics

| Field                     | What to set                                                                                                                                                    |
| ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **URL**                   | Fully qualified URL, or a [Value](/values/value-store.md) that expands to one                                                                                  |
| **Body Content-Type**     | `No Body`, `JSON (application/json)` (default), `XML (application/xml)`, `XML (text/xml)`, `Plain Text (text/plain)`, or `URL Encoded (x-www-form-urlencoded)` |
| **Body** *(conditional)*  | 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 `200` or `201` 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:** Switch **Method** on the step to move between GET, POST, PUT, PATCH, and DELETE without rebuilding the rest of the configuration.
{% endhint %}

## Related

* [GET](/test-steps/integration/get.md)
* [POST](/test-steps/integration/post.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`, `put`, `rest`
