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/jsonRation 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:
| Book | special_use | Behaviour |
|---|---|---|
| My Contact | self | The 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 directory | global | Tenant directory of organisation members plus administrator-managed contacts. Retrieve it with the dedicated /global endpoint. It isn’t a writable personal import target. |
| Personal books | None | Books 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
| Method | Path | Request | Successful response |
|---|---|---|---|
POST | /addressbooks | { "name": "Customers" } | Created address book (201). |
GET | /addressbooks/:id | None | Address book. |
PUT | /addressbooks/:id | { "addressbook": { "name": "Customers 2026" } } | Text Address book updated successfully. |
DELETE | /addressbooks/:id | None | 204 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:
| Field | Type | Description |
|---|---|---|
id, external_id | String | Internal and interoperable contact identifiers. Use external_id in the contact routes. |
addressbook_id, owner_id | String | Owning book and user. |
given_name, family_name, additional_names, nickname | String | Personal names. |
organization | Object | company, department and title. |
emails, phone_numbers, urls, ims, related | Array | Values shaped as { "type": "…", "value": "…" }. |
addresses | Array | Postal addresses with type, street_address, extended_address, locality, region, postal_code, country and post_office_box. |
categories, custom_fields, vcard_properties | Array | Categories and extensible vCard fields. |
birthday, anniversary, timezone, language, gender, notes, photo, logo, kind | Mixed | Optional profile and vCard details. |
vcard | String | Serialised vCard representation. |
created_at, updated_at | String | Timestamps. |
05
List, read, create, update and delete
| Method | Path | Description |
|---|---|---|
GET | /addressbooks/:addressbook_id/contacts | List contacts in an address book you own: { "results": [Contact] }. |
GET | /addressbooks/:addressbook_id/contacts/:external_id | Read one contact. |
POST | /addressbooks/:addressbook_id/contacts | Create a contact. |
PUT | /addressbooks/:addressbook_id/contacts/:external_id | Update a contact. upsert: true allows creation when the external ID is missing. |
DELETE | /addressbooks/:addressbook_id/contacts/:external_id | Delete a contact you own (204). |
POST | /addressbooks/:addressbook_id/contacts/:external_id/move | Move 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 parameter | Type | Description |
|---|---|---|
query or q | String | Search name, email and vCard data. |
name, email, organization/company, phone, state | String | Field-specific filters. |
page | Integer | Page number. Defaults to 1. |
limit | Integer | Page size. Defaults to 50, maximum 200. |
08
Your own contact and card
| Method | Path | Description |
|---|---|---|
GET | /self | Read the caller’s own Contact object. |
PUT | /self | Update the caller’s own contact. Accepts contact nesting or direct contact fields. |
GET | /self/card | Returns contact, vcard, vcard_url, profile_url and host_origin. |
09
Address-book sync
| Method | Path | Request / 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/sync | Applies 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
| Status | Meaning |
|---|---|
401 | Missing or invalid bearer authentication. |
404 | Address book or contact not found. |
409 | A contact already exists for an idempotent import key. |
400 | Phone-sync contacts or sync operations are missing. |
422 | Validation error, an attempt to change a protected book or contact, or an invalid writable target. |
Last reviewed 27 November 2026.