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

# Send an email to the store's people

> Send a templated email to the merchant, the store's customers, or its subscribers. Requires the SEND_EMAILS scope.

Sends a templated email to one of the store's own audiences (`merchant`, `customers`, or `subscribers`). Recipients are resolved server-side — an app can never email an arbitrary address. Customer and subscriber blasts are capped at 1000 recipients; rate limited to 10 send requests per hour per installation.


## OpenAPI

````yaml POST /emails
openapi: 3.1.0
info:
  title: Salesive Apps API — Messaging
  version: 1.0.0
  description: >-
    Read the merchant's notifications and send in-app notifications and
    templated emails on behalf of an installed third-party app. Every endpoint
    authenticates with an installed-app access token (prefix `app_`) and
    requires a specific OAuth scope. The target store is bound to the token
    server-side from the installation — never send a shop id.
servers:
  - url: https://api.salesive.com/api/v1
    description: Production
security:
  - AppToken: []
paths:
  /emails:
    post:
      tags:
        - Emails
      summary: Send an email to the store's people
      description: >-
        Send a templated email to one of the store's own audiences on behalf of
        the installed app. Recipients are resolved server-side and constrained
        to the store owner (merchant), the store's active customers, or its
        newsletter subscribers — an app can never email an arbitrary address.
        Customer and subscriber blasts are capped at 1000 recipients. Rate
        limited to 10 send requests per hour per installation. The store is
        bound to the app token server-side from the installation — never send a
        shop id. Requires the `SEND_EMAILS` scope.
      operationId: sendEmail
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - audience
                - subject
                - title
                - message
              properties:
                audience:
                  type: string
                  enum:
                    - merchant
                    - customers
                    - subscribers
                  description: >-
                    Who to send to. One of: "merchant" (the store owner),
                    "customers" (the store's active customers), or "subscribers"
                    (the store's newsletter subscribers).
                subject:
                  type: string
                  description: Email subject line.
                title:
                  type: string
                  description: Headline rendered at the top of the email body.
                message:
                  type: string
                  description: Main body text of the email.
                actionText:
                  type: string
                  description: Optional call-to-action button label. Pair with actionUrl.
                actionUrl:
                  type: string
                  description: >-
                    Optional URL the call-to-action button links to. Pair with
                    actionText.
            example:
              audience: customers
              subject: Weekend sale starts now
              title: 20% off everything
              message: For this weekend only, use code WEEKEND20 at checkout.
              actionText: Shop now
              actionUrl: https://mystore.salesive.com
      responses:
        '200':
          description: The email was queued for the resolved audience.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/EnvelopeBase'
                  - type: object
                    properties:
                      data:
                        type: object
                        properties:
                          audience:
                            type: string
                            description: The audience the email was sent to.
                          recipients:
                            type: integer
                            description: Number of recipients the email was sent to.
              example:
                status: 200
                success: true
                message: Email queued for delivery
                data:
                  audience: customers
                  recipients: 342
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  schemas:
    EnvelopeBase:
      type: object
      description: >-
        Standard Salesive response envelope. The operation-specific payload is
        carried in `data`.
      required:
        - status
        - success
        - message
      properties:
        status:
          type: integer
          description: HTTP status code, echoed in the body.
        success:
          type: boolean
          description: Whether the request succeeded.
        message:
          type: string
          description: Human-readable result message.
    Envelope:
      allOf:
        - $ref: '#/components/schemas/EnvelopeBase'
        - type: object
          properties:
            data:
              description: Operation-specific payload (object, array, or null).
  responses:
    Unauthorized:
      description: Missing or invalid app access token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Envelope'
          example:
            status: 401
            success: false
            message: Authentication required
            data: null
    Forbidden:
      description: The app token is missing the OAuth scope required for this operation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Envelope'
          example:
            status: 403
            success: false
            message: Insufficient scope
            data: null
  securitySchemes:
    AppToken:
      type: http
      scheme: bearer
      description: >-
        Installed-app access token (prefix app_), issued by the OAuth install
        flow. The store is bound to the token server-side — never send a shop
        id.

````