Check approval status API

When a send returns pending_approval, check the approval request's status with its approval_id.

View as MarkdownLast updated
http
GET /v1/approvals/{approvalId}

Needs the Read (messages:read) scope. approvalId is the approval_id from a 202 send result.

FieldMeaning
id · agent_idApproval request and agent IDs
kindmessage (one email) or batch (several at once)
statusOne of pending, approved, rejected, expired
created_at · expires_at · decided_atWhen it was requested, its deadline, and when it was decided
granted_scopeThe approved scope: recipient (those recipients), thread (that thread), or domain (the whole recipient domain). null before approval and when rejected or expired
message_idsThe messages tied to this request

If it doesn't exist, you get 404 approval_not_found.

How to wait

  • Don't resend the same mail. A new send just creates a new approval request.
  • Rather than polling, listen for the approval.resolved and approval.expired webhooks. See Webhooks.
  • Once approved, Atmark sends the mail. The agent doesn't need to send it again.

Approvals only happen for agents on an old outbound mode. See Handle send approval requests.

Feedback on this page? Write to support@atmark.ai.