Mailboxes

Get a mailbox action

Returns one action with its current progress. Send actions expose their immutable approved content, deadline, problem, and accepted receipt.

GET
/v1/mailboxes/{id}/actions/{actionId}

Returns one action with its current progress. Send actions expose their immutable approved content, deadline, problem, and accepted receipt. A caller with mailbox read access may inspect actions; send-only callers may inspect only their own proposals. Acceptance and mailbox completion do not mean recipient delivery.

Authorization

apiKey
headerx-api-key<token>

Path Parameters

id*string
Match^mbx_[0-9a-hjkmnp-tv-z]{16,24}$
actionId*string
Match^mbxact_[0-9a-hjkmnp-tv-z]{16,24}$

Response Body

MailboxAction

application/json
  1. response
id*MailboxActionId
Match^mbxact_[0-9a-hjkmnp-tv-z]{16,24}$
source*string
Value in"humanUi""externalApi""aiSdkTool""extension""externalAgent""samvaManagedAgent""system"
proposedBy*
threadId*|null
draftId*|null
decision*|null
resolution*|

How a held action's approval ended: who approved, denied, or cancelled it, when, and the denial reason. Null while it waits for approval and for an action that never needed one.

createdAt*string
updatedAt*string
type*string
Value in"sendMessage""reply"
state*string
Value in"approvalRequired""queued""accepted""completed""notSent""uncertain"
send*
intent*||null
Example Request
import { createClient } from "samva";const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });const result = await samva.mailboxes.getAction({  "id": "example",  "actionId": "example"});
Example Response
{  "id": "string",  "source": "humanUi",  "proposedBy": {    "kind": "user",    "id": "string",    "displayName": "string"  },  "threadId": "string",  "draftId": "string",  "decision": {    "outcome": "allow",    "reason": "string",    "policyId": "string",    "source": "grant",    "decidedAt": "string"  },  "resolution": {    "outcome": "approved",    "actor": {      "kind": "user",      "id": "string",      "displayName": "string",      "source": "humanUi"    },    "resolvedAt": "string",    "reason": "string"  },  "createdAt": "string",  "updatedAt": "string",  "type": "sendMessage",  "state": "approvalRequired",  "send": {    "actionId": "string",    "draftId": "string",    "messageId": "string",    "threadId": "string",    "state": "approvalRequired",    "acceptedAt": "string",    "waitReason": "rate",    "reviewExpectedAt": "string",    "skippedRecipients": [      {        "address": "string",        "reason": "bounce",        "topicId": "string"      }    ],    "executeUntil": "string",    "retryAt": "string",    "problem": {      "code": "string",      "message": "string",      "error": {        "_tag": "SenderNotReadyError",        "message": "string",        "sender": "string",        "retryAfterSeconds": 0      }    },    "retryEligible": true,    "decision": {      "outcome": "allow",      "reason": "string",      "policyId": "string",      "source": "grant",      "decidedAt": "string"    },    "createdAt": "string",    "updatedAt": "string"  },  "intent": {    "channel": "email",    "draftRevision": 1,    "from": "string",    "fromName": "string",    "to": [      "string"    ],    "cc": [      "string"    ],    "bcc": [      "string"    ],    "replyTo": [      "string"    ],    "subject": "string",    "text": "string",    "html": "string",    "attachments": [      {        "filename": "string",        "content": "string",        "mediaId": "string",        "contentType": "string",        "size": 1      }    ],    "threadId": "string",    "conversationId": "string",    "inReplyToMessageId": "string"  }}

Related documentation