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

# Queue outbound SMS text message(s) from your Agent

> Backwards compatible with the previous endpoint. You can pass a single "target" and required "content", or provide "targets" to enqueue multiple messages. This queues tasks instead of sending immediately.



## OpenAPI

````yaml post /api/v2/agent/outboundSms
openapi: 3.0.0
info:
  version: 2.0.0
  title: Vida API
  description: Vida API Documentation
servers:
  - url: https://api.vida.dev
    description: Vida Production
    variables:
      baseUrl:
        default: api.vida.dev
        description: Production API Root
security: []
paths:
  /api/v2/agent/outboundSms:
    post:
      tags:
        - Agents
      summary: Queue outbound SMS text message(s) from your Agent
      description: >-
        Backwards compatible with the previous endpoint. You can pass a single
        "target" and required "content", or provide "targets" to enqueue
        multiple messages. This queues tasks instead of sending immediately.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              oneOf:
                - type: object
                  required:
                    - target
                    - content
                  properties:
                    target:
                      type: string
                      description: Phone in E.164 or VIDA username
                      example: '+1234567890'
                    content:
                      type: string
                      description: Message body
                      example: Hello from Acme. Your appointment is tomorrow at 10am.
                    context:
                      type: string
                      description: Optional context for the agent handling the conversation
                    taskContext:
                      type: string
                      description: Task-specific context for this message
                    agentId:
                      type: integer
                      description: Optional campaign id override
                    scheduledFor:
                      type: integer
                      description: Unix seconds to schedule delivery
                    meta:
                      type: object
                      description: Optional metadata
                    externalTaskId:
                      type: string
                      description: >-
                        Optional customer-provided identifier applied to created
                        task(s)
                - type: object
                  required:
                    - targets
                  properties:
                    targets:
                      description: Array of destinations or objects with per-item options
                      oneOf:
                        - type: array
                          items:
                            type: string
                            example: '+1234567890'
                        - type: array
                          items:
                            type: object
                            required:
                              - target
                            properties:
                              target:
                                type: string
                                example: '+1234567890'
                              content:
                                type: string
                                description: Per-item message body
                              context:
                                type: string
                              taskContext:
                                type: string
                              agentId:
                                type: integer
                              scheduledFor:
                                type: integer
                              meta:
                                type: object
                              externalTaskId:
                                type: string
                                description: Identifier applied to this task
                    content:
                      type: string
                      description: >-
                        Message applied to all when targets is an array of
                        strings
                    context:
                      type: string
                      description: Context applied to all items when not provided per item
                    taskContext:
                      type: string
                      description: >-
                        Task-specific context applied to all items when not
                        provided per item
                    agentId:
                      type: integer
                      description: Agent id applied to all items
                    scheduledFor:
                      type: integer
                      description: Schedule applied to all items
                    scheduleSpacingSec:
                      type: integer
                      description: >-
                        If provided, stagger scheduledFor by this many seconds
                        per index
                      example: 15
                    meta:
                      type: object
                      description: Metadata applied to all items
                    externalTaskId:
                      type: string
                      description: >-
                        Optional customer-provided identifier applied to all
                        created tasks
            examples:
              single:
                summary: Single target, backwards compatible
                value:
                  target: '+15551234567'
                  content: Hi, quick reminder for tomorrow at 10am.
                  context: Reminder campaign
              batchStrings:
                summary: Multiple string targets with shared content
                value:
                  targets:
                    - '+15551230001'
                    - '+15551230002'
                    - '+15551230003'
                  content: Thanks for signing up. Reply YES to confirm.
                  context: Onboarding nudge
                  scheduleSpacingSec: 10
              batchObjects:
                summary: Multiple object targets with per-item overrides
                value:
                  targets:
                    - target: '+15551230001'
                      content: VIP reminder 9am
                      context: VIP
                      scheduledFor: 1730000000
                    - target: '+15551230002'
                      content: Standard reminder 10am
                  agentId: 1234
      responses:
        '200':
          description: Queued successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Outbound SMS initiated.
                  inserted:
                    type: integer
                    example: 3
                  tasks:
                    type: array
                    items:
                      type: object
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '500':
          description: Server Error
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: query
      name: token
      description: Vida API Token

````