> ## Documentation Index
> Fetch the complete documentation index at: https://openphone-dev.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Send a text message

> Send a text message from your Quo number to a recipient.



## OpenAPI

````yaml https://openphone-public-api-dev.s3.us-west-2.amazonaws.com/public/openphone-public-api-v1-dev.json post /v1/messages
openapi: 3.1.0
info:
  title: Quo Public API
  version: 1.0.0
  description: API for connecting with Quo.
  contact:
    name: Quo Support
    email: support@quo.com
    url: https://support.quo.com/
  termsOfService: https://www.quo.com/terms
servers:
  - description: Development server
    url: https://dev-public-api.openphone.dev
security:
  - apiKey: []
tags:
  - description: Operations related to the organization's A2P registration
    name: A2P Registration
  - description: Operations related to calls placed by an AI agent
    name: Agent Calls
  - description: Operations related to text conversations held by an AI agent
    name: Agent Conversations
  - description: Operations related to calls
    name: Calls
  - description: >-
      Operations related to call summaries, including AI-generated summaries and
      Sona voice assistant summaries
    name: Call Summaries
  - description: >-
      Operations related to call transcripts, including AI-generated transcripts
      and Sona voice assistant transcripts
    name: Call Transcripts
  - description: Operations related to contacts
    name: Contacts
  - description: Operations related to contact shares
    name: Contact Shares
  - description: Operations related to contact notes
    name: Contact Notes
  - description: Operations related to contact properties
    name: Contact Properties
  - description: Operations related to conversations
    name: Conversations
  - description: Operations related to workspace invitations
    name: Invites
  - description: Operations related to text messages
    name: Messages
  - description: Operations related to the organization
    name: Organization
  - description: Operations related to phone numbers
    name: Phone Numbers
  - description: Operations related to users
    name: Users
  - description: Operations related to webhooks
    name: Webhooks
  - description: >-
      Operations related to webhook events, including delivery history and test
      events
    name: Webhook Events
