Skip to Content

List mailbox actions

List mailbox actions. Request: GET /v1/mailboxes/{id}/actions. Scope: mailboxes:read.

GET
/v1/mailboxes/{id}/actions

Returns the actions proposed on a mailbox, newest first, filterable by threadId, state (approvalRequired lists the actions waiting for a person), and creation time (after, before). Filters apply together within the mailbox. Pass nextCursor back as cursor for the next page; it is null on the last page.

Authorization

apiKey
headerx-api-key<token>

Path Parameters

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

Query Parameters

limit?|null
cursor?string
threadId?string
Match^thread_[0-9a-hjkmnp-tv-z]{16,24}$
state?string
Value in"proposed""allowed""approvalRequired""policyDenied""approved""approvalDenied""executing""executed""failed""queued""accepted""completed""notSent""uncertain"
after?string
before?string

Response Body

MailboxActionPage

application/json
  1. response
items*array<|>
nextCursor*string|null
Example Request
import { createClient } from "samva";

const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });

const result = await samva.mailboxes.listActions({
  "id": "example"
});
Example Response
{
  "items": [
    {
      "id": "string",
      "source": "humanUi",
      "proposedBy": {
        "kind": "user",
        "id": "string",
        "displayName": "string"
      },
      "threadId": "string",
      "draftId": "string",
      "decision": {
        "id": "string",
        "reviewRound": 1,
        "requirement": "run",
        "decider": "rule",
        "outcome": "allow",
        "reason": "string",
        "scopes": [
          {
            "kind": "organization",
            "id": "string"
          }
        ],
        "rule": {
          "scope": {
            "kind": "organization",
            "id": "string"
          },
          "index": 0
        },
        "guard": "string",
        "guardReason": "string",
        "resolution": {
          "by": "string",
          "at": "string",
          "as": "approved",
          "diff": {
            "text": {
              "before": "string",
              "after": "string"
            },
            "html": {
              "before": "string",
              "after": "string"
            }
          }
        }
      },
      "resolution": {
        "outcome": "approved",
        "actor": {
          "kind": "user",
          "id": "string",
          "displayName": "string",
          "source": "humanUi"
        },
        "resolvedAt": "string",
        "reason": "string"
      },
      "alwaysAllow": {
        "by": "owner",
        "allowed": true
      },
      "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": {
          "id": "string",
          "reviewRound": 1,
          "requirement": "run",
          "decider": "rule",
          "outcome": "allow",
          "reason": "string",
          "scopes": [
            {
              "kind": "organization",
              "id": "string"
            }
          ],
          "rule": {
            "scope": {
              "kind": "organization",
              "id": "string"
            },
            "index": 0
          },
          "guard": "string",
          "guardReason": "string",
          "resolution": {
            "by": "string",
            "at": "string",
            "as": "approved",
            "diff": {
              "text": {
                "before": "string",
                "after": "string"
              },
              "html": {
                "before": "string",
                "after": "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"
      }
    }
  ],
  "nextCursor": "string"
}

Related documentation