# API reference

> Search approved contacts, find conversations, read message history, and send messages through Coop.


The Coop API turns the conversations already available to your team into a programmatic messaging surface. It uses the same encrypted message store and Relay path as the dashboard.

Start with this flow:

1. [Create an API token](./authentication/) and save its secret when Coop shows it.
2. [Search contacts](./contacts/) to find a Contact ID.
3. [List that Contact's conversations](./conversations/) to find the route you want.
4. [Read paginated messages or send a reply](./messages/).

Use `GET /v1/recent` when you want the latest accessible conversations without searching first.

API tokens currently inherit the global team target policy. A token can read or send only the Contacts, unknown conversations, and groups shared with the team, subject to the token's scopes. Tokens cannot start a conversation with an arbitrary phone number or email address.

All examples use `https://api.example.com` as the Coop API origin. Replace it with the API origin of your self-hosted installation.


## Pages

- [API authentication](/api/authentication/index.md): Create, scope, update, and revoke one-time Coop API tokens.
- [Contacts API](/api/contacts/index.md): Search the Contacts that the team policy allows an API token to use.
- [Conversations API](/api/conversations/index.md): Resolve a Contact to a sendable conversation and page through recent conversations.
- [Messages API](/api/messages/index.md): Read stable message pages and send idempotent text or one-file replies to accessible conversations.
- [Errors and pagination](/api/errors-and-pagination/index.md): Handle Coop Problem Details responses and stable opaque cursors.

