SendHub Message API

Send and manage messages.

Operations 5

POST /v1/messages Send an SMS or MMS message #
GET /v1/messages/{message_id} Get Message #
PUT /v1/messages/{message_id} Update Message #
DELETE /v1/messages/{message_id} Delete Message #
GET /v1/messages/scheduled List scheduled messages #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/sendhub-message-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

sendhub-message-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: SendHub Authentication Message API
  version: v1
  contact:
    name: Contact SendHub
    email: support@sendhub.com
  termsOfService: https://www.sendhub.com/terms/
  license:
    url: https://www.sendhub.com/terms/#:~:text=Limited%20License
    name: Limited
  description: 'SendHub''s REST-like API allows you to control & interact with your SendHub account programmatically.


    Note: this documentation is in Beta and may be updated periodically.'
servers:
- url: https://api.sendhub.com
  description: SendHub's API
security:
- username: []
  api_key: []
- basic_auth: []
tags:
- name: Message
  x-displayName: Messages
  description: Send and manage messages.
paths:
  /v1/messages:
    x-testConfig:
      enabled: true
    post:
      x-testConfig:
        body:
          contacts:
          - '+12015716227'
          text: Hey got 'em
          mms:
            filename: funny_video.mp4
            url: https://drive.google.com/uc?export=download&id=1-0NB0DJJKrh1u9uvsfKWDYS5DwaRHevN
      summary: Send an SMS or MMS message
      description: Sends an SMS (or MMS based on your plan) to a list of contacts, phone numbers or groups.
      operationId: sendMessage
      tags:
      - Message
      responses:
        '201':
          $ref: '#/components/responses/sendMessage201'
        '401':
          $ref: '#/components/responses/401'
        '420':
          $ref: '#/components/responses/420PlanLimit'
        '429':
          $ref: '#/components/responses/429RateLimiting'
      requestBody:
        $ref: '#/components/requestBodies/sendMessage'
  /v1/messages/{message_id}:
    x-testConfig:
      enabled: true
      pathParameters:
        message_id: '{{message_id}}'
    parameters:
    - in: path
      required: true
      name: message_id
      schema:
        type: string
      description: The message ID
    get:
      tags:
      - Message
      summary: Get Message
      description: Retrieves an existing message by its Id
      operationId: getMessage
      responses:
        '200':
          $ref: '#/components/responses/getMessage200'
          x-$ref: '#/components/responses/getMessage200'
        '401':
          $ref: '#/components/responses/401'
        '404':
          description: Message not found
        '420':
          $ref: '#/components/responses/420PlanLimit'
        '429':
          $ref: '#/components/responses/429RateLimiting'
    put:
      x-testConfig:
        body:
          contacts:
          - '+18884445555'
          text: Hey got 'em
          mms:
            filename: funny_video.mp4
            url: https://drive.google.com/uc?export=download&id=1-0NB0DJJKrh1u9uvsfKWDYS5DwaRHevN
      tags:
      - Message
      summary: Update Message
      description: Updates a scheduled message
      operationId: updateMessage
      requestBody:
        $ref: '#/components/requestBodies/sendMessage'
      responses:
        '201':
          $ref: '#/components/responses/updateMessage201'
        '401':
          $ref: '#/components/responses/401'
        '404':
          $ref: '#/components/responses/deleteMessage404'
        '420':
          $ref: '#/components/responses/420PlanLimit'
        '429':
          $ref: '#/components/responses/429RateLimiting'
    delete:
      x-testConfig:
        enabled: false
      tags:
      - Message
      summary: Delete Message
      description: Deletes an individual message by its id
      operationId: deleteMessage
      responses:
        '200':
          $ref: '#/components/responses/deleteMessage200'
        '401':
          $ref: '#/components/responses/401'
        '404':
          $ref: '#/components/responses/deleteMessage404'
        '420':
          $ref: '#/components/responses/420PlanLimit'
        '429':
          $ref: '#/components/responses/429RateLimiting'
  /v1/messages/scheduled:
    x-testConfig:
      enabled: true
    get:
      x-testConfig:
        params:
          limit: 1
      summary: List scheduled messages
      description: Lists scheduled messages
      operationId: listScheduledMessages
      tags:
      - Message
      responses:
        '200':
          $ref: '#/components/responses/listScheduledMessages200'
        '400':
          $ref: '#/components/responses/listScheduledMessages400'
        '401':
          $ref: '#/components/responses/401'
        '420':
          $ref: '#/components/responses/420PlanLimit'
        '429':
          $ref: '#/components/responses/429RateLimiting'
