Check approval status API
When a send returns pending_approval, check the approval request's status with its approval_id.
http
GET /v1/approvals/{approvalId}Needs the Read (messages:read) scope. approvalId is the approval_id from a 202 send result.
| Field | Meaning |
|---|---|
id · agent_id | Approval request and agent IDs |
kind | message (one email) or batch (several at once) |
status | One of pending, approved, rejected, expired |
created_at · expires_at · decided_at | When it was requested, its deadline, and when it was decided |
granted_scope | The approved scope: recipient (those recipients), thread (that thread), or domain (the whole recipient domain). null before approval and when rejected or expired |
message_ids | The 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.resolvedandapproval.expiredwebhooks. 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.