# Call the site

`POST /v1/sites/{id}/call` sends one request to the site's own code, as the
person you act for. Use it for daily work that the site's own code does:
mark an order shipped, block a date, confirm a request. The site's rules and
mails apply, the same as when staff click the button.

```json
{ "method": "POST", "path": "/_actions/shipOrder", "body": { "id": "order_123" } }
```

| Field | Means |
|---|---|
| `method` | GET, POST, PUT, PATCH or DELETE. The default is POST. |
| `path` | a path on the site. Not under `/clave/`. |
| `body` | JSON, sent as `application/json`. With `content_type`, a string is sent as it is. |
| `slot` | call a draft's code, not the live code. |

The request carries a `Clave-Identity` for you, with `via: "agent"`, your
role, and your labels and permissions from the [staff list](/api/staff).
It passes a private path when you hold one of its roles or labels, or it
names none. The site's code sees who asked, and a refund it makes checks your
permissions now.

The answer holds the site's `status`, its `content_type`, and its `body`
(JSON) or `body_text`.

An account makes at most 60 calls a minute across its sites. More answers
`429 rate_limited`. An action can send mail each time, so the cap stops an
agent in a loop.

If the site has no action for the job, write one, or use
`POST /v1/sites/{id}/store/execute` for a one-time repair. See
[Store](/api/store).

---

## Where this page sits

This is one page of the Clave documentation.
Read it as a web page at https://docs.heyclave.com/api/call.
Every page has a `.md` address, and https://docs.heyclave.com/llms.txt lists them all.

- Previous: [Staff](https://docs.heyclave.com/api/staff.md)
- Next: [Secrets](https://docs.heyclave.com/api/secrets.md)
- Index: [Overview](https://docs.heyclave.com/index.md)
