SDK reference
Contacts
GET/
The mailbox's address books, default first. The default address book is created on first use.
Parameters and answerscurl 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/address-books' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
Creates an address book (at most 20 per mailbox).
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/address-books' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"name": {}
}'PATCH/
Renames an address book.
Parameters and answerscurl -X PATCH 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/address-books/{addressBookId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"name": {}
}'DELETE/
Deletes an address book and its contacts. The default address book can't be deleted.
Parameters and answerscurl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/address-books/{addressBookId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
Contacts by name across the mailbox's address books, or one. q matches names, emails, phone numbers and organizations; every word must match. Pages with cursor.
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/contacts' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
The mailbox's contacts at a glance: how many, their labels with counts, and birthdays in the next days days from today (the reader's date).
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/contacts/summary' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
Contacts that look like the same person (a shared email, phone number or full name), fullest first in each group.
Parameters and answerscurl 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/contacts/duplicates' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
The people the mailbox writes to most (its recent sent mail), with their contacts. Needs mail:read as well.
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/contacts/frequent' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
Merges contacts into one (keep): blank fields filled, every distinct email, phone, address and label kept; the others are deleted.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/contacts/merge' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"keep": {
"addressBookId": "<addressBookId>",
"contactId": "<contactId>"
},
"merge": [
{
"addressBookId": "<addressBookId>",
"contactId": "<contactId>"
}
]
}'POST/
One change to many contacts: add or remove labels, move to another address book, or delete.
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/contacts/bulk' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"contacts": [
{
"addressBookId": "<addressBookId>",
"contactId": "<contactId>"
}
]
}'PATCH/
Renames a label on every contact that has it.
Parameters and answerscurl -X PATCH 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/contacts/labels/{label}' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"name": {}
}'DELETE/
Removes a label from every contact (the contacts stay).
Parameters and answerscurl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/contacts/labels/{label}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
Contacts with an email address across the person's mailboxes in the org (or one, mailboxId): Mail's sender cards and Customers' "In Contacts". Mailboxes they aren't a member of are never read.
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/contacts/lookup?email=person%40example.com' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
Creates a contact. It needs a name, organization, email or phone number.
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/address-books/{addressBookId}/contacts' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"fullName": {},
"name": {
"family": "",
"given": "",
"additional": ""
},
"nickname": {}
}'GET/
A contact.
Parameters and answerscurl 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/address-books/{addressBookId}/contacts/{contactId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"PUT/
Changes a contact. Fields left out keep their value; an empty birthday or anniversary clears it.
curl -X PUT 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/address-books/{addressBookId}/contacts/{contactId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"fullName": {},
"name": {
"family": "",
"given": "",
"additional": ""
},
"nickname": {}
}'DELETE/
Deletes a contact and its photo.
Parameters and answerscurl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/address-books/{addressBookId}/contacts/{contactId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
A short-lived link to the contact's photo.
Parameters and answerscurl 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/address-books/{addressBookId}/contacts/{contactId}/photo' \
-H "Authorization: Bearer $CACTIVE_TOKEN"PUT/
Sets the contact's photo: a JPEG, PNG, GIF or WebP image of at most 1 MB, base64-encoded.
Parameters and answerscurl -X PUT 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/address-books/{addressBookId}/contacts/{contactId}/photo' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"contentType": "image/jpeg",
"data": "example"
}'DELETE/
Removes the contact's photo.
Parameters and answerscurl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/address-books/{addressBookId}/contacts/{contactId}/photo' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
Adds the contacts in a vCard file (3.0 or 4.0), photos included; contacts whose UID is already in the address book are replaced.
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/address-books/{addressBookId}/import' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"vcf": "example"
}'GET/
The address book as a vCard file, version 4.0 or 3.0.
Parameters and answerscurl 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/address-books/{addressBookId}/export' \
-H "Authorization: Bearer $CACTIVE_TOKEN"