> ## Documentation Index
> Fetch the complete documentation index at: https://docs.migma.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Request a send approval

> Holds a direct send, campaign send, or schedule for the account owner's approval in Migma and sends nothing. Migma checks the send as it would go out now and returns a summary with an approval link. The owner sends, schedules, or declines it on migma.ai; Migma checks it again then and refuses it if anything that decides who gets it, from whom, or when changed. Direct sends are marketing unless `transactional` is true, which is refused for tag and segment sends and needs a verified transactional sending identity. Requires API key with email:send (send_email) or campaign:write (campaign actions).



## OpenAPI

````yaml /api-reference/openapi.json post /v1/send-approvals
openapi: 3.1.0
info:
  title: Migma.ai API (v1)
  description: >-
    API for managing brands, contacts, email generation, sending, and
    integrations. API request budgets are plan-based and shared across an
    account's API keys per route group. Sending request allowances support the
    account's recipients/second rate; recipient throughput and daily/monthly
    email quotas remain separate. See
    https://docs.migma.ai/api-reference/introduction#rate-limiting for limits,
    response headers, and retry behavior.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.migma.ai
    description: Production
security:
  - apiKeyAuth: []
tags:
  - name: Projects/Brands
    description: Manage projects (brands) and import from websites
  - name: Contacts
    description: Manage your contacts, segments, tags, and topics
  - name: Segments
    description: Create and manage dynamic contact segments
  - name: Tags
    description: Organize contacts with tags
  - name: Topics
    description: Manage subscription topics and preferences
  - name: Emails
    description: Generate, send, and export emails
  - name: Email Validation
    description: Validate email content for compatibility and deliverability
  - name: Email Previews
    description: Preview emails across devices and email clients
  - name: Domains
    description: Manage sending domains and verification
  - name: Webhooks
    description: Manage webhook endpoints for real-time event notifications
  - name: Events
    description: Record customer events and conversions
  - name: Integrations
    description: Third-party platform integrations
  - name: Campaigns
    description: Create, schedule, send, and manage email campaigns
  - name: Billing
    description: View your plan and credits and create billing links
  - name: Project Editing
    description: Edit project assets, logos, images, and knowledge base entries
paths:
  /v1/send-approvals:
    post:
      tags:
        - Emails
      summary: Request a send approval
      description: >-
        Holds a direct send, campaign send, or schedule for the account owner's
        approval in Migma and sends nothing. Migma checks the send as it would
        go out now and returns a summary with an approval link. The owner sends,
        schedules, or declines it on migma.ai; Migma checks it again then and
        refuses it if anything that decides who gets it, from whom, or when
        changed. Direct sends are marketing unless `transactional` is true,
        which is refused for tag and segment sends and needs a verified
        transactional sending identity. Requires API key with email:send
        (send_email) or campaign:write (campaign actions).
      operationId: createSendApproval
      parameters:
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSendApprovalRequest'
      responses:
        '201':
          description: Approval created
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponse'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/SendApproval'
        '400':
          description: >-
            Invalid request, or a send that cannot go out (for example an
            unverified sender)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
        '401':
          description: Invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
        '403':
          description: Missing permission
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
        '404':
          description: Email, campaign, list, or segment not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
        '409':
          description: Campaign cannot be sent in its current status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
        '422':
          description: Transactional send without a verified transactional identity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
