Skip to content

AddressBook

Capability: urn:ietf:params:jmap:contacts

Arguments

PropertyTypeRequiredDescription
accountIdAccountIdYesThe account to fetch address books from.
idsanyNoIDs of specific address books to fetch. Null or omitted to fetch all address books.
propertiesanyNoAddressBook properties to include in the response. Null or omitted for all properties.

Response

PropertyTypeRequiredDescription
accountIdAccountIdYesThe account the address books belong to.
statestringYesThe current state of the AddressBook type. Pass to AddressBook/changes to detect future changes.
listAddressBook[]YesThe list of AddressBook objects that were found.
notFoundstring[]YesIDs from the request that could not be found.

Capability: urn:ietf:params:jmap:contacts

Arguments

PropertyTypeRequiredDescription
accountIdAccountIdYesThe account to apply changes to.
ifInStatestring?NoOptimistic concurrency guard. Fails with stateMismatch if the AddressBook state differs.
createobject?NoMap of client-assigned creation ids to AddressBookCreate objects.
updateobject?NoMap of AddressBookId to PatchObject. Only explicitly listed properties are changed.
destroyarray?NoAddressBookIds to delete.
onDestroyRemoveContentsbooleanNoIf true, also destroy all ContactCards in the address book. Default false.

Response

PropertyTypeRequiredDescription
accountIdAccountIdYesThe account the changes were applied to.
oldStatestring?NoThe AddressBook state before this set, or null if the server cannot calculate it.
newStatestringYesThe AddressBook state after this set.
createdobject?NoSuccessfully created address books, keyed by client creation id.
updatedobject?NoMap of successfully updated AddressBookId to the updated object (or null if unchanged properties are not returned).
destroyedanyNoAddressBookIds that were successfully destroyed.
notCreatedobject?NoCreation ids that failed, with a SetError.
notUpdatedobject?NoAddressBookIds that failed to update, with a SetError.
notDestroyedobject?NoAddressBookIds that failed to destroy, with a SetError.

Capability: urn:ietf:params:jmap:contacts

Arguments

PropertyTypeRequiredDescription
accountIdAccountIdYesThe account to query address books from.
filterobject?NoFilter conditions. Supported properties: isSubscribed (Boolean).
sortarray?NoSort criteria. Each Comparator has a property (e.g. name) and optional isAscending (default true).
positionintegerNo0-based index of the first result to return.
anchorAddressBookIdNoAn AddressBookId to anchor the result page at.
anchorOffsetintegerNoOffset from the anchor (may be negative).
limitintegerNoMaximum number of ids to return.
calculateTotalbooleanNoIf true, return the total number of matching address books.

Response

PropertyTypeRequiredDescription
accountIdAccountIdYesThe account the query ran against.
queryStatestringYesOpaque state string. Pass to AddressBook/queryChanges to detect future changes.
canCalculateChangesbooleanYesWhether AddressBook/queryChanges can be used with this query.
positionintegerYes0-based index of the first id in the ids array.
idsAddressBookId[]YesThe matching AddressBookIds in the requested order.
totalintegerNoTotal number of matching address books. Only present if calculateTotal was true.
limitintegerNoThe limit applied. Only present if a limit was applied.

Capability: urn:ietf:params:jmap:contacts

Arguments

PropertyTypeRequiredDescription
accountIdAccountIdYesThe account to check for query changes.
filterobject?NoMust match the filter used in the original AddressBook/query call.
sortarray?NoMust match the sort used in the original AddressBook/query call.
sinceQueryStatestringYesThe queryState from the previous AddressBook/query or AddressBook/queryChanges response.
maxChangesintegerNoMaximum number of changes to return. If exceeded, hasMoreChanges will be true.
upToIdAddressBookIdNoReturn changes only up to and including this AddressBookId.
calculateTotalbooleanNoIf true, return the updated total count of results.

Response

PropertyTypeRequiredDescription
accountIdAccountIdYesThe account these query changes belong to.
oldQueryStatestringYesThe queryState this response starts from (matches sinceQueryState from request).
newQueryStatestringYesThe current queryState. Pass to the next AddressBook/queryChanges call.
hasMoreChangesbooleanYesIf true, more changes exist beyond maxChanges. Call again with newQueryState.
removedAddressBookId[]YesAddressBookIds that are no longer in the query result set.
addedobject[]YesAddress books that are now in the result set, with their new positions.
totalintegerNoUpdated total count of results (if calculateTotal was true in the original query).

Capability: urn:ietf:params:jmap:contacts

Arguments

PropertyTypeRequiredDescription
accountIdAccountIdYesThe account to fetch address book changes for.
sinceStatestringYesThe state string from the last AddressBook/get or AddressBook/changes response.
maxChangesintegerNoMaximum number of change records to return. If exceeded, hasMoreChanges will be true.

Response

PropertyTypeRequiredDescription
accountIdAccountIdYesThe account these address book changes belong to.
oldStatestringYesThe state this response starts from.
newStatestringYesThe current state after all listed changes; pass to the next call.
hasMoreChangesbooleanYesIf true, additional changes exist beyond maxChanges. Call again with newState.
createdAddressBookId[]YesIDs of address books created since sinceState.
updatedAddressBookId[]YesIDs of address books whose properties changed since sinceState.
destroyedAddressBookId[]YesIDs of address books destroyed since sinceState.