paths:
  /v1/messages:
    post:
      tags:
        - Messages
      summary: Send a text message
      description: Send a text message from your Quo number to a recipient.
      operationId: sendMessage_v1
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - content
                - from
                - to
              properties:
                content:
                  type: string
                  minLength: 1
                  maxLength: 1600
                  pattern: .*\S.*
                  description: The text content of the message to be sent.
                phoneNumberId:
                  description: >-
                    DEPRECATED, use "from" instead. Quo phone number ID to send
                    a message from
                  examples:
                    - OP1232abc
                  deprecated: true
                  example: OP1232abc
                  type: string
                  pattern: ^PN(.*)$
                from:
                  anyOf:
                    - type: string
                      pattern: ^PN(.*)$
                    - type: string
                      description: >-
                        A phone number in E.164 format, including the country
                        code.
                      examples:
                        - '+15555555555'
                      pattern: ^\+[1-9]\d{1,14}$
                      example: '+15555555555'
                  description: >-
                    The sender's phone number. Can be either your Quo phone
                    number ID or the full phone number in E.164 format.
                  examples:
                    - '+15555555555'
                  example: '+15555555555'
                to:
                  type: array
                  items:
                    anyOf:
                      - type: string
                        description: >-
                          A phone number in E.164 format, including the country
                          code.
                        examples:
                          - '+15555555555'
                        pattern: ^\+[1-9]\d{1,14}$
                        example: '+15555555555'
                      - type: string
                        maxLength: 15
                  minItems: 1
                  maxItems: 10
                  description: >-
                    Array of recipient phone numbers in E.164 format. Currently
                    supports a maximum of 10 recipients
                  examples:
                    - - '+15555555555'
                  example:
                    - '+15555555555'
                userId:
                  description: >-
                    The unique identifier of the Quo user sending the message.
                    If not provided, the message is attributed to the owner of
                    the phone number it is sent from. The sending user must be a
                    member of the phone number the message is sent from.
                  examples:
                    - US123abc
                  example: US123abc
                  type: string
                  pattern: ^US(.*)$
                setInboxStatus:
                  type: string
                  enum:
                    - done
                  description: >-
                    Used to set the status of the related Quo inbox
                    conversation. The default behavior without setting this
                    parameter will be for the message sent to show up as an open
                    conversation in the user's inbox. Setting the parameter to
                    `'done'` would move the conversation to the Done inbox view.
                  examples:
                    - done
                  example: done
      responses:
        '202':
          description: Accepted
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    type: object
                    required:
                      - id
                      - to
                      - from
                      - text
                      - phoneNumberId
                      - conversationId
                      - direction
                      - userId
                      - status
                      - createdAt
                      - updatedAt
                    properties:
                      id:
                        description: The unique identifier of the message.
                        examples:
                          - AC123abc
                        example: AC123abc
                        type: string
                        pattern: ^AC(.*)$
                      to:
                        type: array
                        items:
                          type: string
                          description: >-
                            A phone number in E.164 format, including the
                            country code.
                          examples:
                            - '+15555555555'
                          pattern: ^\+[1-9]\d{1,14}$
                          example: '+15555555555'
                        description: >-
                          Array of recipient phone numbers in E.164 format.
                          Includes your Quo number for incoming messages.
                        examples:
                          - - '+15555555555'
                        example:
                          - '+15555555555'
                      from:
                        type: string
                        description: >-
                          The from identifier, typically a E.164 phone number
                          but can be a variety of formats.
                        examples:
                          - '+15555555555'
                        example: '+15555555555'
                      text:
                        type: string
                        description: The content of the message.
                        examples:
                          - Hello, world!
                        example: Hello, world!
                      phoneNumberId:
                        anyOf:
                          - description: >-
                              The unique identifier of the Quo phone number that
                              the message was sent from.
                            examples:
                              - PN123abc
                            example: PN123abc
                            type: string
                            pattern: ^PN(.*)$
                          - type: 'null'
                      conversationId:
                        description: The unique identifier of the conversation.
                        examples:
                          - CN123abc
                        example: CN123abc
                        type: string
                        pattern: ^CN(.*)$
                      direction:
                        type: string
                        enum:
                          - incoming
                          - outgoing
                        description: >-
                          The direction of the message relative to the Quo
                          number.
                        examples:
                          - incoming
                        example: incoming
                      userId:
                        anyOf:
                          - description: >-
                              The unique identifier of the user who sent the
                              message. Null for incoming messages.
                            examples:
                              - US123abc
                            example: US123abc
                            type: string
                            pattern: ^US(.*)$
                          - type: 'null'
                      status:
                        type: string
                        enum:
                          - queued
                          - sent
                          - delivered
                          - undelivered
                          - received
                        description: The status of the message.
                        examples:
                          - sent
                        example: sent
                      createdAt:
                        description: >-
                          The timestamp when the message was created at, in ISO
                          8601 format
                        examples:
                          - '2022-01-01T00:00:00Z'
                        example: '2022-01-01T00:00:00Z'
                        type: string
                        format: date-time
                      updatedAt:
                        description: >-
                          The timestamp when the message status was last
                          updated, in ISO 8601 format.
                        examples:
                          - '2022-01-01T00:00:00Z'
                        example: '2022-01-01T00:00:00Z'
                        type: string
                        format: date-time
                      media:
                        type: array
                        items:
                          type: object
                          required:
                            - url
                          properties:
                            url:
                              type: string
                              description: The URL of the attached media.
                              examples:
                                - https://example.com/image.png
                              example: https://example.com/image.png
                            type:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: The MIME type of the attached media.
                              examples:
                                - image/png
                              example: image/png
                        description: Media attached to the message.
        '400':
          description: >-
            Bad Request | User Opted Out | Invalid `to` Phone Number |
            Unreachable `to` Phone Number | Not TFN Registered | A2P
            Registration Not Approved
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/BadRequestError3'
                  - $ref: '#/components/schemas/UserOptedOutError'
                  - $ref: '#/components/schemas/InvalidToPhoneNumberError'
                  - $ref: '#/components/schemas/UnreachableToPhoneNumberError'
                  - $ref: '#/components/schemas/NotTFNRegisteredError'
                  - $ref: '#/components/schemas/A2PRegistrationNotApprovedError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    required:
                      - error
                    properties:
                      error:
                        type: object
                        required:
                          - message
                          - key
                        properties:
                          message:
                            type: string
                          key:
                            type: string
                            const: Unauthorized
                          trace:
                            type: string
                  - type: object
                    required:
                      - message
                      - code
                      - status
                      - docs
                      - title
                    properties:
                      message:
                        type: string
                      code:
                        type: string
                        const: '0200401'
                      status:
                        type: number
                        const: 401
                      docs:
                        type: string
                        const: https://quo.com/docs
                      title:
                        type: string
                        const: Unauthorized
                      trace:
                        type: string
                      errors:
                        type: array
                        items:
                          type: object
                          required:
                            - path
                            - message
                            - schema
                          properties:
                            path:
                              type: string
                            message:
                              type: string
                            value: {}
                            schema:
                              type: object
                              required:
                                - type
                              properties:
                                type:
                                  type: string
        '402':
          description: >-
            Not Enough Credits | Subscription Expired | Text Allowance Used Up.
            The workspace is on an agent plan and has no texts left. The message
            says which allowance is used up and how to get more.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/NotEnoughCreditsError'
                  - $ref: '#/components/schemas/SubscriptionExpiredError'
                  - $ref: >-
                      #/components/schemas/TextAllowanceUsedUpTheWorkspaceIsOnAnAgentPlanAndHasNoTextsLeftTheMessageSaysWhichAllowanceIsUsedUpAndHowToGetMoreError
        '403':
          description: Forbidden | A2P Daily Message Cap Reached
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ForbiddenError4'
                  - $ref: '#/components/schemas/A2PDailyMessageCapReachedError'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                required:
                  - message
                  - code
                  - status
                  - docs
                  - title
                properties:
                  message:
                    type: string
                  code:
                    type: string
                    const: '0200404'
                  status:
                    type: number
                    const: 404
                  docs:
                    type: string
                    const: https://quo.com/docs
                  title:
                    type: string
                    const: Not Found
                  trace:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      required:
                        - path
                        - message
                        - schema
                      properties:
                        path:
                          type: string
                        message:
                          type: string
                        value: {}
                        schema:
                          type: object
                          required:
                            - type
                          properties:
                            type:
                              type: string
        '429':
          description: >-
            Too Many Requests. `RATE_LIMIT_EXCEEDED`: the API key sent too many
            requests per second; retry after a short delay. `0200429`: the
            organization reached its daily outbound conversation limit.
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    required:
                      - message
                      - code
                      - status
                      - docs
                      - title
                    properties:
                      message:
                        type: string
                      code:
                        type: string
                        const: '0200429'
                      status:
                        type: number
                        const: 429
                      docs:
                        type: string
                        const: https://quo.com/docs
                      title:
                        type: string
                        const: Daily Conversation Limit Reached
                      trace:
                        type: string
                      errors:
                        type: array
                        items:
                          type: object
                          required:
                            - path
                            - message
                            - schema
                          properties:
                            path:
                              type: string
                            message:
                              type: string
                            value: {}
                            schema:
                              type: object
                              required:
                                - type
                              properties:
                                type:
                                  type: string
                  - type: object
                    required:
                      - message
                      - code
                      - status
                      - docs
                      - title
                    properties:
                      message:
                        type: string
                      code:
                        type: string
                      status:
                        type: number
                        const: 429
                      docs:
                        type: string
                        const: https://quo.com/docs
                      title:
                        type: string
                        const: Too Many Requests
                      trace:
                        type: string
                      errors:
                        type: array
                        items:
                          type: object
                          required:
                            - path
                            - message
                            - schema
                          properties:
                            path:
                              type: string
                            message:
                              type: string
                            value: {}
                            schema:
                              type: object
                              required:
                                - type
                              properties:
                                type:
                                  type: string
        '500':
          description: Unexpected Error | Unknown Error
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/UnexpectedError9'
                  - $ref: '#/components/schemas/UnknownError9'
      security:
        - apiKey: []
