EmailSubmission
EmailSubmission/get
Section titled “EmailSubmission/get”Capability: urn:ietf:params:jmap:submission
Arguments
| Property | Type | Required | Description |
|---|---|---|---|
accountId | AccountId | Yes | The account to fetch EmailSubmission objects from. |
ids | array? | No | Submission ids to fetch. If null, returns all. |
properties | array? | No | EmailSubmission properties to return. Defaults to all properties. |
Response
| Property | Type | Required | Description |
|---|---|---|---|
accountId | AccountId | Yes | The account the EmailSubmission objects belong to. |
state | string | Yes | Current EmailSubmission state, used in subsequent /changes calls. |
list | EmailSubmission[] | Yes | The requested EmailSubmission objects. |
notFound | array? | No | Ids that were not found. |
EmailSubmission/set
Section titled “EmailSubmission/set”Capability: urn:ietf:params:jmap:submission
Arguments
| Property | Type | Required | Description |
|---|---|---|---|
accountId | AccountId | Yes | The account to create, update, or destroy EmailSubmission objects in. |
ifInState | string? | No | Optimistic concurrency guard on EmailSubmission state. |
create | object? | No | Map of creation id to EmailSubmissionCreate objects. |
update | object? | No | Map of submission id to patch objects (RFC 8620 §5.3 patch). |
destroy | array? | No | Ids of EmailSubmission objects to destroy. |
onSuccessUpdateEmail | object? | No | Map of submission id (or creation id reference) to Email patch applied on successful send. |
onSuccessDestroyEmail | array? | No | List of submission ids (or creation id references) whose associated Emails should be destroyed on successful send. |
Response
| Property | Type | Required | Description |
|---|---|---|---|
accountId | AccountId | Yes | The account the set operation was performed on. |
oldState | string? | Yes | The EmailSubmission state before this call, or null if no prior state existed. |
newState | string | Yes | The EmailSubmission state after this call. |
created | object? | No | Map of creation id to the created EmailSubmission object. |
updated | object? | No | Map of id to the updated EmailSubmission object (or null if unchanged properties were not returned). |
destroyed | array? | No | Ids of EmailSubmission objects that were successfully destroyed. |
notCreated | object? | No | Map of creation id to SetError for each failed create. |
notUpdated | object? | No | Map of id to SetError for each failed update. |
notDestroyed | object? | No | Map of id to SetError for each failed destroy. |
EmailSubmission/query
Section titled “EmailSubmission/query”Capability: urn:ietf:params:jmap:submission
Arguments
| Property | Type | Required | Description |
|---|---|---|---|
accountId | AccountId | Yes | The account to query EmailSubmission objects in. |
filter | object? | No | Conditions to filter EmailSubmission objects. |
sort | array? | No | List of Comparator objects specifying the sort order. |
position | integer? | No | Zero-based index of the 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 the 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 EmailSubmission 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. |
EmailSubmission/queryChanges
Section titled “EmailSubmission/queryChanges”Capability: urn:ietf:params:jmap:submission
Arguments
| Property | Type | Required | Description |
|---|---|---|---|
accountId | AccountId | Yes | The account to get EmailSubmission query changes for. |
filter | object? | No | Must match the filter used in the original query. |
sort | array? | No | Must match the sort used in the original query. |
sinceQueryState | string | Yes | The queryState to get changes since. |
maxChanges | integer? | No | Maximum number of changes to return. |
upToId | Id | No | Stop reporting changes after this id. |
calculateTotal | boolean? | No | If true, return the new total count of query results. |
Response
| Property | Type | Required | Description |
|---|---|---|---|
accountId | AccountId | Yes | The account the query changes are for. |
oldQueryState | string | Yes | The sinceQueryState value passed in the request. |
newQueryState | string | Yes | The current query state after these changes. |
total | integer? | No | New total number of results (if calculateTotal was true). |
removed | Id[] | Yes | Ids removed from the query results. |
added | object[] | Yes | Items added to the query results with their new index. |
EmailSubmission/changes
Section titled “EmailSubmission/changes”Capability: urn:ietf:params:jmap:submission
Arguments
| Property | Type | Required | Description |
|---|---|---|---|
accountId | AccountId | Yes | The account to get EmailSubmission 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 EmailSubmission state after these changes. |
hasMoreChanges | boolean | Yes | If true, more changes exist beyond maxChanges; make another call with newState as sinceState. |
created | Id[] | Yes | EmailSubmission ids created since sinceState. |
updated | Id[] | Yes | EmailSubmission ids updated since sinceState. |
destroyed | Id[] | Yes | EmailSubmission ids destroyed since sinceState. |