API & WebhooksContacts

Contacts

List, create, read, update, and delete contacts via the API.

Contacts API

Manage contacts programmatically. All endpoints require an API token with the appropriate contacts.* ability.


List Contacts

GET /api/v1/contacts — Permission: contacts.view

Query Parameters

ParameterTypeRequiredDescription
searchstringNoSearch by first name, last name, or email
sortstringNoSort field (default: created_at)
sort_dirstringNoasc or desc (default: desc)
filtersstringNoJSON-encoded advanced filter object
per_pageintegerNoResults per page, 1–100 (default: 25)

Example Request

curl -X GET "https://your-domain.com/api/v1/contacts?search=jane&per_page=10" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"

Example Response

{
  "data": [
    {
      "id": 1,
      "first_name": "Jane",
      "last_name": "Doe",
      "email": "jane@example.com",
      "phone": "+1 555-0100",
      "custom_fields": {
        "company": "Acme Corp",
        "title": "CEO"
      },
      "tags": [
        { "id": 3, "name": "VIP", "slug": "vip", "color": "blue" }
      ],
      "created_at": "2025-03-15T10:30:00.000000Z",
      "updated_at": "2025-03-20T14:00:00.000000Z"
    }
  ],
  "meta": { "current_page": 1, "last_page": 1, "per_page": 10, "total": 1 },
  "links": { "first": "...", "last": "...", "prev": null, "next": null }
}

Create Contact

POST /api/v1/contacts — Permission: contacts.create

Request Body

FieldTypeRequiredDescription
first_namestringYesContact’s first name (max 255)
last_namestringNoContact’s last name (max 255)
emailstringNoValid email address (max 255)
phonestringNoPhone number (max 50)
custom_fieldsobjectNoKey-value pairs matching your custom field keys

Example Request

curl -X POST "https://your-domain.com/api/v1/contacts" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "first_name": "Jane",
    "last_name": "Doe",
    "email": "jane@example.com",
    "phone": "+1 555-0100",
    "custom_fields": {
      "company": "Acme Corp"
    }
  }'

Example Response 201 Created

{
  "data": {
    "id": 42,
    "first_name": "Jane",
    "last_name": "Doe",
    "email": "jane@example.com",
    "phone": "+1 555-0100",
    "custom_fields": { "company": "Acme Corp" },
    "tags": [],
    "created_at": "2025-03-20T14:00:00.000000Z",
    "updated_at": "2025-03-20T14:00:00.000000Z"
  }
}

Get Contact

GET /api/v1/contacts/{id} — Permission: contacts.view

Example Request

curl -X GET "https://your-domain.com/api/v1/contacts/42" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"

Returns the same shape as the create response.


Update Contact

PUT /api/v1/contacts/{id} — Permission: contacts.edit

Send only the fields you want to change. Set a field to null to clear it.

Request Body

FieldTypeRequiredDescription
first_namestringSometimesContact’s first name (max 255)
last_namestringNoContact’s last name (max 255)
emailstringNoValid email address (max 255)
phonestringNoPhone number (max 50)
custom_fieldsobjectNoKey-value pairs matching your custom field keys

Example Request

curl -X PUT "https://your-domain.com/api/v1/contacts/42" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "+1 555-0200",
    "custom_fields": { "company": "New Corp" }
  }'

Delete Contact

DELETE /api/v1/contacts/{id} — Permission: contacts.delete

Example Request

curl -X DELETE "https://your-domain.com/api/v1/contacts/42" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"

Returns 204 No Content on success.

Was this article helpful?