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

# Send an email

> Queues one email and returns right away with `202`. Delivery happens in the background:
listen to webhooks or poll the email to follow its status. Live keys charge one credit
per recipient; test keys never deliver and cost nothing.



## OpenAPI

````yaml /openapi.json post /emails
openapi: 3.1.2
info:
  title: PulseSend API
  version: 1.0.0
  description: >-
    Send transactional email over HTTP. Authenticate with a `ps_live_` or
    `ps_test_` key.
servers:
  - url: https://pulse-send.jiordiviera.me/api/v1
    description: Production
security:
  - apiKey: []
tags:
  - name: Emails
paths:
  /emails:
    post:
      tags:
        - Emails
      summary: Send an email
      description: >-
        Queues one email and returns right away with `202`. Delivery happens in
        the background:

        listen to webhooks or poll the email to follow its status. Live keys
        charge one credit

        per recipient; test keys never deliver and cost nothing.
      operationId: v1.emails.store
      parameters:
        - name: Idempotency-Key
          in: header
          description: >-
            Any unique string, up to 255 characters. Retrying with the same key
            returns the original response instead of sending twice. Kept for 24
            hours.
          schema:
            type: string
          example: signup-otp-8f3a2c
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StoreEmailRequest'
      responses:
        '202':
          description: >-
            Accepted. The email is queued; follow its status with webhooks or
            `GET /emails/{id}`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailResource'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/InsufficientCredits'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/IdempotencyConflict'
        '422':
          $ref: '#/components/responses/ValidationFailed'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  schemas:
    StoreEmailRequest:
      type: object
      properties:
        from:
          type: string
          maxLength: 320
          description: Sender address on a verified domain. Accepts `Name <address>`.
          examples:
            - Acme <hello@acme.com>
        to:
          description: >-
            One address, or a list. Up to 50 recipients in total across to, cc
            and bcc.
          oneOf:
            - type: string
              format: email
            - type: array
              items:
                type: string
                format: email
              minItems: 1
          examples:
            - jane@example.com
        cc:
          type: array
          items:
            type: string
            format: email
        bcc:
          type: array
          items:
            type: string
            format: email
        reply_to:
          type:
            - string
            - 'null'
          format: email
          description: Address replies should go to.
        subject:
          type: string
          maxLength: 998
          examples:
            - Your verification code
        html:
          type:
            - string
            - 'null'
          description: HTML body. Send `html`, `text`, or both.
          examples:
            - <p>Your code is <strong>482913</strong></p>
        text:
          type:
            - string
            - 'null'
          description: Plain-text body.
        tags:
          type: array
          items:
            type: string
            maxLength: 256
          maxItems: 10
          description: Free-form labels to find and filter emails later. Up to 10.
        headers:
          type: object
          additionalProperties:
            type: string
          maxProperties: 20
          description: Custom headers, as name → value.
      required:
        - from
        - to
        - subject
      title: SendEmail
    EmailResource:
      type: object
      properties:
        object:
          type: string
          const: email
          description: Always `email`.
        id:
          type: string
          description: Unique identifier, prefixed `em_`.
          examples:
            - em_01jbz8m3k2q7x9c4v5n6p8r0st
        from:
          type: string
          examples:
            - Acme <hello@acme.com>
        to:
          type: array
          items:
            type: string
          examples:
            - - jane@example.com
        cc:
          type:
            - array
            - 'null'
          items:
            type: string
        bcc:
          type:
            - array
            - 'null'
          items:
            type: string
        subject:
          type: string
        status:
          type: string
          enum:
            - queued
            - sent
            - delivered
            - delivery_delayed
            - bounced
            - complained
            - failed
            - canceled
          description: >-
            Delivery status. `queued` → `sent` → `delivered`. Final states:
            `delivered`, `bounced`, `complained`, `failed`, `canceled`.
        test_mode:
          type: boolean
          description: >-
            True when sent with a `ps_test_` key. Test emails are never
            delivered and cost no credits.
        tags:
          type:
            - array
            - 'null'
          items:
            type: string
          description: Tags you attached when sending.
        credits_charged:
          type: integer
          description: One credit per recipient (to, cc and bcc). Zero in test mode.
        created_at:
          type: string
          format: date-time
          examples:
            - '2026-10-17T09:41:00Z'
      required:
        - object
        - id
        - from
        - to
        - cc
        - bcc
        - subject
        - status
        - test_mode
        - tags
        - credits_charged
        - created_at
      title: Email
    Error:
      type: object
      title: Error
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - authentication_error
                - permission_error
                - not_found
                - validation_error
                - insufficient_credits
                - idempotency_error
                - rate_limit_error
                - api_error
              description: Error category. Determines the HTTP status.
            code:
              type: string
              description: Stable, machine-readable code. Branch on this.
            message:
              type: string
              description: Human-readable explanation. May change; do not parse it.
            param:
              type: string
              description: The request field at fault, when there is one.
            doc_url:
              type: string
              format: uri
          required:
            - type
            - code
            - message
      required:
        - error
  responses:
    Unauthorized:
      description: Invalid or revoked API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              type: authentication_error
              code: invalid_api_key
              message: Invalid or revoked API key.
              doc_url: https://docs.pulse-send.jiordiviera.me/errors#invalid_api_key
    InsufficientCredits:
      description: 'Not enough credits: 3 needed, 1 available.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              type: insufficient_credits
              code: insufficient_credits
              message: 'Not enough credits: 3 needed, 1 available.'
              doc_url: >-
                https://docs.pulse-send.jiordiviera.me/errors#insufficient_credits
    Forbidden:
      description: This key does not have the emails:send scope.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              type: permission_error
              code: missing_scope
              message: This key does not have the emails:send scope.
              doc_url: https://docs.pulse-send.jiordiviera.me/errors#missing_scope
    IdempotencyConflict:
      description: This Idempotency-Key was already used for a different request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              type: idempotency_error
              code: idempotency_key_reused
              message: This Idempotency-Key was already used for a different request.
              doc_url: >-
                https://docs.pulse-send.jiordiviera.me/errors#idempotency_key_reused
    ValidationFailed:
      description: The to field is required.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              type: validation_error
              code: invalid_parameter
              message: The to field is required.
              param: to
              doc_url: https://docs.pulse-send.jiordiviera.me/errors#invalid_parameter
    RateLimited:
      description: Too many requests, retry later.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              type: rate_limit_error
              code: rate_limited
              message: Too many requests, retry later.
              doc_url: https://docs.pulse-send.jiordiviera.me/errors#rate_limited
  securitySchemes:
    apiKey:
      type: http
      description: Your API key, `ps_live_…` or `ps_test_…`.
      scheme: bearer

````

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