AddressBook
AddressBook/get
Section titled “AddressBook/get”Capability: urn:ietf:params:jmap:contacts
Arguments
| Property | Type | Required | Description |
|---|---|---|---|
accountId | AccountId | Yes | The account to fetch address books from. |
ids | any | No | IDs of specific address books to fetch. Null or omitted to fetch all address books. |
properties | any | No | AddressBook properties to include in the response. Null or omitted for all properties. |
Response
| Property | Type | Required | Description |
|---|---|---|---|
accountId | AccountId | Yes | The account the address books belong to. |
state | string | Yes | The current state of the AddressBook type. Pass to AddressBook/changes to detect future changes. |
list | AddressBook[] | Yes | The list of AddressBook objects that were found. |
notFound | string[] | Yes | IDs from the request that could not be found. |
AddressBook/set
Section titled “AddressBook/set”Capability: urn:ietf:params:jmap:contacts
Arguments
| Property | Type | Required | Description |
|---|---|---|---|
accountId | AccountId | Yes | The account to apply changes to. |
ifInState | string? | No | Optimistic concurrency guard. Fails with stateMismatch if the AddressBook state differs. |
create | object? | No | Map of client-assigned creation ids to AddressBookCreate objects. |
update | object? | No | Map of AddressBookId to PatchObject. Only explicitly listed properties are changed. |
destroy | array? | No | AddressBookIds to delete. |
onDestroyRemoveContents | boolean | No | If true, also destroy all ContactCards in the address book. Default false. |
Response
| Property | Type | Required | Description |
|---|---|---|---|
accountId | AccountId | Yes | The account the changes were applied to. |
oldState | string? | No | The AddressBook state before this set, or null if the server cannot calculate it. |
newState | string | Yes | The AddressBook state after this set. |
created | object? | No | Successfully created address books, keyed by client creation id. |
updated | object? | No | Map of successfully updated AddressBookId to the updated object (or null if unchanged properties are not returned). |
destroyed | any | No | AddressBookIds that were successfully destroyed. |
notCreated | object? | No | Creation ids that failed, with a SetError. |
notUpdated | object? | No | AddressBookIds that failed to update, with a SetError. |
notDestroyed | object? | No | AddressBookIds that failed to destroy, with a SetError. |
AddressBook/query
Section titled “AddressBook/query”Capability: urn:ietf:params:jmap:contacts
Arguments
| Property | Type | Required | Description |
|---|---|---|---|
accountId | AccountId | Yes | The account to query address books from. |
filter | object? | No | Filter conditions. Supported properties: isSubscribed (Boolean). |
sort | array? | No | Sort criteria. Each Comparator has a property (e.g. name) and optional isAscending (default true). |
position | integer | No | 0-based index of the first result to return. |
anchor | AddressBookId | No | An AddressBookId to anchor the result page at. |
anchorOffset | integer | No | Offset from the anchor (may be negative). |
limit | integer | No | Maximum number of ids to return. |
calculateTotal | boolean | No | If true, return the total number of matching address books. |
Response
| Property | Type | Required | Description |
|---|---|---|---|
accountId | AccountId | Yes | The account the query ran against. |
queryState | string | Yes | Opaque state string. Pass to AddressBook/queryChanges to detect future changes. |
canCalculateChanges | boolean | Yes | Whether AddressBook/queryChanges can be used with this query. |
position | integer | Yes | 0-based index of the first id in the ids array. |
ids | AddressBookId[] | Yes | The matching AddressBookIds in the requested order. |
total | integer | No | Total number of matching address books. Only present if calculateTotal was true. |
limit | integer | No | The limit applied. Only present if a limit was applied. |
AddressBook/queryChanges
Section titled “AddressBook/queryChanges”Capability: urn:ietf:params:jmap:contacts
Arguments
| Property | Type | Required | Description |
|---|---|---|---|
accountId | AccountId | Yes | The account to check for query changes. |
filter | object? | No | Must match the filter used in the original AddressBook/query call. |
sort | array? | No | Must match the sort used in the original AddressBook/query call. |
sinceQueryState | string | Yes | The queryState from the previous AddressBook/query or AddressBook/queryChanges response. |
maxChanges | integer | No | Maximum number of changes to return. If exceeded, hasMoreChanges will be true. |
upToId | AddressBookId | No | Return changes only up to and including this AddressBookId. |
calculateTotal | boolean | No | If true, return the updated total count of results. |
Response
| Property | Type | Required | Description |
|---|---|---|---|
accountId | AccountId | Yes | The account these query changes belong to. |
oldQueryState | string | Yes | The queryState this response starts from (matches sinceQueryState from request). |
newQueryState | string | Yes | The current queryState. Pass to the next AddressBook/queryChanges call. |
hasMoreChanges | boolean | Yes | If true, more changes exist beyond maxChanges. Call again with newQueryState. |
removed | AddressBookId[] | Yes | AddressBookIds that are no longer in the query result set. |
added | object[] | Yes | Address books that are now in the result set, with their new positions. |
total | integer | No | Updated total count of results (if calculateTotal was true in the original query). |
AddressBook/changes
Section titled “AddressBook/changes”Capability: urn:ietf:params:jmap:contacts
Arguments
| Property | Type | Required | Description |
|---|---|---|---|
accountId | AccountId | Yes | The account to fetch address book changes for. |
sinceState | string | Yes | The state string from the last AddressBook/get or AddressBook/changes response. |
maxChanges | integer | No | Maximum number of change records to return. If exceeded, hasMoreChanges will be true. |
Response
| Property | Type | Required | Description |
|---|---|---|---|
accountId | AccountId | Yes | The account these address book changes belong to. |
oldState | string | Yes | The state this response starts from. |
newState | string | Yes | The current state after all listed changes; pass to the next call. |
hasMoreChanges | boolean | Yes | If true, additional changes exist beyond maxChanges. Call again with newState. |
created | AddressBookId[] | Yes | IDs of address books created since sinceState. |
updated | AddressBookId[] | Yes | IDs of address books whose properties changed since sinceState. |
destroyed | AddressBookId[] | Yes | IDs of address books destroyed since sinceState. |