> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.sailorhq.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.sailorhq.io/_mcp/server.

# API Reference

> Field-level reference for Sailor's public API.

Use this section when you need exact request fields, response fields, validation rules, and webhook payload shapes.

## Public Endpoints

| Method   | Path                                 | Notes                                                          |
| -------- | ------------------------------------ | -------------------------------------------------------------- |
| `GET`    | `/phone-system/outcomes`             | Lists configured outcomes and `disposition_popup_enabled`.     |
| `POST`   | `/phone-system/outcomes`             | Creates an outcome. Requires `Idempotency-Key`.                |
| `PATCH`  | `/phone-system/outcomes/{outcomeId}` | Replaces an outcome configuration. Requires `Idempotency-Key`. |
| `DELETE` | `/phone-system/outcomes/{outcomeId}` | Deletes an outcome.                                            |

## Webhook Payloads

The reference also includes the signed phone-system outcome webhook payload your backend receives when Sailor sends an outcome action event. Verify the raw body with the versioned `whsec_…` secret and deduplicate by `X-Sailor-Delivery-Id`.

## Before You Call The API

* Use `https://api.sailorhq.io` as the base URL.
* Send `Authorization: Bearer $SAILOR_API_TOKEN`.
* Send an 8–255 character `Idempotency-Key` for create and update requests; it is optional but recommended for delete.
* Keep tokens server-side.
* Expect RFC 9457 `application/problem+json` errors and preserve `X-Request-Id` in logs.
* Honor `Retry-After`, `RateLimit-Policy`, and `RateLimit`; see [Rate limits](/rate-limits).