Agent Email
Send an approved email draft
POST /v1/agent-email/drafts/{draftId}/send · SDK sendAgentEmailDraft · CLI deployments draft send
POST
Requires agent-email:write.
platformBearerheader
AuthorizationBearer <token>Platform bearer credential accepted as an opaque API key or JWT.
draftId*stringMatch
^[0-7][0-9A-HJKMNP-TV-Z]{25}$x-deployments-environment*stringMatch
^[0-7][0-9A-HJKMNP-TV-Z]{25}$idempotency-key*stringLength
1 <= length <= 512AgentEmailMessageResponse
application/json- response
acceptedAt?stringMatch
^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$Format
date-timeattachments*array<>bccAddresses*array<>Items
items <= 100ccAddresses*array<>Items
items <= 100clientId?stringcreatedAt*stringMatch
^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$Format
date-timedeliveredAt?stringMatch
^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$Format
date-timedirection*stringValue in
"inbound""outbound"draftId?stringMatch
^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$failureCode?stringfailureReason?stringfromAddress*stringMatch
^\S[\s\S]*\S$|^\S$|^$Length
3 <= length <= 320htmlBody?stringid*stringMatch
^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$inboxId*stringMatch
^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$inReplyTo?stringinternetMessageId?stringlastReprocessedAt?stringMatch
^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$Format
date-timeorganizationId*stringMatch
^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$providerMessageId?stringrawPurgedAt?stringMatch
^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$Format
date-timerawRetentionExpiresAt?stringMatch
^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$Format
date-timereceivedAt?stringMatch
^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$Format
date-timereferences*array<string>replyToAddresses*array<>Items
items <= 100reprocessCount*integerRange
0 <= value <= 9007199254740991scheduledAt?stringMatch
^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$Format
date-timestatus*stringValue in
"accepted""bounced""complained""delivered""failed""queued""received""scheduled""sending"subject*stringtextBody?stringthreadId?stringMatch
^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$threadKey*stringtoAddresses*array<>Items
items <= 100updatedAt*stringMatch
^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$Format
date-timecurl -X POST "https://example.com/v1/agent-email/drafts/string/send" \ -H "x-deployments-environment: string" \ -H "idempotency-key: string"{ "acceptedAt": "2019-08-24T14:15:22Z", "attachments": [ { "byteSize": 0, "contentId": "string", "contentType": "string", "disposition": "attachment", "fileName": "string", "id": "string", "messageId": "string", "sha256": "string" } ], "bccAddresses": [ "string" ], "ccAddresses": [ "string" ], "clientId": "string", "createdAt": "2019-08-24T14:15:22Z", "deliveredAt": "2019-08-24T14:15:22Z", "direction": "inbound", "draftId": "string", "failureCode": "string", "failureReason": "string", "fromAddress": "string", "htmlBody": "string", "id": "string", "inboxId": "string", "inReplyTo": "string", "internetMessageId": "string", "lastReprocessedAt": "2019-08-24T14:15:22Z", "organizationId": "string", "providerMessageId": "string", "rawPurgedAt": "2019-08-24T14:15:22Z", "rawRetentionExpiresAt": "2019-08-24T14:15:22Z", "receivedAt": "2019-08-24T14:15:22Z", "references": [ "string" ], "replyToAddresses": [ "string" ], "reprocessCount": 0, "scheduledAt": "2019-08-24T14:15:22Z", "status": "accepted", "subject": "string", "textBody": "string", "threadId": "string", "threadKey": "string", "toAddresses": [ "string" ], "updatedAt": "2019-08-24T14:15:22Z"}