Thread
Thread/get
Section titled “Thread/get”Capability: urn:ietf:params:jmap:mail
Arguments
| Property | Type | Required | Description |
|---|---|---|---|
accountId | AccountId | Yes | The account to fetch threads from. |
ids | ThreadId[] | No | IDs of specific threads to fetch. |
properties | string[] | No | Thread properties to include. Omit for all properties. |
Response
| Property | Type | Required | Description |
|---|---|---|---|
accountId | AccountId | Yes | The account the threads belong to. |
state | string | Yes | The current state of the Thread type. |
list | any[] | Yes | The list of Thread objects that were found. |
notFound | ThreadId[] | No | IDs from the request that could not be found. |
Thread/query
Section titled “Thread/query”Capability: urn:ietf:params:jmap:mail
Arguments
| Property | Type | Required | Description |
|---|---|---|---|
accountId | AccountId | Yes | The account to query threads in. |
filter | object? | No | Conditions to filter threads. See RFC 8621 for filter conditions. |
sort | array? | No | List of Comparator objects specifying sort order. |
position | integer? | No | Zero-based index of first result to return. |
anchor | Id | No | Id of an item to anchor the result window on. |
anchorOffset | integer? | No | Offset relative to the anchor. |
limit | integer? | No | Maximum number of ids to return. |
calculateTotal | boolean? | No | If true, return total count of results. |
Response
| Property | Type | Required | Description |
|---|---|---|---|
accountId | AccountId | Yes | The account the query was run against. |
queryState | string | Yes | Server state string for this query result. |
canCalculateChanges | boolean | Yes | Whether the server can calculate query changes. |
position | integer | Yes | Zero-based index of the first result in ids. |
ids | Id[] | Yes | The Thread ids in the requested window. |
total | integer? | No | Total number of results (if calculateTotal was true). |
limit | integer? | No | The limit applied to this query. |
Thread/changes
Section titled “Thread/changes”Capability: urn:ietf:params:jmap:mail
Arguments
| Property | Type | Required | Description |
|---|---|---|---|
accountId | AccountId | Yes | The account to get Thread changes for. |
sinceState | string | Yes | The state to get changes since. |
maxChanges | integer? | No | Maximum number of changes to return. |
Response
| Property | Type | Required | Description |
|---|---|---|---|
accountId | AccountId | Yes | The account these changes are for. |
oldState | string | Yes | The sinceState value passed in the request. |
newState | string | Yes | The current Thread state after these changes. |
hasMoreChanges | boolean | Yes | If true, more changes exist beyond maxChanges; make another call with newState as sinceState. |
created | Id[] | Yes | Thread ids created since sinceState. |
updated | Id[] | Yes | Thread ids updated since sinceState. |
destroyed | Id[] | Yes | Thread ids destroyed since sinceState. |