Contacts API
A contact is a person in your organization’s address book. One address is one contact, whatever its letter case. Everything an access key does here is written to the contact’s history, under the key’s name. To react to contacts changing, use a Contact saved workflow with a Webhook step.
The contact object
Section titled “The contact object”| Field | Type | Meaning |
|---|---|---|
id |
UUID | The contact’s identifier. |
firstName, lastName, fullName |
string | The name. |
email |
string | The address, as it was entered. |
phone, jobTitle |
string or null | The other details. |
companyName |
string or null | The name of its company. |
company |
object or null | id and name of its company. |
language |
string or null | ar, de, en, es, fr, hi, it, ja, pl, pt, th, tr, uk, zh or none. |
type |
object or null | id and name of its type. |
photoId |
string or null | Whether it has a photo: see Get a contact’s photo. |
customFields |
object | The values of your custom fields that are not sensitive, by key. |
sensitiveCustomFields |
array of strings | The keys of the sensitive custom fields that hold a value; the values come from their own endpoint. |
createdAt, updatedAt |
time | When it was created and last changed. |
surveysOptOutAt |
time or null | When the contact declined surveys; null if never. They are sent no survey links then. |
List contacts
Section titled “List contacts”GET/v1/contacts
Key permission: get_contacts
Headers: X-Api-Key, X-Api-Secret
| Parameter | Meaning |
|---|---|
page, perPage |
Paging. |
search[firstName], search[lastName], search[email], search[company.name] |
Text to look for, in any letter case. Any other text field of the object can be searched the same way. |
filter[type][eq] |
A type’s id, or none for contacts without a type. |
filter[company][eq] |
A company’s id, or none for contacts without a company. |
sort |
A field to sort by, such as lastName, -createdAt, type.name or company.name. |
Returns 200 OK with items and meta.
curl -g 'https://api.doxtly.com/v1/contacts?search[company.name]=harbourline&perPage=10' \ -H "X-Api-Key: $DOXTLY_API_KEY" -H "X-Api-Secret: $DOXTLY_API_SECRET"{ "items": [ { "id": "01a1ccda-309f-71ec-93f3-dc28d5e4c19d", "firstName": "Sarah", "lastName": "Mitchell", "fullName": "Sarah Mitchell", "email": "sarah.mitchell@harbourline.example", "phone": "+44 7700 900413", "jobTitle": "Head of Procurement and Supply", "companyName": "Harbourline Logistics Ltd", "company": { "id": "01a1ccda-2a5a-7eb8-bb24-d04f9fa1605c", "name": "Harbourline Logistics Ltd" }, "language": "en", "type": { "id": "01a1ccda-1b78-73fc-a307-83e0e331a14b", "name": "Client" }, "photoId": null, "customFields": { "clientNumber": "NB-1042", "contractEnd": "2027-03-31" }, "sensitiveCustomFields": [ "idDocumentNumber" ], "createdAt": "2026-11-12T00:03:33+01:00", "updatedAt": "2026-11-12T00:03:37+01:00", "surveysOptOutAt": null }, { "id": "01a1ccda-3136-7d19-a120-52f17d320d10", "firstName": "Tom", "lastName": "Okafor", "fullName": "Tom Okafor", "email": "tom.okafor@harbourline.example", "phone": "+44 7700 900518", "jobTitle": "Operations Director", "companyName": "Harbourline Logistics Ltd", "company": { "id": "01a1ccda-2a5a-7eb8-bb24-d04f9fa1605c", "name": "Harbourline Logistics Ltd" }, "language": "en", "type": { "id": "01a1ccda-1b78-73fc-a307-83e0e331a14b", "name": "Client" }, "photoId": null, "customFields": { "clientNumber": "NB-1042", "dietaryNeeds": "Vegetarian" }, "sensitiveCustomFields": [], "createdAt": "2026-11-12T00:03:33+01:00", "updatedAt": "2026-11-12T00:03:33+01:00", "surveysOptOutAt": null } ], "meta": { "total": 3, "page": 1, "perPage": 10, "totalPages": 1, "hasMore": false, "hasPrevious": false }}Shortened: each list shows its first items.
Create a contact
Section titled “Create a contact”POST/v1/contacts
Key permission: create_contact
| Field | Type | Required | Rules |
|---|---|---|---|
firstName, lastName |
string | Yes | Up to 100 characters. |
email |
string | Yes | A valid address, up to 255 characters. |
phone |
string | No | Up to 50 characters. |
jobTitle |
string | No | Up to 150 characters. |
companyName |
string | No | Up to 200 characters. The company of this name, whatever its letter case; added if your organization has none. Empty takes the company away. |
language |
string | No | ar, de, en, es, fr, hi, it, ja, pl, pt, th, tr, uk or zh. |
typeId |
UUID | No | One of your types. |
photo |
file | No | Sent as multipart: photo[file]. PNG, JPEG or WebP, up to 2 MB. |
customFields |
object | No | Values of your custom fields by key; customFields[key] in multipart. A sensitive field also needs read_sensitive_custom_fields. |
Returns 201 Created with the contact.
curl -X POST 'https://api.doxtly.com/v1/contacts' \ -H "X-Api-Key: $DOXTLY_API_KEY" -H "X-Api-Secret: $DOXTLY_API_SECRET" \ -H 'Content-Type: application/json' \ -d '{"firstName":"Lena","lastName":"Fischer","email":"lena.fischer@harbourline.example","phone":"+49 40 3861 2290","jobTitle":"Procurement lead","companyName":"Harbourline Shipping","language":"de","customFields":{"clientNumber":"NB-1187"}}'{ "id": "01a1ce93-2940-779c-9aaa-accf7a544d69", "firstName": "Lena", "lastName": "Fischer", "fullName": "Lena Fischer", "email": "lena.fischer@harbourline.example", "phone": "+49 40 3861 2290", "jobTitle": "Procurement lead", "companyName": "Harbourline Shipping", "company": { "id": "01a1ce8f-868f-7ce9-808f-567439fc7f2f", "name": "Harbourline Shipping" }, "language": "de", "type": null, "photoId": null, "customFields": { "clientNumber": "NB-1187" }, "sensitiveCustomFields": [], "createdAt": "2026-11-12T08:05:13+01:00", "updatedAt": "2026-11-12T08:05:13+01:00", "surveysOptOutAt": null}| Status | Meaning |
|---|---|
403 |
The key lacks the operation, your plan’s contact limit is reached, or a sensitive custom field is given without read_sensitive_custom_fields. |
409 |
Another contact has the address: the body has code: contact_email_taken, contactId and contactName. Or another contact or company holds the value of a unique custom field. |
422 |
A field failed. See Errors. |
Get a contact
Section titled “Get a contact”GET/v1/contacts/{id}
Key permission: read_contact. Returns 200 OK with the contact and previousAddresses, the addresses it no longer has: id, kind (email or phone), address, until (the date it stopped being current) and addedByHand (true for an address somebody recorded as an earlier one, which can be removed), newest first. 404 if it isn’t yours.
curl 'https://api.doxtly.com/v1/contacts/01a1ccda-3136-7d19-a120-52f17d320d10' \ -H "X-Api-Key: $DOXTLY_API_KEY" -H "X-Api-Secret: $DOXTLY_API_SECRET"{ "id": "01a1ccda-3136-7d19-a120-52f17d320d10", "firstName": "Tom", "lastName": "Okafor", "fullName": "Tom Okafor", "email": "tom.okafor@harbourline.example", "phone": "+44 7700 900518", "jobTitle": "Operations Director", "companyName": "Harbourline Logistics Ltd", "company": { "id": "01a1ccda-2a5a-7eb8-bb24-d04f9fa1605c", "name": "Harbourline Logistics Ltd" }, "language": "en", "type": { "id": "01a1ccda-1b78-73fc-a307-83e0e331a14b", "name": "Client" }, "photoId": null, "customFields": { "clientNumber": "NB-1042", "dietaryNeeds": "Vegetarian" }, "sensitiveCustomFields": [], "createdAt": "2026-11-12T00:03:33+01:00", "updatedAt": "2026-11-12T00:03:33+01:00", "surveysOptOutAt": null, "previousAddresses": []}Add earlier addresses
Section titled “Add earlier addresses”POST/v1/contacts/{id}/earlier_addresses
Key permission: update_contact. Body: email, phone (with a country code), or both. Returns 201 Created with previousAddresses. An address the contact has now is left out; 422 if that was all you sent or a value is wrong; 409 with code contact_email_taken, contactId and contactName if another contact has the email now.
curl -X POST 'https://api.doxtly.com/v1/contacts/01a1ce93-2940-779c-9aaa-accf7a544d69/earlier_addresses' \ -H "X-Api-Key: $DOXTLY_API_KEY" -H "X-Api-Secret: $DOXTLY_API_SECRET" \ -H 'Content-Type: application/json' \ -d '{"email":"l.fischer@harbourline-old.example"}'{ "previousAddresses": [ { "id": "01a1ce93-2a69-713d-9944-f0cb2682172e", "kind": "email", "address": "l.fischer@harbourline-old.example", "until": "2026-11-12T08:05:13+01:00", "addedByHand": true } ]}Remove an earlier address
Section titled “Remove an earlier address”DELETE/v1/contacts/{id}/earlier_addresses/{addressId}
Key permission: update_contact. Removes an address added by hand, named by the id from previousAddresses, and returns 204 No Content; 409 for an address from the contact’s own history.
curl -X DELETE 'https://api.doxtly.com/v1/contacts/01a1ce93-2940-779c-9aaa-accf7a544d69/earlier_addresses/01a1ce93-2a69-713d-9944-f0cb2682172e' \ -H "X-Api-Key: $DOXTLY_API_KEY" -H "X-Api-Secret: $DOXTLY_API_SECRET"Update a contact
Section titled “Update a contact”PATCH/v1/contacts/{id}
Key permission: update_contact. Takes the fields of Create a contact. A field left out stays as it is; an empty one takes the value away, except the name and address, which are required. photo[fileId] sent empty removes the photo. Returns 200 OK with the contact; the errors are those of Create a contact, and 404 for an id that isn’t one of your contacts. A save that changes nothing adds no history and starts no Contact saved workflow; one that changes only custom fields starts them like any other change.
curl -X PATCH 'https://api.doxtly.com/v1/contacts/01a1ce93-2940-779c-9aaa-accf7a544d69' \ -H "X-Api-Key: $DOXTLY_API_KEY" -H "X-Api-Secret: $DOXTLY_API_SECRET" \ -H 'Content-Type: application/json' \ -d '{"jobTitle":"Head of procurement","phone":"+49 40 3861 2291"}'{ "id": "01a1ce93-2940-779c-9aaa-accf7a544d69", "firstName": "Lena", "lastName": "Fischer", "fullName": "Lena Fischer", "email": "lena.fischer@harbourline.example", "phone": "+49 40 3861 2291", "jobTitle": "Head of procurement", "companyName": "Harbourline Shipping", "company": { "id": "01a1ce8f-868f-7ce9-808f-567439fc7f2f", "name": "Harbourline Shipping" }, "language": "de", "type": null, "photoId": null, "customFields": { "clientNumber": "NB-1187" }, "sensitiveCustomFields": [], "createdAt": "2026-11-12T08:05:13+01:00", "updatedAt": "2026-11-12T08:05:13+01:00", "surveysOptOutAt": null}A photo goes as multipart, on its own or together with other fields:
curl -X PATCH 'https://api.doxtly.com/v1/contacts/01a1ce93-2940-779c-9aaa-accf7a544d69' \ -H "X-Api-Key: $DOXTLY_API_KEY" -H "X-Api-Secret: $DOXTLY_API_SECRET" \ -F 'photo[file]=@lena-fischer.jpg'{ "id": "01a1ce93-2940-779c-9aaa-accf7a544d69", "firstName": "Lena", "lastName": "Fischer", "fullName": "Lena Fischer", "email": "lena.fischer@harbourline.example", "phone": "+49 40 3861 2291", "jobTitle": "Head of procurement", "companyName": "Harbourline Shipping", "company": { "id": "01a1ce8f-868f-7ce9-808f-567439fc7f2f", "name": "Harbourline Shipping" }, "language": "de", "type": null, "photoId": "01a1ce93-2ba7-79f9-873c-0972c7446228", "customFields": { "clientNumber": "NB-1187" }, "sensitiveCustomFields": [], "createdAt": "2026-11-12T08:05:13+01:00", "updatedAt": "2026-11-12T08:05:13+01:00", "surveysOptOutAt": null}Delete a contact
Section titled “Delete a contact”DELETE/v1/contacts/{id}
Key permission: delete_contact. Deletes the contact with its notes, history and photo. Packages are not touched. Returns 204 No Content.
curl -X DELETE 'https://api.doxtly.com/v1/contacts/01a1ce93-2940-779c-9aaa-accf7a544d69' \ -H "X-Api-Key: $DOXTLY_API_KEY" -H "X-Api-Secret: $DOXTLY_API_SECRET"Get a contact’s photo
Section titled “Get a contact’s photo”GET/v1/contacts/{id}/photo
Key permission: read_contact. Returns 200 OK with the picture itself, as PNG, JPEG or WebP, or 404 when the contact has none.
curl 'https://api.doxtly.com/v1/contacts/01a1ce93-2940-779c-9aaa-accf7a544d69/photo' \ -H "X-Api-Key: $DOXTLY_API_KEY" -H "X-Api-Secret: $DOXTLY_API_SECRET" \ -o lena-fischer.jpgList a contact’s notes
Section titled “List a contact’s notes”GET/v1/contacts/{id}/notes
Key permission: get_contact_notes. Returns 200 OK with items, newest first, all at once.
| Field | Type | Meaning |
|---|---|---|
id |
UUID | The note’s identifier. |
body |
string | Its text. |
author |
object | Who wrote it: see the history. |
isOwn |
boolean | Whether the reading key wrote it. |
createdAt, updatedAt |
time | When it was written and last changed. |
curl 'https://api.doxtly.com/v1/contacts/01a1ce93-2940-779c-9aaa-accf7a544d69/notes' \ -H "X-Api-Key: $DOXTLY_API_KEY" -H "X-Api-Secret: $DOXTLY_API_SECRET"{ "items": [ { "id": "01a1ce93-2cac-7a02-a12c-f98cf3f0aa83", "body": "Asked for the framework agreement in German and English. Sent both on Monday.", "author": { "kind": "access_key", "name": "CRM sync", "userId": null, "workflowId": null, "workflowExecutionId": null, "accessKeyId": "01a1ce8f-1aa1-73fd-afff-6cf89ba101c8" }, "isOwn": true, "createdAt": "2026-11-12T08:05:14+01:00", "updatedAt": "2026-11-12T08:05:14+01:00" } ]}List a contact’s documents
Section titled “List a contact’s documents”GET/v1/contacts/{id}/documents
Key permission: get_contact_documents. Returns 200 OK with items, a page at a time, sorted and searched with search[title] as the packages list: the packages the contact is a party to or a viewer of, found by its addresses, each with id, title, derivedStatus, completionPercentage, partyIndicators, isViewer, earlierAddresses, createdAt and completedAt, and contract, where a contract stands, and change, {kind, number, contract: {id, title, number}} for a change of a contract (see Contracts), each null otherwise. The filter parameters of the packages list don’t apply here: the list is always the contact’s. A key that holds no permission reading documents, such as get_document_packages, gets an empty list: this operation shows what the contact is in a package, not the package.
curl 'https://api.doxtly.com/v1/contacts/01a1ccda-31be-7e48-8ee3-b69d1cd816b8/documents?perPage=2' \ -H "X-Api-Key: $DOXTLY_API_KEY" -H "X-Api-Secret: $DOXTLY_API_SECRET"{ "items": [ { "id": "01a1ccdd-25af-704e-9e29-6ff7c1559c96", "title": "Engagement letter - Nordvik Marine", "derivedStatus": "in_progress", "completionPercentage": 0, "partyIndicators": [ "CLIENT" ], "isViewer": false, "earlierAddresses": [], "createdAt": "2026-11-12T00:06:47+01:00", "completedAt": null, "contract": null, "change": null }, { "id": "01a1cd4e-2b57-77c3-8b8c-5a90de5ead28", "title": "Engagement letter - Nordvik Marine (fleet safety)", "derivedStatus": "pending", "completionPercentage": 0, "partyIndicators": [ "CLIENT" ], "isViewer": false, "earlierAddresses": [], "createdAt": "2026-11-12T02:10:14+01:00", "completedAt": null, "contract": null, "change": null } ], "meta": { "total": 2, "page": 1, "perPage": 2, "totalPages": 1, "hasMore": false, "hasPrevious": false }}Write a note
Section titled “Write a note”POST/v1/contacts/{id}/notes
Key permission: create_contact_note. Takes body, required, up to 5,000 characters. Returns 201 Created with the note.
curl -X POST 'https://api.doxtly.com/v1/contacts/01a1ce93-2940-779c-9aaa-accf7a544d69/notes' \ -H "X-Api-Key: $DOXTLY_API_KEY" -H "X-Api-Secret: $DOXTLY_API_SECRET" \ -H 'Content-Type: application/json' \ -d '{"body":"Asked for the framework agreement in German and English."}'{ "id": "01a1ce93-2cac-7a02-a12c-f98cf3f0aa83", "body": "Asked for the framework agreement in German and English.", "author": { "kind": "access_key", "name": "CRM sync", "userId": null, "workflowId": null, "workflowExecutionId": null, "accessKeyId": "01a1ce8f-1aa1-73fd-afff-6cf89ba101c8" }, "isOwn": true, "createdAt": "2026-11-12T08:05:14+01:00", "updatedAt": "2026-11-12T08:05:14+01:00"}Change a note
Section titled “Change a note”PATCH/v1/contacts/{id}/notes/{noteId}
Key permission: update_contact_note. Takes body, by the same rules. Returns 200 OK with the note. A key changes only the notes it wrote; another’s answers 403.
curl -X PATCH 'https://api.doxtly.com/v1/contacts/01a1ce93-2940-779c-9aaa-accf7a544d69/notes/01a1ce93-2cac-7a02-a12c-f98cf3f0aa83' \ -H "X-Api-Key: $DOXTLY_API_KEY" -H "X-Api-Secret: $DOXTLY_API_SECRET" \ -H 'Content-Type: application/json' \ -d '{"body":"Asked for the framework agreement in German and English. Sent both on Monday."}'{ "id": "01a1ce93-2cac-7a02-a12c-f98cf3f0aa83", "body": "Asked for the framework agreement in German and English. Sent both on Monday.", "author": { "kind": "access_key", "name": "CRM sync", "userId": null, "workflowId": null, "workflowExecutionId": null, "accessKeyId": "01a1ce8f-1aa1-73fd-afff-6cf89ba101c8" }, "isOwn": true, "createdAt": "2026-11-12T08:05:14+01:00", "updatedAt": "2026-11-12T08:05:14+01:00"}Delete a note
Section titled “Delete a note”DELETE/v1/contacts/{id}/notes/{noteId}
Key permission: delete_contact_note. A key deletes only the notes it wrote; another’s answers 403. Returns 204 No Content.
curl -X DELETE 'https://api.doxtly.com/v1/contacts/01a1ce93-2940-779c-9aaa-accf7a544d69/notes/01a1ce93-2cac-7a02-a12c-f98cf3f0aa83' \ -H "X-Api-Key: $DOXTLY_API_KEY" -H "X-Api-Secret: $DOXTLY_API_SECRET"Read a contact’s history
Section titled “Read a contact’s history”GET/v1/contacts/{id}/history
Key permission: get_contact_history. Returns 200 OK with items, newest first, all at once. A change of a sensitive custom field has sensitive: true, and its before and after are null with hidden: true, unless you add ?sensitive=true with a key that also has read_sensitive_custom_fields. An entry about a personal link is shown only to whoever may view what the link opens: one about a quiz needs the right to view quizzes, and for a key get_quiz_attempts; one about a survey the right to view surveys, and for a key get_survey_responses.
| Field | Type | Meaning |
|---|---|---|
id |
UUID | The entry’s identifier. |
number |
integer | Its place in the contact’s history. |
event |
string | created, updated, note_added, note_edited, note_deleted, address_added, address_removed, link_sent (a personal link was sent to the contact) or link_submitted (the contact sent what it opened). |
actor |
object | kind (user, workflow, access_key, personal_link, the contact filling in a personal link, or crm, a CRM integration when two records were merged in the CRM and the contact’s ID from it changed with them), name, and the userId, workflowId, workflowExecutionId or accessKeyId it was, null once gone. |
changes |
array | Per field: field (firstName, lastName, email, phone, jobTitle, companyName, language, type, photo, note, earlierAddress or customField), before and after. A custom field’s change also has key, sensitive and hidden. |
link |
object or null | For link_sent and link_submitted: personalLinkId, target (form, interactive_document or quiz), targetId and title; for a link to a quiz or a survey also quizMode (quiz or survey) and, for a finished quiz, outcome (score, maxScore, percent, passed, grade). An entry about a quiz is listed only to whoever may view quizzes, one about a survey only to whoever may view surveys. |
createdAt |
time | When it happened. |
curl 'https://api.doxtly.com/v1/contacts/01a1ce93-2940-779c-9aaa-accf7a544d69/history' \ -H "X-Api-Key: $DOXTLY_API_KEY" -H "X-Api-Secret: $DOXTLY_API_SECRET"{ "items": [ { "id": "01a1ce93-2d2b-776c-bd27-0675cad96e03", "number": 6, "event": "note_edited", "actor": { "kind": "access_key", "name": "CRM sync", "userId": null, "workflowId": null, "workflowExecutionId": null, "accessKeyId": "01a1ce8f-1aa1-73fd-afff-6cf89ba101c8" }, "changes": [ { "field": "note", "before": "Asked for the framework agreement in German and English.", "after": "Asked for the framework agreement in German and English. Sent both on Monday." } ], "createdAt": "2026-11-12T08:05:14+01:00", "link": null }, { "id": "01a1ce93-2cad-7ce9-991d-64e1ef5b232f", "number": 5, "event": "note_added", "actor": { "kind": "access_key", "name": "CRM sync", "userId": null, "workflowId": null, "workflowExecutionId": null, "accessKeyId": "01a1ce8f-1aa1-73fd-afff-6cf89ba101c8" }, "changes": [ { "field": "note", "before": null, "after": "Asked for the framework agreement in German and English." } ], "createdAt": "2026-11-12T08:05:14+01:00", "link": null }, { "id": "01a1ce93-2ba8-7aeb-befd-2c8d9fe1d336", "number": 4, "event": "updated", "actor": { "kind": "access_key", "name": "CRM sync", "userId": null, "workflowId": null, "workflowExecutionId": null, "accessKeyId": "01a1ce8f-1aa1-73fd-afff-6cf89ba101c8" }, "changes": [ { "field": "photo", "before": null, "after": "01a1ce93-2ba7-79f9-873c-0972c7446228" } ], "createdAt": "2026-11-12T08:05:13+01:00", "link": null } ]}Shortened: each list shows its first items.