---
title: "Deny a mailbox action"
method: POST
path: "/v1/mailboxes/{id}/actions/{actionId}/deny"
tags: ["Mailboxes"]
---

# Deny a mailbox action

`POST /v1/mailboxes/{id}/actions/{actionId}/deny`

## Request

- Base URL: `https://api.samva.dev`
- URL: `https://api.samva.dev/v1/mailboxes/{id}/actions/{actionId}/deny`
- Auth: API key in header `x-api-key`

Denies an action waiting for approval with a reason and returns it without executing it. Only a person signed in or through OAuth may deny, and never the one who proposed it. The action's `resolution` records the denier and reason; denying a held send publishes one `mailbox.action.resolved` event.

## Path parameters

- `id` string, required
- `actionId` string, required

## Request body

- DenyMailboxActionPayload
  - `reason` string, required

## Response `200`

MailboxAction

- union
  - MailboxSendAction
    - `id` string, required
    - `source` 'humanUi' | 'externalApi' | 'aiSdkTool' | 'extension' | 'externalAgent' | 'samvaManagedAgent' | 'system', required
    - `proposedBy` object, required
      - `kind` 'user' | 'apiKey' | 'extension' | 'externalAgent' | 'samvaAgent' | 'system', required
      - `id` string, required
      - `displayName` string, nullable
    - `threadId` string, required
    - `draftId` string, required
    - `decision` MailboxActionDecision, required
      - `outcome` 'allow' | 'requireApproval' | 'deny', required
      - `reason` string, nullable, required
      - `policyId` string, required
      - `source` 'grant' | 'installation' | 'policy', nullable, required
      - `decidedAt` string, required
    - `resolution` MailboxActionResolution, required: How the action's approval ended.
      - `outcome` 'approved' | 'denied' | 'cancelled', required
      - `actor` object, required: Who resolved the approval.
        - `kind` 'user' | 'apiKey' | 'extension' | 'externalAgent' | 'samvaAgent' | 'system', required
        - `id` string, required
        - `displayName` string, nullable
        - `source` 'humanUi' | 'externalApi' | 'externalAgent' | 'extension' | 'system', required
      - `resolvedAt` string, required
      - `reason` string, nullable, required: The denial reason; null for an approval or a cancellation.
    - `createdAt` string, required
    - `updatedAt` string, required
    - `type` 'sendMessage' | 'reply', required
    - `state` 'approvalRequired' | 'queued' | 'accepted' | 'completed' | 'notSent' | 'uncertain', required
    - `send` MailboxSendReceipt, required
      - `actionId` string, required
      - `draftId` string, required
      - `messageId` string, required
      - `threadId` string, required
      - `state` 'approvalRequired' | 'queued' | 'accepted' | 'completed' | 'notSent' | 'uncertain', required
      - `acceptedAt` string, nullable, required
      - `waitReason` 'rate' | 'daily-quota' | 'domain-health' | 'sending-paused' | 'upstream-unavailable' | 'retry' | 'campaign-paused' | 'domain-warming' | 'onboarding-review' | 'content-review' | 'screening-unavailable', nullable, required
      - `reviewExpectedAt` string, nullable, required
      - `skippedRecipients` SkippedRecipient[], required
        - `address` string, required
        - `reason` 'bounce' | 'complaint' | 'unsubscribe' | 'manual' | 'group-unsubscribe', required
        - `unsubscribeGroupId` string
      - `executeUntil` string, nullable, required
      - `retryAt` string, nullable, required
      - `problem` MailboxSendOutcome, required
        - `code` string, required
        - `message` string, required
        - `error` union
          - object
            - `_tag` 'SenderNotReadyError', required
            - `message` string, required
            - `sender` string, required
            - `retryAfterSeconds` number, nullable
          - object
            - `_tag` 'RateLimitedError', required
            - `message` string, required
            - `retryAfterSeconds` number, required
          - object
            - `_tag` 'OnboardingReviewRequiredError', required
            - `message` string, required
            - `code` 'review_required' | 'review_in_progress' | 'information_required' | 'review_rejected' | 'identity_review_required' | 'identity_review_rejected' | 'identity_changed', required
            - `decision` 'undecided' | 'approved' | 'rejected', required
            - `stage` 'collecting' | 'automated_review' | 'manual_review' | 'information_requested' | 'complete', required
            - `nextAction` 'wait_for_review' | 'provide_information' | 'verify_sending_identity' | 'reapply' | 'contact_support', required
            - `identityId` string, nullable
          - object
            - `_tag` 'PaymentRequiredError', required
            - `message` string, required
            - `resource` string, required
            - `currentUsage` number, required
            - `limit` number, required
          - object
            - `_tag` 'ValidationError', required
            - `message` string, required
            - `fields` object, nullable
          - object
            - `_tag` 'ForbiddenError', required
            - `message` string, required
          - object
            - `_tag` 'ResourceNotFoundError', required
            - `resource` string, required
            - `id` string, required
            - `message` string, required
      - `retryEligible` boolean, required
      - `decision` MailboxActionDecision, required
        - `outcome` 'allow' | 'requireApproval' | 'deny', required
        - `reason` string, nullable, required
        - `policyId` string, required
        - `source` 'grant' | 'installation' | 'policy', nullable, required
        - `decidedAt` string, required
      - `createdAt` string, required
      - `updatedAt` string, required
    - `intent` MailboxSendSnapshot, required
      - `channel` 'email', required
      - `draftRevision` integer, required
      - `from` string, required
      - `fromName` string, nullable, required
      - `to` string[], required
      - `cc` string[], required
      - `bcc` string[], required
      - `replyTo` string[], required
      - `subject` string, required
      - `text` string, nullable, required
      - `html` string, nullable, required
      - `attachments` EmailAttachment[], required
        - `filename` string, required
        - `content` string, nullable
        - `mediaId` string
        - `contentType` string, required
        - `size` integer, required
      - `threadId` string, required
      - `conversationId` string, required
      - `inReplyToMessageId` string, required
  - MailboxNonSendAction
    - `id` string, required
    - `source` 'humanUi' | 'externalApi' | 'aiSdkTool' | 'extension' | 'externalAgent' | 'samvaManagedAgent' | 'system', required
    - `proposedBy` object, required
      - `kind` 'user' | 'apiKey' | 'extension' | 'externalAgent' | 'samvaAgent' | 'system', required
      - `id` string, required
      - `displayName` string, nullable
    - `threadId` string, required
    - `draftId` string, required
    - `decision` MailboxActionDecision, required
      - `outcome` 'allow' | 'requireApproval' | 'deny', required
      - `reason` string, nullable, required
      - `policyId` string, required
      - `source` 'grant' | 'installation' | 'policy', nullable, required
      - `decidedAt` string, required
    - `resolution` MailboxActionResolution, required: How the action's approval ended.
      - `outcome` 'approved' | 'denied' | 'cancelled', required
      - `actor` object, required: Who resolved the approval.
        - `kind` 'user' | 'apiKey' | 'extension' | 'externalAgent' | 'samvaAgent' | 'system', required
        - `id` string, required
        - `displayName` string, nullable
        - `source` 'humanUi' | 'externalApi' | 'externalAgent' | 'extension' | 'system', required
      - `resolvedAt` string, required
      - `reason` string, nullable, required: The denial reason; null for an approval or a cancellation.
    - `createdAt` string, required
    - `updatedAt` string, required
    - `type` 'updateDraft' | 'createNote' | 'assignThread' | 'changeThreadState' | 'call' | 'extensionRequest', required
    - `state` 'proposed' | 'allowed' | 'approvalRequired' | 'policyDenied' | 'approved' | 'approvalDenied' | 'executing' | 'executed' | 'failed', required

## Other responses

- `401`: UnauthorizedError
- `403`: ForbiddenError
- `404`: ResourceNotFoundError
- `409`: ConflictError | MailboxSendConflictError
- `422`: ValidationError
- `500`: InternalError
- `504`: GatewayTimeoutError

---

[API](https://skmtc.dev/samva/apis/samva-api.md) · [All operations](https://skmtc.dev/samva/apis/samva-api/llms.txt) · [OpenAPI document](https://skmtc.dev/samva/apis/samva-api/revisions/a99408542cc3?raw)