components:
  responses:
    deleteMessage404:
      description: Message not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorObject'
          examples:
            Message not found:
              summary: Message not found
              value:
                error: Requested message not found
                status: 404
    420PlanLimit:
      description: You've reached your plan's API limit for this month or you're on a plan that doesn't include API access
      content:
        application/json:
          schema:
            properties:
              error:
                type: string
          examples:
            You've reached your plan's API limit for this month or you're on a plan that doesn't include API access:
              summary: You've reached your plan's API limit for this month or you're on a plan that doesn't include API access
              value:
                error: You have made too many requests and are being rate limited
    getMessage200:
      description: Success
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/message'
            x-$ref: '#/components/schemas/message'
    updateMessage201:
      description: Success
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/updateMessageResponse'
    listScheduledMessages200:
      description: Success
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/listScheduledMessagesResponse'
    '401':
      description: The credentials you supplied are invalid
    sendMessage201:
      description: Success
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/sendMessageResponse'
          examples:
            Sent message with attachment (from URL):
              value:
                acknowledgment: Message queued for sending.
                contacts:
                - blocked: false
                  date_created: '2020-04-08T17:57:38'
                  date_modified: '2021-08-25T06:41:06'
                  deleted: false
                  extra_info: '{}'
                  id: '116006957938283973'
                  id_str: '116006957938283973'
                  is_owned: true
                  keyword: deleted116006957938283973
                  name: John Smith
                  number: '+19198915828'
                  screened: false
                  smsGateway: sendhub
                  user_id: '283014186889381821'
                created_at: '2021-09-07T19:28:39.099805'
                deleted: false
                direction: to
                force_shortlink_creation: false
                groups:
                - check_all: false
                  date_created: '2021-08-10T18:33:57'
                  date_modified: '2021-08-30T18:23:00'
                  deleted: false
                  id: '115999753870991332'
                  id_str: '115999753870991332'
                  is_shared: false
                  mediums: '["sms"]'
                  name: ACME Alerts
                  permissions: write
                  slug: alerts
                  text_to_subscribe: true
                  ttjResponse: 'Thanks for opting in!

                    Opt-out anytime by replying UNSUBSCRIBE ALERTS'
                  user_id: '283014186889381821'
                id: '115988808197247577'
                id_is_thread_id: true
                message_id: '115995236872293501'
                mms:
                  filename: funny_video.mp4
                modified_at: '2021-09-07T19:28:39.123132'
                resource_uri: /v1/threads/115988808197247577
                scheduled_at: null
                sent: '2021-09-07T19:28:39.099805'
                shortlink: http://sh.gl/5vUtCa
                text: 'Hey got ''em''

                  File: http://sh.gl/5vUtCa'
                thread_id: '115988808197247577'
                type: message-out
                unread: null
                via_shortcode: false
    listScheduledMessages400:
      description: Bad Request
      content:
        application/json:
          schema:
            anyOf:
            - type: object
              properties:
                message:
                  type: string
                code:
                  type: string
                  enum:
                  - '400'
                error:
                  type: string
                moreInfo:
                  type: string
            - type: object
              properties:
                message:
                  type: string
          examples:
            '`text` field missing or invalid':
              $ref: '#/components/examples/sendMessage400Response1'
            Trying to send to 0 contacts and 0 groups:
              $ref: '#/components/examples/sendMessage400Response2'
            '`text` field exceeded the 1,600 character limit':
              $ref: '#/components/examples/sendMessage400Response3'
    deleteMessage200:
      description: Success
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Success message
          examples:
            Record successfully deleted:
              value:
                message: Record successfully deleted
    429RateLimiting:
      description: You've sent too many requests in a short amount of time and are being rate-limited
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/rateLimitingResponse'
          examples:
            Too Many Requests:
              summary: You've been rate-limited and can send again in 30-seconds
              value:
                message: You have sent too many requests.
                code: '429'
                error: Too Many Requests
                devMessage: ''
                moreInfo: ''
                timeLeft: 0:00:30
  schemas:
    textToSubscribe:
      type: boolean
      default: false
      description: Whether to enable text-to-join functionality for this group
    messageUnread:
      type:
      - boolean
      - 'null'
      description: 'Whether or not the message is marked as unread

        Changing this will mark the corresponding thread as read or unread'
    rateLimitingResponse:
      properties:
        message:
          type: string
          example: You have sent too many requests.
        code:
          type: string
          pattern: ^\d+$
          example: '429'
        error:
          type: string
          example: Too Many Requests
        devMessage:
          type: string
        moreInfo:
          type: string
        timeLeft:
          type: string
          pattern: ^\d:[0-5]\d:[0-5]\d$
    id:
      type: string
      pattern: ^\d+$
    contactId:
      allOf:
      - $ref: '#/components/schemas/id'
      description: The contact ID
    message:
      type: object
      properties:
        acknowledgment:
          $ref: '#/components/schemas/acknowledgment'
        contacts:
          type: array
          items:
            $ref: '#/components/schemas/messageNestedContact'
            x-$ref: '#/components/schemas/messageNestedContact'
        created_at:
          $ref: '#/components/schemas/createdTs'
        deleted:
          $ref: '#/components/schemas/deleted'
        direction:
          $ref: '#/components/schemas/direction'
        force_shortlink_creation:
          $ref: '#/components/schemas/forceShortlinkCreation'
        groups:
          type: array
          items:
            $ref: '#/components/schemas/messageNestedGroup'
        id:
          $ref: '#/components/schemas/dynamicThreadId'
        id_is_thread_id:
          $ref: '#/components/schemas/idIsThreadId'
        message_id:
          $ref: '#/components/schemas/messageId'
        modified_at:
          $ref: '#/components/schemas/modifiedTs'
        resource_uri:
          $ref: '#/components/schemas/messageResourceUri'
        scheduled_at:
          $ref: '#/components/schemas/scheduledAt'
        sent:
          $ref: '#/components/schemas/sent'
        shortlink:
          $ref: '#/components/schemas/shortlink'
        text:
          $ref: '#/components/schemas/messageText'
        thread_id:
          $ref: '#/components/schemas/threadId'
        type:
          $ref: '#/components/schemas/messageType'
        unread:
          $ref: '#/components/schemas/messageUnread'
        via_shortcode:
          $ref: '#/components/schemas/messageViaShortcode'
        mms:
          $ref: '#/components/schemas/mmsOnlyFilename'
      required:
      - acknowledgment
      - contacts
      - created_at
      - deleted
      - direction
      - force_shortlink_creation
      - groups
      - id
      - id_is_thread_id
      - message_id
      - modified_at
      - resource_uri
      - scheduled_at
      - sent
      - shortlink
      - text
      - thread_id
      - type
      - unread
      - via_shortcode
    idIsThreadId:
      type: boolean
      description: Determines whether `id` is the thread ID or the message ID
    dynamicThreadId:
      allOf:
      - $ref: '#/components/schemas/id'
      description: If `id_is_thread_id` is true, this is the `thread_id`, otherwise it's the `message_id`
    idStr:
      type: string
      pattern: ^\d+$
      description: Same as id but always a string
    sent:
      title: sent
      allOf:
      - $ref: '#/components/schemas/timestamp'
      - type:
        - string
        - 'null'
      description: The date & time **in UTC** the message was sent at.
    groupName:
      type: string
      description: The group's name
      minLength: 1
      maxLength: 128
    contactIdInt:
      type: integer
      format: int64
      description: The contact ID
    scheduledAt:
      title: scheduledAt
      type:
      - string
      - 'null'
      description: 'The date & time **in UTC** to schedule the message to be sent at.


        **Note:** it **must** be exactly 24-characters long and in this format: `2022-04-13T15:29:40+0000`'
      pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}[-+]\d{4}$
    messageGroupIds:
      type: array
      description: Group ids
      items:
        type: string
        oneOf:
        - $ref: '#/components/schemas/groupId'
        - $ref: '#/components/schemas/groupIdInt'
    nullableString:
      type:
      - string
      - 'null'
    threadId:
      allOf:
      - $ref: '#/components/schemas/id'
      description: The thread ID
    sendMessageRequestAtLeastGroups:
      type: object
      title: sendMessageRequestAtLeastGroups
      additionalProperties: false
      required:
      - text
      - groups
      properties:
        text:
          $ref: '#/components/schemas/messageText'
        scheduled_at:
          $ref: '#/components/schemas/scheduledAt'
        mms:
          $ref: '#/components/schemas/mms'
        groups:
          allOf:
          - $ref: '#/components/schemas/messageGroupIds'
          - minItems: 1
    mmsOnlyFilename:
      type: object
      oneOf:
      - properties:
          filename:
            type: string
          url:
            type: string
            format: uri
            description: Publicly-accessible URL
        required:
        - filename
        - url
      - properties:
          filename:
            type: string
          data:
            type: string
            format: byte
            description: Base64-encoded file
        required:
        - filename
        - data
    userId:
      allOf:
      - $ref: '#/components/schemas/id'
      description: The ID of a SendHub user (an individual line)
    screened:
      type: boolean
      description: Whether the contact has been blocked by you
    messageId:
      allOf:
      - $ref: '#/components/schemas/id'
      description: The message ID
    direction:
      description: The direction of the message; `outbound-api` or `incoming`
      type: string
      enum:
      - outbound-api
      - incoming
    blocked:
      type: boolean
      description: Opt-out status (eg. if they texted `Stop`, `Cancel`, `Block`, `Quit` or `End` - [more info](https://sendhub.force.com/support/s/article/SendHub-Number-FAQ))
    extraInfo:
      type: string
      description: JSON-escaped object containing this contact's custom field(s)
      maxLength: 65535
      readOnly: true
    timestamp:
      type: string
      description: 'A UTC timestamp


        `2021-08-01T03:48:55.350453` equals August 1st, 2021 at 3:48 and 55.350453 seconds AM (UTC)'
      example: '2021-08-01T03:48:55.350453'
      pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{6}$
    contactIdBoth:
      type: string
      anyOf:
      - $ref: '#/components/schemas/contactId'
      - $ref: '#/components/schemas/contactIdInt'
    messageNestedGroup:
      type: object
      allOf:
      - $ref: '#/components/schemas/threadNestedGroup'
      - properties:
          date_created:
            $ref: '#/components/schemas/timestampWithoutDecimal'
          date_modified:
            $ref: '#/components/schemas/timestampWithoutDecimal'
          is_shared:
            $ref: '#/components/schemas/isShared'
          permissions:
            $ref: '#/components/schemas/groupPermissions'
          user_id:
            $ref: '#/components/schemas/userId'
    groupPermissions:
      allOf:
      - $ref: '#/components/schemas/nullableString'
      - default: write
        enum:
        - write
    updateMessageResponse:
      allOf:
      - x-$ref: '#/components/schemas/sendMessageRequest'
      - $ref: '#/components/schemas/sendMessageRequest'
    sendMessageRequestBoth:
      type: object
      title: sendMessageRequestBoth
      allOf:
      - $ref: '#/components/schemas/baseSendMessageRequest'
      - type: object
        required:
        - groups
        - contacts
        properties:
          groups:
            allOf:
            - $ref: '#/components/schemas/messageGroupIds'
            - minItems: 1
          contacts:
            allOf:
            - $ref: '#/components/schemas/messageContactIdsOrNumbers'
            - minItems: 1
    messageResourceUri:
      type: string
      pattern: ^\/v\d+(\.\d+)*\/messages\/\d+$
      description: Resource URI for this message
      example: /v1/messages/123
    groupIdInt:
      type: integer
      format: int64
      description: The group ID
    contactNumber:
      type: string
      pattern: ^\+1\d{10}$
      description: The contact's phone number
    contactName:
      type: string
      description: The contact's name
      minLength: 1
      maxLength: 128
    sendMessageRequestAtLeastContacts:
      type: object
      title: sendMessageRequestAtLeastContacts
      required:
      - text
      - contacts
      properties:
        text:
          $ref: '#/components/schemas/messageText'
        scheduled_at:
          $ref: '#/components/schemas/scheduledAt'
        mms:
          $ref: '#/components/schemas/mms'
        contacts:
          allOf:
          - $ref: '#/components/schemas/messageContactIdsOrNumbers'
          - minItems: 1
    modifiedTs:
      allOf:
      - $ref: '#/components/schemas/timestamp'
      - minLength: 1
        readOnly: true
    mms:
      title: mms
      type: object
      oneOf:
      - title: Attachment via URL
        type: object
        properties:
          filename:
            type: string
          url:
            type: string
            format: uri
            description: Publicly-accessible URL
        required:
        - filename
        - url
      - title: Attachment via Base64-encoded file
        type: object
        properties:
          filename:
            type: string
          data:
            type: string
            format: byte
            description: Base64-encoded file
        required:
        - filename
        - data
    errorObject:
      type: object
      properties:
        error:
          type: string
        status:
          type: number
    isShared:
      type: boolean
      description: Whether the group is shared between the lines
      deprecated: true
    messageContactIdsOrNumbers:
      title: messageContactIdsOrNumbers
      type: array
      maxItems: 25
      items:
        type: string
        oneOf:
        - $ref: '#/components/schemas/contactIdBoth'
        - type: string
          pattern: ^\+1\d{10}$
          description: 'Phone number


            **Note:** the phone number _**must**_ be in the E.164 format (eg. `+18004445555`)'
    ttjResponse:
      type: string
      maximum: 70
      default: You are now subscribed.
      description: A custom response sent when someone texts-to-join this group
    smsGateway:
      type: string
      example: sendhub
      description: This is used internally and may be expanded upon or removed in the future
      readOnly: true
    directionToFrom:
      description: The direction of the message; `to` or `from` the contact
      type: string
      enum:
      - to
      - from
    forceShortlinkCreation:
      type: boolean
      description: If `true`, creates a shortlink for this message regardless if there's an attachment.
    acknowledgment:
      type:
      - string
      - 'null'
      minLength: 1
      example: Message queued for sending.
    isOwned:
      type: boolean
      description: This is used internally and may be expanded upon or removed in the future
      readOnly: true
    threadNestedGroup:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/groupId'
        id_str:
          $ref: '#/components/schemas/idStr'
        name:
          $ref: '#/components/schemas/groupName'
        slug:
          $ref: '#/components/schemas/groupSlug'
        text_to_subscribe:
          $ref: '#/components/schemas/textToSubscribe'
        mediums:
          $ref: '#/components/schemas/groupMediums'
        check_all:
          $ref: '#/components/schemas/groupCheckAll'
        deleted:
          $ref: '#/components/schemas/deleted'
        ttjResponse:
          $ref: '#/components/schemas/ttjResponse'
    timestampWithoutDecimal:
      type: string
      description: 'A UTC timestamp


        `2021-08-01T03:48:34` equals August 1st, 2021 at 3:48 and 34 seconds AM (UTC)'
      example: '2021-08-01T03:48:34'
      pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$
    listScheduledMessagesResponse:
      type: object
      description: ''
      properties:
        objects:
          items:
            type: object
    sendMessageRequest:
      type: object
      title: sendMessageRequest
      oneOf:
      - allOf:
        - x-$ref: '#/components/schemas/sendMessageRequestAtLeastContacts'
        - $ref: '#/components/schemas/sendMessageRequestAtLeastContacts'
      - allOf:
        - x-$ref: '#/components/schemas/sendMessageRequestAtLeastGroups'
        - $ref: '#/components/schemas/sendMessageRequestAtLeastGroups'
      - allOf:
        - x-$ref: '#/components/schemas/sendMessageRequestBoth'
        - $ref: '#/components/schemas/sendMessageRequestBoth'
    baseSendMessageRequest:
      type: object
      title: baseSendMessageRequest
      additionalProperties: false
      properties:
        text:
          $ref: '#/components/schemas/messageText'
        scheduled_at:
          $ref: '#/components/schemas/scheduledAt'
        mms:
          $ref: '#/components/schemas/mms'
      required:
      - text
    messageCreatedAt:
      allOf:
      - $ref: '#/components/schemas/timestamp'
      description: UTC timestamp of when the message was created
    messageNestedContact:
      properties:
        blocked:
          $ref: '#/components/schemas/blocked'
        deleted:
          $ref: '#/components/schemas/deleted'
        id:
          $ref: '#/components/schemas/contactId'
        id_str:
          $ref: '#/components/schemas/idStr'
        is_owned:
          $ref: '#/components/schemas/isOwned'
        keyword:
          $ref: '#/components/schemas/contactKeyword'
        name:
          $ref: '#/components/schemas/contactName'
        number:
          $ref: '#/components/schemas/contactNumber'
        screened:
          $ref: '#/components/schemas/screened'
        user_id:
          $ref: '#/components/schemas/userId'
        date_created:
          $ref: '#/components/schemas/timestampWithoutDecimal'
        date_modified:
          $ref: '#/components/schemas/timestampWithoutDecimal'
        extra_info:
          $ref: '#/components/schemas/extraInfo'
        smsGateway:
          $ref: '#/components/schemas/smsGateway'
    groupId:
      type: string
      allOf:
      - $ref: '#/components/schemas/id'
      description: The group ID
    shortlink:
      type: string
      description: A short link generated by SendHub when you send a message with an attachment or with `force_shortlink_creation` set to `true`
      pattern: ^$|^https?://sh.gl/[a-zA-Z0-9]+$
    createdTs:
      allOf:
      - $ref: '#/components/schemas/timestamp'
      - minLength: 1
        readOnly: true
    sendMessageResponse:
      type: object
      description: Successfully queued or scheduled the message for sending
      properties:
        acknowledgment:
          $ref: '#/components/schemas/acknowledgment'
        contacts:
          type: array
          uniqueItems: true
          items:
            required:
            - blocked
            - date_created
            - date_modified
            - deleted
            - extra_info
            - id
            - id_str
            - is_owned
            - keyword
            - name
            - number
            - screened
            - smsGateway
            - user_id
            properties:
              blocked:
                type: boolean
              date_created:
                type: string
                minLength: 1
              date_modified:
                type: string
                minLength: 1
              deleted:
                type: boolean
              extra_info:
                type: string
                minLength: 1
              id:
                type: string
                minLength: 1
              id_str:
                type: string
                minLength: 1
              is_owned:
                type: boolean
              keyword:
                type: string
                minLength: 1
              name:
                type: string
                minLength: 1
              number:
                type: string
                minLength: 1
              screened:
                type: boolean
              smsGateway:
                type: string
                minLength: 1
              user_id:
                type: string
                minLength: 1
        created_at:
          $ref: '#/components/schemas/messageCreatedAt'
        deleted:
          $ref: '#/components/schemas/deleted'
        direction:
          $ref: '#/components/schemas/directionToFrom'
        force_shortlink_creation:
          $ref: '#/components/schemas/forceShortlinkCreation'
        groups:
          type: array
          uniqueItems: true
          items:
            required:
            - check_all
            - date_created
            - date_modified
            - deleted
            - id
            - id_str
            - is_shared
            - mediums
            - name
            - permissions
            - slug
            - text_to_subscribe
            - ttjResponse
            - user_id
            properties:
              check_all:
                type: boolean
              date_created:
                type: string
                minLength: 1
              date_modified:
                type: string
                minLength: 1
              deleted:
                type: boolean
              id:
                type: string
                minLength: 1
              id_str:
                type: string
                minLength: 1
              is_shared:
                type: boolean
              mediums:
                type: string
                minLength: 1
              name:
                type: string
                minLength: 1
              permissions:
                type: string
                minLength: 1
              slug:
                type: string
                minLength: 1
              text_to_subscribe:
                type: boolean
              ttjResponse:
                type: string
                minLength: 1
              user_id:
                type: string
                minLength: 1
        id:
          type: string
          minLength: 1
        id_is_thread_id:
          type: boolean
        message_id:
          type: string
          minLength: 1
        mms:
          type: object
          properties:
            filename:
              type: string
              minLength: 1
          required:
          - filename
        modified_at:
          type: string
          minLength: 1
        resource_uri:
          type: string
          minLength: 1
        scheduled_at:
          $ref: '#/components/schemas/scheduledAt'
        sent:
          $ref: '#/components/schemas/sent'
        shortlink:
          type: string
          minLength: 1
        text:
          type: string
          minLength: 1
        thread_id:
          type: string
          minLength: 1
        type:
          type: string
          minLength: 1
        unread:
          $ref: '#/components/schemas/messageUnread'
        via_shortcode:
          type: boolean
      required:
      - acknowledgment
      - contacts
      - created_at
      - deleted
      - direction
      - force_shortlink_creation
      - groups
      - id
      - id_is_thread_id
      - message_id
      - mms
      - modified_at
      - resource_uri
      - scheduled_at
      - shortlink
      - text
      - thread_id
      - type
      - via_shortcode
    messageViaShortcode:
      type: boolean
      description: Send the message via your account's Short Code number (requires a plan with Short Code access (learn more here)[https://sendhub.force.com/support/s/article/shortcode])
    messageType:
      type: string
      enum:
      - voicecall-in
      - voicecall-out
      - voicecall-missed
      - voicecall-voicemail
      - message-out
      - message-in
      description: The type of the message (if on the thread object, then the type of the last message in the thread)
    groupCheckAll:
      type: boolean
      deprecated: true
      description: This is used internally and may be expanded upon or removed in the future
    groupMediums:
      allOf:
      - $ref: '#/components/schemas/nullableString'
      - deprecated: true
        description: This is used internally and may be expanded upon or removed in the future
    messageText:
      title: messageText
      type: string
      description: 'The text content of the message

        **Note:** Be sure you understand SMS segmenting ((learn more here)[https://sendhub.force.com/support/s/article/how-am-i-billed-for-long-messages])'
      minimum: 1
      maximum: 1600
    contactKeyword:
      type: string
      example: john
      description: 'The keyword must be unique and is generated by the contact''s name by default.

        [Learn more about how contact keywords are used here.](https://sendhub.force.com/support/s/article/contacts-faq)

        '
    groupSlug:
      type: string
      description: 'The "keyword" used to text-to-join


        Defaults to the group name lowercased, without any spaces and not duplicate by appending an incrementing number if needed'
    deleted:
      type: boolean
      readOnly: true
  requestBodies:
    sendMessage:
      content:
        application/json:
          schema:
            allOf:
            - x-$ref: '#/components/schemas/sendMessageRequest'
            - $ref: '#/components/schemas/sendMessageRequest'
          examples:
            Send SMS to a phone number:
              summary: Send SMS to a phone number
              value:
                contacts:
                - '+18884445555'
                t

# --- truncated at 32 KB (43 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/sendhub/refs/heads/main/openapi/sendhub-message-api-openapi.yml