SDK reference

Contacts

Each route's function in the SDK, its call beside the same request in cURL.
orgMailMailboxesAddressBooks

GET/v1/orgs/:orgId/mail/mailboxes/:mailboxId/address-books

The mailbox's address books, default first. The default address book is created on first use.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/address-books' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postOrgMailMailboxesAddressBooks

POST/v1/orgs/:orgId/mail/mailboxes/:mailboxId/address-books

Creates an address book (at most 20 per mailbox).

Parameters and answers
curl -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": {}
  }'
patchOrgMailMailboxesAddressBooksByAddressBookId

PATCH/v1/orgs/:orgId/mail/mailboxes/:mailboxId/address-books/:addressBookId

Renames an address book.

Parameters and answers
curl -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": {}
  }'
deleteOrgMailMailboxesAddressBooksByAddressBookId

DELETE/v1/orgs/:orgId/mail/mailboxes/:mailboxId/address-books/:addressBookId

Deletes an address book and its contacts. The default address book can't be deleted.

Parameters and answers
curl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/address-books/{addressBookId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
orgMailMailboxesContacts

GET/v1/orgs/:orgId/mail/mailboxes/:mailboxId/contacts

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.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/contacts' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
orgMailMailboxesContactsSummary

GET/v1/orgs/:orgId/mail/mailboxes/:mailboxId/contacts/summary

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).

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/contacts/summary' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
orgMailMailboxesContactsDuplicates

GET/v1/orgs/:orgId/mail/mailboxes/:mailboxId/contacts/duplicates

Contacts that look like the same person (a shared email, phone number or full name), fullest first in each group.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/contacts/duplicates' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
orgMailMailboxesContactsFrequent

GET/v1/orgs/:orgId/mail/mailboxes/:mailboxId/contacts/frequent

The people the mailbox writes to most (its recent sent mail), with their contacts. Needs mail:read as well.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/contacts/frequent' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postOrgMailMailboxesContactsMerge

POST/v1/orgs/:orgId/mail/mailboxes/:mailboxId/contacts/merge

Merges contacts into one (keep): blank fields filled, every distinct email, phone, address and label kept; the others are deleted.

Parameters and answers
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>"
      }
    ]
  }'
postOrgMailMailboxesContactsBulk

POST/v1/orgs/:orgId/mail/mailboxes/:mailboxId/contacts/bulk

One change to many contacts: add or remove labels, move to another address book, or delete.

Parameters and answers
curl -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>"
      }
    ]
  }'
patchOrgMailMailboxesContactsLabelsByLabel

PATCH/v1/orgs/:orgId/mail/mailboxes/:mailboxId/contacts/labels/:label

Renames a label on every contact that has it.

Parameters and answers
curl -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": {}
  }'
deleteOrgMailMailboxesContactsLabelsByLabel

DELETE/v1/orgs/:orgId/mail/mailboxes/:mailboxId/contacts/labels/:label

Removes a label from every contact (the contacts stay).

Parameters and answers
curl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/contacts/labels/{label}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
orgMailContactsLookup

GET/v1/orgs/:orgId/mail/contacts/lookup

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.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/contacts/lookup?email=person%40example.com' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postOrgMailMailboxesAddressBooksContacts

POST/v1/orgs/:orgId/mail/mailboxes/:mailboxId/address-books/:addressBookId/contacts

Creates a contact. It needs a name, organization, email or phone number.

Parameters and answers
curl -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": {}
  }'
orgMailMailboxesAddressBooksContactsByContactId

GET/v1/orgs/:orgId/mail/mailboxes/:mailboxId/address-books/:addressBookId/contacts/:contactId

A contact.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/address-books/{addressBookId}/contacts/{contactId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
putOrgMailMailboxesAddressBooksContactsByContactId

PUT/v1/orgs/:orgId/mail/mailboxes/:mailboxId/address-books/:addressBookId/contacts/:contactId

Changes a contact. Fields left out keep their value; an empty birthday or anniversary clears it.

Parameters and answers
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": {}
  }'
deleteOrgMailMailboxesAddressBooksContactsByContactId

DELETE/v1/orgs/:orgId/mail/mailboxes/:mailboxId/address-books/:addressBookId/contacts/:contactId

Deletes a contact and its photo.

Parameters and answers
curl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/address-books/{addressBookId}/contacts/{contactId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
orgMailMailboxesAddressBooksContactsPhoto

GET/v1/orgs/:orgId/mail/mailboxes/:mailboxId/address-books/:addressBookId/contacts/:contactId/photo

A short-lived link to the contact's photo.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/address-books/{addressBookId}/contacts/{contactId}/photo' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
putOrgMailMailboxesAddressBooksContactsPhoto

PUT/v1/orgs/:orgId/mail/mailboxes/:mailboxId/address-books/:addressBookId/contacts/:contactId/photo

Sets the contact's photo: a JPEG, PNG, GIF or WebP image of at most 1 MB, base64-encoded.

Parameters and answers
curl -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"
  }'
deleteOrgMailMailboxesAddressBooksContactsPhoto

DELETE/v1/orgs/:orgId/mail/mailboxes/:mailboxId/address-books/:addressBookId/contacts/:contactId/photo

Removes the contact's photo.

Parameters and answers
curl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/address-books/{addressBookId}/contacts/{contactId}/photo' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postOrgMailMailboxesAddressBooksImport

POST/v1/orgs/:orgId/mail/mailboxes/:mailboxId/address-books/:addressBookId/import

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 answers
curl -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"
  }'
orgMailMailboxesAddressBooksExport

GET/v1/orgs/:orgId/mail/mailboxes/:mailboxId/address-books/:addressBookId/export

The address book as a vCard file, version 4.0 or 3.0.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/address-books/{addressBookId}/export' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"