components:
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      description: >-
        Optional key (max 100 chars) for safe retries. Same key + same body
        within 24h replays the original response (same status and body); same
        key + a different body returns 409 IDEMPOTENCY_CONFLICT. Scoped per API
        key.
      schema:
        type: string
        maxLength: 100
  schemas:
    CreateSendApprovalRequest:
      description: >-
        The send to hold for the account owner's approval. `send_email` takes
        the same body as POST /v1/sending.
      oneOf:
        - type: object
          required:
            - action
            - send
          properties:
            action:
              type: string
              enum:
                - send_email
            send:
              $ref: '#/components/schemas/SendEmailRequest'
        - type: object
          required:
            - action
            - campaignId
          properties:
            action:
              type: string
              enum:
                - send_campaign
            campaignId:
              type: string
        - type: object
          required:
            - action
            - campaignId
            - scheduledAt
          properties:
            action:
              type: string
              enum:
                - schedule_campaign
            campaignId:
              type: string
            scheduledAt:
              type: string
              format: date-time
            scheduledTimezone:
              type: string
              description: IANA timezone. Omit to keep the campaign's.
            localTimeDelivery:
              type: boolean
      discriminator:
        propertyName: action
    ApiResponse:
      type: object
      properties:
        success:
          type: boolean
        data:
          nullable: true
        error:
          type: string
          nullable: true
      required:
        - success
    SendApproval:
      type: object
      properties:
        id:
          type: string
        action:
          type: string
          enum:
            - send_email
            - send_campaign
            - schedule_campaign
        status:
          type: string
          enum:
            - pending
            - approving
            - sent
            - scheduled
            - declined
            - expired
            - failed
          description: >-
            `pending` waits for the owner; `expired` after 24 hours without a
            decision; `failed` carries `error`.
        summary:
          type: object
          description: >-
            What the owner approves: audience (names and type), estimated
            recipients, from, fromName, subject, sendAt (null sends on
            approval), timezone, localTimeDelivery, and warnings.
          additionalProperties: true
        approvalUrl:
          type: string
          format: uri
          description: >-
            Page on migma.ai where the signed-in owner sends, schedules, or
            declines.
        editUrl:
          type: string
          format: uri
        result:
          type: object
          additionalProperties: true
        error:
          type: string
        createdAt:
          type: string
          format: date-time
        expiresAt:
          type: string
          format: date-time
        decidedAt:
          type: string
          format: date-time
    SendEmailRequest:
      type: object
      properties:
        recipientType:
          type: string
          enum:
            - email
            - audience
            - segment
            - tag
          description: >-
            Type of recipient. 'email' for single send, 'audience' or 'segment'
            for segment-based batch sends, 'tag' for tag-based batch sends.
        recipientId:
          type: string
          description: Required for audience/segment/tag sends. The segment or tag ID.
        recipientEmail:
          type: string
          format: email
          description: Required for single email sends.
        from:
          type: string
          format: email
          description: Sender email address (must be from a verified domain)
        fromName:
          type: string
          description: Sender display name
        replyTo:
          type: string
          format: email
        subject:
          type: string
        variables:
          type: object
          additionalProperties: true
          description: Template variables for personalization
        providerType:
          type: string
          description: >-
            Sending provider for Migma-managed email: migma, ses, resend,
            sendgrid, or mailgun. Defaults to Migma's built-in sending. Connect
            a provider in Settings → Integrations → Sending providers. Brand
            marketing-platform connections are separate Publish destinations.
          enum:
            - ses
            - resend
            - sendgrid
            - mailgun
            - migma
          default: migma
        projectId:
          type: string
          description: >-
            Project ID. Optional when emailId or conversationId resolves the
            project automatically.
        conversationId:
          type: string
          description: >-
            Conversation ID from a generated email. Works for single-email
            conversations. For series, use emailId.
        transactional:
          type: boolean
          description: >-
            Controls whether the email is treated as transactional (order
            confirmations, password resets) or marketing. Defaults to true for
            single sends (recipientType 'email') and false for batch sends
            (recipientType 'audience', 'segment', 'tag'). Transactional emails
            bypass subscription status and topic preference filters, and omit
            List-Unsubscribe headers. Bounced and invalid addresses are always
            excluded. Set explicitly to override the default.
        emailId:
          type: string
          description: >-
            Generated email ID from result.emails[].emailId. Recommended for all
            generated emails and required for series slots.
      required:
        - recipientType
        - from
        - fromName
        - subject
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        API key authentication. Use 'Authorization: Bearer YOUR_API_KEY' where
        YOUR_API_KEY is obtained from the Migma dashboard under Settings →
        Developers → API Keys.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.