Skip to content

ContactCard

Capability: urn:ietf:params:jmap:contacts

Accepts result references: #ids from ContactCard/query (path /ids)

Arguments

PropertyTypeRequiredDescription
accountIdAccountIdYesThe account to fetch contact cards from.
idsanyNoIDs of specific contact cards to fetch. Null or omitted to fetch all contact cards.
propertiesanyNoContactCard properties to include in the response. Null or omitted for all properties.

Response

PropertyTypeRequiredDescription
accountIdAccountIdYesThe account the contact cards belong to.
statestringYesThe current state of the ContactCard type. Pass to ContactCard/changes to detect future changes.
listContactCard[]YesThe list of ContactCard 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 ContactCard state differs.
createobject?NoMap of client-assigned creation ids to ContactCardCreate objects.
updateobject?NoMap of ContactCardId to PatchObject. Only explicitly listed properties are changed.
destroyarray?NoContactCardIds to delete.

Response

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

Capability: urn:ietf:params:jmap:contacts

Provides result references: /ids

Arguments

PropertyTypeRequiredDescription
accountIdAccountIdYesThe account to query contact cards from.
filterobject?NoFilter conditions. Supported properties: inAddressBook (AddressBookId), uid (String), hasMember (String), kind (String), createdBefore/createdAfter (UTCDate), updatedBefore/updatedAfter (UTCDate), text/name/nickname/organization/email/phone/onlineService/address/note (String).
sortarray?NoSort criteria. Each Comparator has a property (e.g. nickname, created, updated) and optional isAscending (default true).
positionintegerNo0-based index of the first result to return.
anchorContactCardIdNoA ContactCardId 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 contact cards.

Response

PropertyTypeRequiredDescription
accountIdAccountIdYesThe account the query ran against.
queryStatestringYesOpaque state string. Pass to ContactCard/queryChanges to detect future changes.
canCalculateChangesbooleanYesWhether ContactCard/queryChanges can be used with this query.
positionintegerYes0-based index of the first id in the ids array.
idsContactCardId[]YesThe matching ContactCardIds in the requested order.
totalintegerNoTotal number of matching contact cards. 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 ContactCard/query call.
sortarray?NoMust match the sort used in the original ContactCard/query call.
sinceQueryStatestringYesThe queryState from the previous ContactCard/query or ContactCard/queryChanges response.
maxChangesintegerNoMaximum number of changes to return. If exceeded, hasMoreChanges will be true.
upToIdContactCardIdNoReturn changes only up to and including this ContactCardId.
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 ContactCard/queryChanges call.
hasMoreChangesbooleanYesIf true, more changes exist beyond maxChanges. Call again with newQueryState.
removedContactCardId[]YesContactCardIds that are no longer in the query result set.
addedobject[]YesContact cards 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 contact card changes for.
sinceStatestringYesThe state string from the last ContactCard/get or ContactCard/changes response.
maxChangesintegerNoMaximum number of change records to return. If exceeded, hasMoreChanges will be true.

Response

PropertyTypeRequiredDescription
accountIdAccountIdYesThe account these contact card 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.
createdContactCardId[]YesIDs of contact cards created since sinceState.
updatedContactCardId[]YesIDs of contact cards whose properties changed since sinceState.
destroyedContactCardId[]YesIDs of contact cards destroyed since sinceState.

Capability: urn:ietf:params:jmap:contacts

Arguments

PropertyTypeRequiredDescription
fromAccountIdAccountIdYesThe account to copy contact cards from.
ifFromInStatestring?NoOptimistic concurrency guard on the source ContactCard state.
accountIdAccountIdYesThe account to copy contact cards into.
ifInStatestring?NoOptimistic concurrency guard on the destination ContactCard state.
createobjectYesMap of client-assigned creation ids to objects describing the copy.
onSuccessDestroyOriginalboolean?NoIf true, destroy original contact cards on success. Default: false.
destroyFromIfInStatestring?NoGuard on source state when destroying originals.

Response

PropertyTypeRequiredDescription
fromAccountIdAccountIdYesThe source account.
accountIdAccountIdYesThe destination account.
oldStatestring?NoThe ContactCard state in the destination account before this operation.
newStatestring?NoThe ContactCard state in the destination account after this operation.
createdobject?NoSuccessfully copied contact cards, keyed by client creation id.
notCreatedobject?NoCreation ids that failed, with a SetError.