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

# Quickstart

### Get your API key

Every request is authenticated with an API key sent in the `X-API-Key` header. See [Authentication](/authentication) for details.

### Send a message

Call [Send message](/api-reference/messages/send-message) with the recipient's number in international (MSISDN) format and the message text.

**`cURL`**

```bash cURL
curl -X POST http://gateway-api.e97e9e55a5d242f9a139.uksouth.aksapp.io/v2/messages \
  -H "X-API-Key: $COMMIFY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "accountReference": "EX0000000",
    "channel": "SMS",
    "from": "Commify",
    "body": { "text": "Hello {{name}}, your order has shipped!" },
    "recipients": [
      { "msisdn": "447700900000", "variables": { "name": "Alex" } }
    ]
  }'
```

**`Node.js`**

```javascript Node.js
const response = await fetch(
  "http://gateway-api.e97e9e55a5d242f9a139.uksouth.aksapp.io/v2/messages",
  {
    method: "POST",
    headers: {
      "X-API-Key": process.env.COMMIFY_API_KEY,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      accountReference: "EX0000000",
      channel: "SMS",
      from: "Commify",
      body: { text: "Hello {{name}}, your order has shipped!" },
      recipients: [{ msisdn: "447700900000", variables: { name: "Alex" } }],
    }),
  }
);
const { data } = await response.json();
console.log(data.requestId, data.messageIds);
```

**`Python`**

```python Python
import os
import requests

response = requests.post(
    "http://gateway-api.e97e9e55a5d242f9a139.uksouth.aksapp.io/v2/messages",
    headers={"X-API-Key": os.environ["COMMIFY_API_KEY"]},
    json={
        "accountReference": "EX0000000",
        "channel": "SMS",
        "from": "Commify",
        "body": {"text": "Hello {{name}}, your order has shipped!"},
        "recipients": [{"msisdn": "447700900000", "variables": {"name": "Alex"}}],
    },
)
data = response.json()["data"]
print(data["requestId"], data["messageIds"])
```

The API accepts the message for delivery and responds with `202 Accepted`:

```json
{
  "data": {
    "requestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "messageIds": ["9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"]
  },
  "errors": null
}
```

### Check the delivery status

Use the returned message ID with [Get message by ID](/api-reference/messages/get-message-by-id), or list everything sent as part of the request with [Get messages from request](/api-reference/requests/get-messages-from-request).

```bash
curl http://gateway-api.e97e9e55a5d242f9a139.uksouth.aksapp.io/v2/messages/9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d \
  -H "X-API-Key: $COMMIFY_API_KEY" \
  -H "AccountReference: EX0000000"
```

## Next steps

#### [Receive delivery events](/webhooks)

Get notified when messages are delivered instead of polling.

#### [Reuse content with templates](/api-reference/templates/create-template-v-3)

Store message content once and reference it by `templateId`.