Contacts API

The Contacts API lives under <code>/apis/v1/contact</code>. Every contact and address book is scoped to the authenticated user and tenant.

01

Before you start

Paths in the tables below are relative to /apis/v1/contact unless given in full. Every request needs a Ration bearer token (see Authentication):

Authorization: Bearer <ration_access_token>
Content-Type: application/json

Ration supports CardDAV. These REST routes are the API-client equivalent for managing address books and contacts.

02

Default address books

GET /apis/v1/contact/addressbooks returns { "results": [AddressBook] }, including these built-in books:

Bookspecial_useBehaviour
My ContactselfThe caller’s own profile contact. As an address-book container it is read-only: it can’t be renamed, deleted, bulk-moved, imported into or used for CardDAV-style sync. Update it through /contact/self.
Global directoryglobalTenant directory of organisation members plus administrator-managed contacts. Retrieve it with the dedicated /global endpoint. It isn’t a writable personal import target.
Personal booksNoneBooks the caller creates, used for ordinary contact CRUD, imports and sync.

An address-book object contains id, name, destructible, type, sync_token, created_at, updated_at and special_use.

03

Create, update, delete or bulk move

MethodPathRequestSuccessful response
POST/addressbooks{ "name": "Customers" }Created address book (201).
GET/addressbooks/:idNoneAddress book.
PUT/addressbooks/:id{ "addressbook": { "name": "Customers 2026" } }Text Address book updated successfully.
DELETE/addressbooks/:idNone204 No Content.
POST/addressbooks/:id/move_contacts{ "to_addressbook_id": "destination-id" }{ "message": "Contacts successfully moved", "contacts_moved": ... }.

My Contact can’t be renamed, deleted or used on either side of a bulk move. A missing book returns 404.

04

Contact representation

Contact responses use this stable shape:

FieldTypeDescription
id, external_idStringInternal and interoperable contact identifiers. Use external_id in the contact routes.
addressbook_id, owner_idStringOwning book and user.
given_name, family_name, additional_names, nicknameStringPersonal names.
organizationObjectcompany, department and title.
emails, phone_numbers, urls, ims, relatedArrayValues shaped as { "type": "…", "value": "…" }.
addressesArrayPostal addresses with type, street_address, extended_address, locality, region, postal_code, country and post_office_box.
categories, custom_fields, vcard_propertiesArrayCategories and extensible vCard fields.
birthday, anniversary, timezone, language, gender, notes, photo, logo, kindMixedOptional profile and vCard details.
vcardStringSerialised vCard representation.
created_at, updated_atStringTimestamps.

05

List, read, create, update and delete

MethodPathDescription
GET/addressbooks/:addressbook_id/contactsList contacts in an address book you own: { "results": [Contact] }.
GET/addressbooks/:addressbook_id/contacts/:external_idRead one contact.
POST/addressbooks/:addressbook_id/contactsCreate a contact.
PUT/addressbooks/:addressbook_id/contacts/:external_idUpdate a contact. upsert: true allows creation when the external ID is missing.
DELETE/addressbooks/:addressbook_id/contacts/:external_idDelete a contact you own (204).
POST/addressbooks/:addressbook_id/contacts/:external_id/moveMove one contact. The body requires to_addressbook_id.

06

Contact request body

For create and update, send fields under contact or at the top level:

{
  "contact": {
    "given_name": "Ada",
    "family_name": "Okafor",
    "organization": { "company": "Ration", "title": "Designer" },
    "emails": [{ "type": "work", "value": "ada@example.com" }],
    "phone_numbers": [{ "type": "mobile", "value": "+234…" }]
  }
}

For idempotent imports, a POST can include a top-level external_id. If it already exists, the API returns 409 { "error": "Contact already exists" }. Putting that field only inside contact doesn’t make it an import key.

07

Global tenant directory

GET /apis/v1/contact/addressbooks/:addressbook_id/global lists the Global directory, with pagination.

{ "success": true, "results": [Contact], "total": Number, "page": Number, "limit": Number, "has_more": Boolean }
Query parameterTypeDescription
query or qStringSearch name, email and vCard data.
name, email, organization/company, phone, stateStringField-specific filters.
pageIntegerPage number. Defaults to 1.
limitIntegerPage size. Defaults to 50, maximum 200.

08

Your own contact and card

MethodPathDescription
GET/selfRead the caller’s own Contact object.
PUT/selfUpdate the caller’s own contact. Accepts contact nesting or direct contact fields.
GET/self/cardReturns contact, vcard, vcard_url, profile_url and host_origin.

09

Address-book sync

MethodPathRequest / response
GET/addressbooks/:addressbook_id/contacts/sync?sync_token=…Returns { "sync_token": "…", "changes": [...] }. Each change has external_id, change_type and, except for deletes, contact.
POST/addressbooks/:addressbook_id/contacts/syncApplies sync operations and returns addressbook_id, sync_token, counts and per-operation results.

The Self book can’t be synchronised. Applying a sync with no operations returns 400 { "error": "No sync operations provided" }.

10

Phone sync export

GET /apis/v1/contact/phone-sync/export. Use include_self (Boolean, default true) and the supported contact-source filters. The response is { "contacts": [Contact], "count": Number, "include_self": Boolean }.

11

Phone sync import

POST /apis/v1/contact/phone-sync/import. Send a contact collection plus optional target_addressbook_id (or addressbook_id) and prefer_fetched:

{
  "target_addressbook_id": "personal-book-id",
  "contacts": [{ "given_name": "Ada", "emails": [{ "type": "work", "value": "ada@example.com" }] }]
}

The response gives addressbook_id, addressbook_name, processed, created_count, updated_count, failure_count and individual results. You can’t import into Global or My Contact.

12

Errors

StatusMeaning
401Missing or invalid bearer authentication.
404Address book or contact not found.
409A contact already exists for an idempotent import key.
400Phone-sync contacts or sync operations are missing.
422Validation error, an attempt to change a protected book or contact, or an invalid writable target.
Next guideTasks API →

Last reviewed 27 November 2026.

Still stuck?

Chat with our support team. Tell us what you were doing and what you saw, and a person will pick it up. You can also email support@ration.works.

Buying or moving to Ration?

For plans, migration or an on-premise deployment, talk to our sales team.