Skip to content

Thread

Capability: urn:ietf:params:jmap:mail

Arguments

PropertyTypeRequiredDescription
accountIdAccountIdYesThe account to fetch threads from.
idsThreadId[]NoIDs of specific threads to fetch.
propertiesstring[]NoThread properties to include. Omit for all properties.

Response

PropertyTypeRequiredDescription
accountIdAccountIdYesThe account the threads belong to.
statestringYesThe current state of the Thread type.
listany[]YesThe list of Thread objects that were found.
notFoundThreadId[]NoIDs from the request that could not be found.

Capability: urn:ietf:params:jmap:mail

Arguments

PropertyTypeRequiredDescription
accountIdAccountIdYesThe account to query threads in.
filterobject?NoConditions to filter threads. See RFC 8621 for filter conditions.
sortarray?NoList of Comparator objects specifying sort order.
positioninteger?NoZero-based index of first result to return.
anchorIdNoId of an item to anchor the result window on.
anchorOffsetinteger?NoOffset relative to the anchor.
limitinteger?NoMaximum number of ids to return.
calculateTotalboolean?NoIf true, return total count of results.
pageTokenstring?NoOpaque 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

PropertyTypeRequiredDescription
accountIdAccountIdYesThe account the query was run against.
queryStatestringYesServer state string for this query result.
canCalculateChangesbooleanYesWhether the server can calculate query changes.
positionintegerYesZero-based index of the first result in ids.
idsId[]YesThe Thread ids in the requested window.
totalinteger?NoTotal number of results (if calculateTotal was true).
limitinteger?NoThe limit applied to this query.
pageTokenstring?NoOpaque cursor for the next page of results. null or absent means this is the last page. See https://specs.serverlessinbox.com/page-token

Capability: urn:ietf:params:jmap:mail

Arguments

PropertyTypeRequiredDescription
accountIdAccountIdYesThe account to get Thread changes for.
sinceStatestringYesThe state to get changes since.
maxChangesinteger?NoMaximum number of changes to return.

Response

PropertyTypeRequiredDescription
accountIdAccountIdYesThe account these changes are for.
oldStatestringYesThe sinceState value passed in the request.
newStatestringYesThe current Thread state after these changes.
hasMoreChangesbooleanYesIf true, more changes exist beyond maxChanges; make another call with newState as sinceState.
createdId[]YesThread ids created since sinceState.
updatedId[]YesThread ids updated since sinceState.
destroyedId[]YesThread ids destroyed since sinceState.

Capability: urn:ietf:params:jmap:mail

Arguments

PropertyTypeRequiredDescription
accountIdAccountIdYesThe account to check for query changes.
filterobject?NoMust match the filter used in the original Thread/query call.
sortarray?NoMust match the sort used in the original Thread/query call.
sinceQueryStatestringYesThe queryState from the previous Thread/query or Thread/queryChanges response.
maxChangesintegerNoMaximum number of changes to return. If exceeded, hasMoreChanges will be true.
upToIdThreadIdNoReturn changes only up to and including this ThreadId.
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 Thread/queryChanges call.
hasMoreChangesbooleanYesIf true, more changes exist beyond maxChanges. Call again with newQueryState.
removedThreadId[]YesThreadIds that are no longer in the query result set.
addedobject[]YesThreads that are now in the result set, with their new positions.
totalintegerNoUpdated total count of results (if calculateTotal was true in the original query).
upToIdThreadIdNoEchoes the upToId from the request, if provided.