components:
  schemas:
    BadRequestError3:
      type: object
      required:
        - message
        - code
        - status
        - docs
        - title
      properties:
        message:
          type: string
        code:
          type: string
          const: '0200400'
        status:
          type: number
          const: 400
        docs:
          type: string
          const: https://quo.com/docs
        title:
          type: string
          const: Bad Request
        trace:
          type: string
        errors:
          type: array
          items:
            type: object
            required:
              - path
              - message
              - schema
            properties:
              path:
                type: string
              message:
                type: string
              value: {}
              schema:
                type: object
                required:
                  - type
                properties:
                  type:
                    type: string
      title: Bad Request
    UserOptedOutError:
      type: object
      required:
        - message
        - code
        - status
        - docs
        - title
      properties:
        message:
          type: string
        code:
          type: string
          const: '0201400'
        status:
          type: number
          const: 400
        docs:
          type: string
          const: https://quo.com/docs
        title:
          type: string
          const: User Opted Out
        trace:
          type: string
        errors:
          type: array
          items:
            type: object
            required:
              - path
              - message
              - schema
            properties:
              path:
                type: string
              message:
                type: string
              value: {}
              schema:
                type: object
                required:
                  - type
                properties:
                  type:
                    type: string
      title: User Opted Out
    InvalidToPhoneNumberError:
      type: object
      required:
        - message
        - code
        - status
        - docs
        - title
      properties:
        message:
          type: string
        code:
          type: string
          const: '0202400'
        status:
          type: number
          const: 400
        docs:
          type: string
          const: https://quo.com/docs
        title:
          type: string
          const: Invalid `to` Phone Number
        trace:
          type: string
        errors:
          type: array
          items:
            type: object
            required:
              - path
              - message
              - schema
            properties:
              path:
                type: string
              message:
                type: string
              value: {}
              schema:
                type: object
                required:
                  - type
                properties:
                  type:
                    type: string
      title: Invalid `to` Phone Number
    UnreachableToPhoneNumberError:
      type: object
      required:
        - message
        - code
        - status
        - docs
        - title
      properties:
        message:
          type: string
        code:
          type: string
          const: '0203400'
        status:
          type: number
          const: 400
        docs:
          type: string
          const: https://quo.com/docs
        title:
          type: string
          const: Unreachable `to` Phone Number
        trace:
          type: string
        errors:
          type: array
          items:
            type: object
            required:
              - path
              - message
              - schema
            properties:
              path:
                type: string
              message:
                type: string
              value: {}
              schema:
                type: object
                required:
                  - type
                properties:
                  type:
                    type: string
      title: Unreachable `to` Phone Number
    NotTFNRegisteredError:
      type: object
      required:
        - message
        - code
        - status
        - docs
        - title
      properties:
        message:
          type: string
        code:
          type: string
          const: '0207400'
        status:
          type: number
          const: 400
        docs:
          type: string
          const: https://quo.com/docs
        title:
          type: string
          const: Not TFN Registered
        trace:
          type: string
        errors:
          type: array
          items:
            type: object
            required:
              - path
              - message
              - schema
            properties:
              path:
                type: string
              message:
                type: string
              value: {}
              schema:
                type: object
                required:
                  - type
                properties:
                  type:
                    type: string
      title: Not TFN Registered
    A2PRegistrationNotApprovedError:
      type: object
      required:
        - message
        - code
        - status
        - docs
        - title
      properties:
        message:
          type: string
        code:
          type: string
          const: '0206400'
        status:
          type: number
          const: 400
        docs:
          type: string
          const: https://quo.com/docs
        title:
          type: string
          const: A2P Registration Not Approved
        trace:
          type: string
        errors:
          type: array
          items:
            type: object
            required:
              - path
              - message
              - schema
            properties:
              path:
                type: string
              message:
                type: string
              value: {}
              schema:
                type: object
                required:
                  - type
                properties:
                  type:
                    type: string
      title: A2P Registration Not Approved
    NotEnoughCreditsError:
      type: object
      required:
        - message
        - code
        - status
        - docs
        - title
      properties:
        message:
          type: string
        code:
          type: string
          const: '0200402'
        status:
          type: number
          const: 402
        docs:
          type: string
          const: https://quo.com/docs
        title:
          type: string
          const: Not Enough Credits
        trace:
          type: string
        errors:
          type: array
          items:
            type: object
            required:
              - path
              - message
              - schema
            properties:
              path:
                type: string
              message:
                type: string
              value: {}
              schema:
                type: object
                required:
                  - type
                properties:
                  type:
                    type: string
      title: Not Enough Credits
    SubscriptionExpiredError:
      type: object
      required:
        - message
        - code
        - status
        - docs
        - title
        - description
      properties:
        message:
          type: string
        code:
          type: string
          const: '0201402'
        status:
          type: number
          const: 402
        docs:
          type: string
          const: https://quo.com/docs
        title:
          type: string
          const: Subscription Expired
        trace:
          type: string
        errors:
          type: array
          items:
            type: object
            required:
              - path
              - message
              - schema
            properties:
              path:
                type: string
              message:
                type: string
              value: {}
              schema:
                type: object
                required:
                  - type
                properties:
                  type:
                    type: string
        description:
          type: string
          const: Your subscription has expired
      title: Subscription Expired
    TextAllowanceUsedUpTheWorkspaceIsOnAnAgentPlanAndHasNoTextsLeftTheMessageSaysWhichAllowanceIsUsedUpAndHowToGetMoreError:
      type: object
      required:
        - message
        - code
        - status
        - docs
        - title
      properties:
        message:
          type: string
        code:
          type: string
          const: '0202402'
        status:
          type: number
          const: 402
        docs:
          type: string
          const: https://quo.com/docs
        title:
          type: string
          const: Text Allowance Used Up
        trace:
          type: string
        errors:
          type: array
          items:
            type: object
            required:
              - path
              - message
              - schema
            properties:
              path:
                type: string
              message:
                type: string
              value: {}
              schema:
                type: object
                required:
                  - type
                properties:
                  type:
                    type: string
      title: >-
        Text Allowance Used Up. The workspace is on an agent plan and has no
        texts left. The message says which allowance is used up and how to get
        more.
    ForbiddenError4:
      anyOf:
        - type: object
          required:
            - message
            - code
            - status
            - docs
            - title
          properties:
            message:
              type: string
            code:
              type: string
              const: '0200403'
            status:
              type: number
              const: 403
            docs:
              type: string
              const: https://quo.com/docs
            title:
              type: string
              const: Forbidden
            trace:
              type: string
            errors:
              type: array
              items:
                type: object
                required:
                  - path
                  - message
                  - schema
                properties:
                  path:
                    type: string
                  message:
                    type: string
                  value: {}
                  schema:
                    type: object
                    required:
                      - type
                    properties:
                      type:
                        type: string
        - type: object
          required:
            - message
            - code
            - status
            - docs
            - title
          properties:
            message:
              type: string
            code:
              type: string
              const: '0202403'
            status:
              type: number
              const: 403
            docs:
              type: string
              const: https://quo.com/docs
            title:
              type: string
              const: Not Phone Number User
            trace:
              type: string
            errors:
              type: array
              items:
                type: object
                required:
                  - path
                  - message
                  - schema
                properties:
                  path:
                    type: string
                  message:
                    type: string
                  value: {}
                  schema:
                    type: object
                    required:
                      - type
                    properties:
                      type:
                        type: string
        - type: object
          required:
            - message
            - code
            - status
            - docs
            - title
          properties:
            message:
              type: string
            code:
              type: string
              const: '0203403'
            status:
              type: number
              const: 403
            docs:
              type: string
              const: https://quo.com/docs
            title:
              type: string
              const: International Messaging Not Allowed
            trace:
              type: string
            errors:
              type: array
              items:
                type: object
                required:
                  - path
                  - message
                  - schema
                properties:
                  path:
                    type: string
                  message:
                    type: string
                  value: {}
                  schema:
                    type: object
                    required:
                      - type
                    properties:
                      type:
                        type: string
      title: Forbidden
    A2PDailyMessageCapReachedError:
      anyOf:
        - type: object
          required:
            - message
            - code
            - status
            - docs
            - title
          properties:
            message:
              type: string
            code:
              type: string
              const: '0200403'
            status:
              type: number
              const: 403
            docs:
              type: string
              const: https://quo.com/docs
            title:
              type: string
              const: Forbidden
            trace:
              type: string
            errors:
              type: array
              items:
                type: object
                required:
                  - path
                  - message
                  - schema
                properties:
                  path:
                    type: string
                  message:
                    type: string
                  value: {}
                  schema:
                    type: object
                    required:
                      - type
                    properties:
                      type:
                        type: string
        - type: object
          required:
            - message
            - code
            - status
            - docs
            - title
          properties:
            message:
              type: string
            code:
              type: string
              const: '0202403'
            status:
              type: number
              const: 403
            docs:
              type: string
              const: https://quo.com/docs
            title:
              type: string
              const: Not Phone Number User
            trace:
              type: string
            errors:
              type: array
              items:
                type: object
                required:
                  - path
                  - message
                  - schema
                properties:
                  path:
                    type: string
                  message:
                    type: string
                  value: {}
                  schema:
                    type: object
                    required:
                      - type
                    properties:
                      type:
                        type: string
        - type: object
          required:
            - message
            - code
            - status
            - docs
            - title
          properties:
            message:
              type: string
            code:
              type: string
              const: '0203403'
            status:
              type: number
              const: 403
            docs:
              type: string
              const: https://quo.com/docs
            title:
              type: string
              const: International Messaging Not Allowed
            trace:
              type: string
            errors:
              type: array
              items:
                type: object
                required:
                  - path
                  - message
                  - schema
                properties:
                  path:
                    type: string
                  message:
                    type: string
                  value: {}
                  schema:
                    type: object
                    required:
                      - type
                    properties:
                      type:
                        type: string
      title: A2P Daily Message Cap Reached
    UnexpectedError9:
      type: object
      required:
        - message
        - code
        - status
        - docs
        - title
      properties:
        message:
          type: string
        code:
          type: string
          const: '0200500'
        status:
          type: number
          const: 500
        docs:
          type: string
          const: https://quo.com/docs
        title:
          type: string
          const: Unexpected
        trace:
          type: string
        errors:
          type: array
          items:
            type: object
            required:
              - path
              - message
              - schema
            properties:
              path:
                type: string
              message:
                type: string
              value: {}
              schema:
                type: object
                required:
                  - type
                properties:
                  type:
                    type: string
      title: Unexpected Error
    UnknownError9:
      type: object
      required:
        - message
        - code
        - status
        - docs
        - title
      properties:
        message:
          type: string
        code:
          type: string
          const: '0201500'
        status:
          type: number
          const: 500
        docs:
          type: string
          const: https://quo.com/docs
        title:
          type: string
          const: Unknown
        trace:
          type: string
        errors:
          type: array
          items:
            type: object
            required:
              - path
              - message
              - schema
            properties:
              path:
                type: string
              message:
                type: string
              value: {}
              schema:
                type: object
                required:
                  - type
                properties:
                  type:
                    type: string
      title: Unknown Error
  securitySchemes:
    apiKey:
      in: header
      name: Authorization
      type: apiKey

````