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

# POST /v1/contacts

> Add a contact, with their fields, tags, time zone and quiet hours.

Adds a contact. A number is one person's: a number another contact already has is refused with `contact_exists`, naming that contact, so look it up or change them instead.

> [!NOTE]
>
> Needs the `contacts:write` scope.

## Body

| Field | Type | Required | Notes |
| :- | :- | :- | :- |
| `phone` | string | Yes | With its country code: `+919876543210`. A number without one is read in your account's country. |
| `name` | string | No | Up to 200 characters. |
| `fields` | object | No | Values by contact field key, checked against each field's type. |
| `tags` | array | No | Up to 50 tag names (each up to 60 characters). A tag the account doesn't have yet is made. |
| `timezone` | string | No | A time zone name like `Asia/Kolkata`; empty or null clears it. |
| `quiet_hours` | object | No | `{"start": "21:00", "end": "08:00"}` (HH:MM, not the same time), or null to clear. |

Send an `Idempotency-Key` header to make a retry safe: the same key with the same body is answered once, and the first answer repeated (with `Idempotent-Replayed: true`).

## Request

```bash cURL theme={null}
curl -X POST https://api.fireflo.au/v1/contacts \
  -H "Authorization: Bearer $OMNI_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: contact-asha-rao" \
  -d '{
    "phone": "+919876543210",
    "name": "Asha Rao",
    "fields": {
      "city": "Pune",
      "loyalty_tier": "gold"
    },
    "tags": [
      "vip",
      "newsletter"
    ],
    "timezone": "Asia/Kolkata",
    "quiet_hours": {
      "start": "21:00",
      "end": "08:00"
    }
  }'
```

```python Python theme={null}
import os

import requests

response = requests.post(
    "https://api.fireflo.au/v1/contacts",
    headers={
        "Authorization": f"Bearer {os.environ['OMNI_API_KEY']}",
        "Idempotency-Key": "contact-asha-rao",
    },
    json={
        "phone": "+919876543210",
        "name": "Asha Rao",
        "fields": {
            "city": "Pune",
            "loyalty_tier": "gold",
        },
        "tags": ["vip", "newsletter"],
        "timezone": "Asia/Kolkata",
        "quiet_hours": {
            "start": "21:00",
            "end": "08:00",
        },
    },
)
print(response.status_code, response.json())
```

```javascript Node theme={null}
const response = await fetch("https://api.fireflo.au/v1/contacts", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.OMNI_API_KEY}`,
    "Content-Type": "application/json",
    "Idempotency-Key": "contact-asha-rao",
  },
  body: JSON.stringify({
    "phone": "+919876543210",
    "name": "Asha Rao",
    "fields": {
      "city": "Pune",
      "loyalty_tier": "gold"
    },
    "tags": [
      "vip",
      "newsletter"
    ],
    "timezone": "Asia/Kolkata",
    "quiet_hours": {
      "start": "21:00",
      "end": "08:00"
    }
  }),
});
console.log(response.status, await response.json());
```

## Response

`201 Created`

```json theme={null}
{
  "id": "3f6b2a1e-8c4d-4e2a-9b7f-5d1c0e8a9f42",
  "name": "Asha Rao",
  "phone": "+919876543210",
  "identifiers": [
    {
      "kind": "phone",
      "value": "+919876543210",
      "primary": true
    }
  ],
  "fields": {
    "city": "Pune",
    "loyalty_tier": "gold"
  },
  "tags": [
    "newsletter",
    "vip"
  ],
  "consent": {
    "do_not_contact": false,
    "reason": "",
    "until": null,
    "opted_out_at": null
  },
  "timezone": "Asia/Kolkata",
  "quiet_hours": {
    "start": "21:00:00",
    "end": "08:00:00"
  },
  "created": "2026-08-14T05:21:09.338Z",
  "updated": "2026-08-14T05:21:09.338Z"
}
```

### The contact

| Field | Notes |
| :- | :- |
| `id` | The contact's id. |
| `phone` | Their main number, in international format. |
| `identifiers` | Every way they are known: their main number first (`primary`: true), then older numbers and other identifiers. `kind` is `phone`, `email`, `external_id`, `whatsapp_id`, `rcs_id` or `anonymous_id`. |
| `fields` | Their values for your account's contact fields, by field key. |
| `tags` | Tag names, sorted. |
| `consent` | `do_not_contact` (nothing is sent to them on any channel while true), its `reason` and `until` (null for good), and `opted_out_at` (when they opted out of marketing, or null). |
| `timezone`, `quiet_hours` | Their time zone, and the hours not to message them (`{start, end}`, or null). |
| `created`, `updated` | When the contact was added and last changed. |

## Errors

Every refusal is `{"error": {"code", "message", "field"}}`; `field` is there when one input is at fault.

| Status | Error code | When |
| :- | :- | :- |
| 400 | `invalid_request` | An input is wrong: a number that isn't valid, a field value of the wrong type, a bad time zone or quiet hours (`field` names it). |
| 409 | `contact_exists` | Another contact already has that number; the message names that contact's id. |
| 400 | `invalid_json` | The body isn't valid JSON. |
| 403 | `scope_missing` | The key doesn't have the `contacts:write` scope. |

Any request can also be refused for its key, its account or its rate (`key_required`, `invalid_key`, `account_suspended`, `plan_excludes_api`, `address_not_allowed`, `rate_limited`); see [the overview](https://cpaas.fireflo.au/api-reference/overview.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.