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. |
pageToken | string? | No | Opaque cursor returned by a previous Thread/query response. Pass to retrieve the next page of results. Mutually exclusive with position and anchor. See https://specs.serverlessinbox.com/page-token |
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. |
pageToken | string? | No | Opaque cursor for the next page of results. null or absent means this is the last page. See https://specs.serverlessinbox.com/page-token |
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. |
Thread/queryChanges
Section titled “Thread/queryChanges”Capability: urn:ietf:params:jmap:mail
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 Thread/query call. |
sort | array? | No | Must match the sort used in the original Thread/query call. |
sinceQueryState | string | Yes | The queryState from the previous Thread/query or Thread/queryChanges response. |
maxChanges | integer | No | Maximum number of changes to return. If exceeded, hasMoreChanges will be true. |
upToId | ThreadId | No | Return changes only up to and including this ThreadId. |
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 Thread/queryChanges call. |
hasMoreChanges | boolean | Yes | If true, more changes exist beyond maxChanges. Call again with newQueryState. |
removed | ThreadId[] | Yes | ThreadIds that are no longer in the query result set. |
added | object[] | Yes | Threads 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). |
upToId | ThreadId | No | Echoes the upToId from the request, if provided. |