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

# Send test emails

> Saves the workspace test template (sender name, subject, body, recipients, mailbox), then sends REAL emails from the chosen active mailbox via Gmail. Spintax {a|b} is applied per recipient and {{sender_name}} is replaced with the From name. Recipients are split on comma, semicolon, whitespace, de-duplicated, capped at 100. One recipient is sent synchronously and the result returned; several are queued in a background thread and results show under 'recent' in GET /testing. Refusals (400 JSON, ok false): no valid recipient, blank subject, blank body, mailbox missing, not in the workspace or not active. Note the template is saved before validation, even if the send is refused.

**Minimum role:** `edit` (`x-min-role`). **Destructive:** `true` (`x-destructive`).



## OpenAPI

````yaml /openapi.json post /testing/send
openapi: 3.0.3
info:
  title: Sales Sequencer API
  version: '1'
  description: >-
    Every Sales Sequencer action over HTTP. Each call runs as the API key's
    creator, with that user's role, in the key's workspace. Auth: X-API-Key
    header.
servers:
  - url: https://api.salessequencer.com/api/v1
security:
  - key: []
paths:
  /testing/send:
    post:
      tags:
        - Testing
      summary: Send test emails
      description: >-
        Saves the workspace test template (sender name, subject, body,
        recipients, mailbox), then sends REAL emails from the chosen active
        mailbox via Gmail. Spintax {a|b} is applied per recipient and
        {{sender_name}} is replaced with the From name. Recipients are split on
        comma, semicolon, whitespace, de-duplicated, capped at 100. One
        recipient is sent synchronously and the result returned; several are
        queued in a background thread and results show under 'recent' in GET
        /testing. Refusals (400 JSON, ok false): no valid recipient, blank
        subject, blank body, mailbox missing, not in the workspace or not
        active. Note the template is saved before validation, even if the send
        is refused.


        **Minimum role:** `edit` (`x-min-role`). **Destructive:** `true`
        (`x-destructive`).
      operationId: spa_testing_testing_send
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              properties:
                body:
                  description: Body (spintax allowed).
                  type: string
                first_name:
                  description: From first name. Defaults to the mailbox's.
                  type: string
                last_name:
                  description: From last name. Defaults to the mailbox's.
                  type: string
                mailbox_id:
                  description: Active mailbox to send from.
                  type: integer
                relay:
                  description: >-
                    Egress box: contabo, ovh or hetzner. Anything else uses the
                    default relay.
                  type: string
                subject:
                  description: Subject (spintax allowed).
                  type: string
                to_address:
                  description: Recipient(s), comma, space or newline separated (max 100).
                  type: string
              required:
                - to_address
                - mailbox_id
                - subject
                - body
              type: object
      responses:
        '200':
          description: >-
            JSON {ok, queued, messages:[{category, message}]}. queued is 0 for a
            single synchronous send, otherwise the recipient count.
components:
  securitySchemes:
    key:
      in: header
      name: X-API-Key
      type: apiKey

````

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