> For the complete documentation index, see [llms.txt](https://documentation.proto.cx/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.proto.cx/docs/modules/ai-agents/workflows-and-actions/send-api.md).

# Send API

`Action` — Sends a request to an external endpoint and receives the response. Supports GET, POST, PUT, DELETE, and PATCH.

## What it does

Calls an external API mid-chat and stores the response in a variable for use by downstream actions.

## When to use it

To bring live external data into a chat — looking up a complaint status, fetching account details, or pushing data out to another system.

## Settings

| Setting                | Description                                                                                                                                                   |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **HTTP method**        | The request type: GET (retrieve), POST (create), PUT (update), PATCH (partial update), DELETE (delete).                                                       |
| **URL endpoint**       | The endpoint receiving the request. Must start with `https://`.                                                                                               |
| **Headers**            | Key / Value pairs for the request header, e.g. for authentication tokens. Optional.                                                                           |
| **Payload (JSON)**     | For POST, PUT, PATCH, and DELETE requests. Enter directly or as a [chat script](/docs/developers/chat-scripts.md) Python expression.                          |
| **Resulting variable** | The [chat variable](/docs/developers/chat-variables.md) that stores the response. Must start with a letter and contain only letters, numbers, or underscores. |

Press **Save** to confirm edits.

## Outcome branches

The action branches into **Success**, **Error**, and **Timeout**. Nest subsequent actions under each as needed.

## Example

```
Send API
• Method:   GET
• URL:      https://api.example.com/complaints/{complaint_ref}
• Result:   complaint_status
```

A following Branch or Send message can then use `complaint_status`.

## Related

{% content-ref url="/pages/rTdnuIG08MgrRXkV3Alv" %}
[Set variable](/docs/modules/ai-agents/workflows-and-actions/set-variable.md)
{% endcontent-ref %}

{% content-ref url="/pages/yRuISyntS8UJxaE5kgNX" %}
[Branch](/docs/modules/ai-agents/workflows-and-actions/branch.md)
{% endcontent-ref %}

{% content-ref url="/pages/h76VVFDGINQSgTbHDUvJ" %}
[SQL query](/docs/modules/ai-agents/workflows-and-actions/sql-query.md)
{% endcontent-ref %}
