> ## Documentation Index
> Fetch the complete documentation index at: https://docs.thinnest.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# API reference

> The transactional API — the messages your systems send, not the ones your marketing does.

This API exists for the messages a **system** sends: an order confirmation, a
delivery update, a one-time password. One customer, one event, right now.

It is not the campaigns API, and the difference is not cosmetic.

|                              | Broadcasts                   | This API                            |
| ---------------------------- | ---------------------------- | ----------------------------------- |
| Triggered by                 | A person, in the console     | Your code, on an event              |
| Audience                     | A list computed from consent | One customer                        |
| Typical category             | Marketing                    | Utility or authentication           |
| Reaches an opted-out contact | No                           | Yes, for utility and authentication |

If you find yourself looping this endpoint over a list of customers, you want
[broadcasts](/whatsapp/broadcasts) instead.

## Base URL

```
https://app.thinnest.ai/api/v1
```

## Endpoints

| Method | Path                                 | What                                                                            |
| ------ | ------------------------------------ | ------------------------------------------------------------------------------- |
| `POST` | `/messages`                          | [Send a template to one customer](/api-reference/send-message)                  |
| `POST` | `/events`                            | Report an event, which can enrol a contact in a [sequence](/whatsapp/sequences) |
| `POST` | `/sequences/{sequenceId}/enrolments` | Enrol a contact directly                                                        |

## What it will not do

<Warning>
  * **Send an unapproved template.** Meta refuses it, so we refuse it earlier and
    with a clearer message.
  * **Send marketing to somebody who opted out.** Refused with `409`. Utility and
    authentication still reach them, and must.
  * **Send free-form text.** Outside the 24-hour window WhatsApp carries only
    approved templates. Inside it, the conversation belongs to the agent and the
    inbox.
</Warning>

## Start here

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/api-reference/authentication">
    Creating a key, and where it must not go.
  </Card>

  <Card title="Send a message" icon="paper-plane" href="/api-reference/send-message">
    The one endpoint most integrations need.
  </Card>
</CardGroup>
