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. |
onSuccessSetIsDefault | any | No | If an id is given, and all creates, updates and destroys succeed without error, the server tries to set this AddressBook as the default; a creation reference uses the creation id prefixed with #. An id not found, or a change the server does not permit, is ignored with no error (RFC 9610 section 2.3). |
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/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. |