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

# Queue an agent text message

> Queue a plain-text message from an assigned Seller Account agent line. Reuse the request ID only to retry the same line, destination, and text. A 202 response means the message was saved, not delivered.



## OpenAPI

````yaml /v2/storefront-api-v2.yaml post /communications/messages
openapi: 3.0.0
info:
  title: Scope3 Storefront API
  version: 2.0.0
  description: >-
    REST API for partners to manage Seller Accounts, inventory sources, and
    billing.


    ## Authentication


    All endpoints require a Bearer token in the Authorization header:

    ```

    Authorization: Bearer your-api-key

    ```


    ## Base URL


    `https://api.interchange.io/api/v2/storefront`


    ## For AI Agents


    AI agents can use the MCP endpoint at `/mcp/v2/storefront` with three tools:

    - `initialize`: Start an MCP session

    - `api_call`: Make REST API calls

    - `ask_about_capability`: Learn about API features
servers:
  - url: https://api.interchange.io/api/v2/storefront
    description: Production server
security: []
tags:
  - name: Account
    description: Account management, service tokens, and preferences
  - name: Asks
    description: >-
      What you are waiting on Scope3 for — support, product, and supply asks in
      one list
  - name: Storefront
    description: Manage storefront and inventory sources
  - name: Storefront Agents
    description: List and manage registered sales, signals, and outcomes agents
  - name: Storefront Activity
    description: Audit log of configuration and inventory changes on the storefront
  - name: Storefront Billing
    description: Payout bank details and billing configuration for Seller Accounts
  - name: AI Usage
    description: Seller Account AI token usage visibility by model
  - name: MCP
    description: Model Context Protocol endpoints
paths:
  /communications/messages:
    servers:
      - url: /api/v2
        description: Shared customer API base URL
    post:
      tags:
        - Communications
      summary: Queue an agent text message
      description: >-
        Queue a plain-text message from an assigned Seller Account agent line.
        Reuse the request ID only to retry the same line, destination, and text.
        A 202 response means the message was saved, not delivered.
      operationId: sendAgentSms
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendSmsBody'
      responses:
        '202':
          description: Queue an agent text message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SendSmsResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: The credential lacks write authority.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Agent phone lines are not enabled.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: The request ID was reused with different message details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: The message could not be safely protected or queued.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    SendSmsBody:
      type: object
      properties:
        requestId:
          type: string
          format: uuid
          pattern: >-
            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
          description: Idempotency UUID for this intended message.
        endpointId:
          type: string
          pattern: ^\d+$
          description: Assigned agent text-line ID as a numeric string.
        to:
          type: string
          pattern: ^\+[1-9]\d{1,14}$
          description: Recipient telephone number in E.164 format.
        text:
          type: string
          minLength: 1
          maxLength: 1600
          description: Plain-text message, from 1 to 1,600 characters.
      required:
        - requestId
        - endpointId
        - to
        - text
    SendSmsResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            message:
              type: object
              properties:
                outboxId:
                  type: string
                  pattern: ^\d+$
                status:
                  type: string
                  enum:
                    - pending
                    - processing
                    - retryable
                    - submitted
                    - delivered
                    - delivery_failed
                    - delivery_unconfirmed
                    - submission_unknown
                    - rejected
                    - dead_letter
                duplicate:
                  type: boolean
              required:
                - outboxId
                - status
                - duplicate
              additionalProperties: false
          required:
            - message
          additionalProperties: false
        error:
          type: string
          nullable: true
          enum:
            - null
      required:
        - data
        - error
      additionalProperties: false
    ErrorResponse:
      type: object
      properties:
        data:
          type: string
          nullable: true
          enum:
            - null
        error:
          $ref: '#/components/schemas/ApiError'
      required:
        - data
        - error
      additionalProperties: false
      description: Standard error response
    ApiError:
      type: object
      properties:
        code:
          type: string
          description: Machine-readable error code
        message:
          type: string
          description: Human-readable error message
        field:
          description: Field path associated with the error
          type: string
        details:
          description: Additional error context
          type: object
          additionalProperties: {}
      required:
        - code
        - message
      additionalProperties: false
      description: Structured error object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key or access token

````