SendHub Message API

Send and manage messages.

OpenAPI Specification

sendhub-message-api-openapi.yml Raw ↑
openapi: 3.0.3
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:
  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'
                text: Hello there
            Schedule a message to be sent in the future:
              summary: Schedule a message to be sent in the future
              value:
                contacts:
                - '116006957938017590'
                - '+18884445555'
                groups:
                - '115999753870991330'
                text: Hello from the past!
                scheduled_at: 2069-04-20T04:20:59+0000
            Send an image (via URL):
              summary: Send an image (via URL)
              value:
                contacts:
                - '+18884445555'
                text: Hello there
                mms:
                  filename: Obiwan.png
                  url: https://pics.me.me/hello-there-general-kenobi-39974644.png
            Send a video (via URL):
              summary: Send a video (via URL)
              value:
                contacts:
                - '+18884445555'
                text: Hey got 'em
                mms:
                  filename: funny_video.mp4
                  url: https://drive.google.com/uc?export=download&id=1-0NB0DJJKrh1u9uvsfKWDYS5DwaRHevN
            Send an image (via base64-encoded data):
              summary: Send an image (via base64-encoded data)
              value:
                contacts:
                - '+18884445555'
                text: Hey! Check out SendHub :)
                mms:
                  filename: SendHub.png
                  data: iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAMAAAAL34HQAAADAFBMVEXm797Z9MXU4sfE07bh89HW6MPm+tXM6rbU8b7k+9LZ+L7U9Lze+MrS97jM8bPP8LXG6qnK66/D9KC95KC74p6z4JSt3oun2Iad1HqZ0naPzWib1Xah2X6n34Wp4oap44Wm4YSi4n6l43uf4Hae33Sd3XOX2WyQ0mOKzVyGy1eAxU+DxVN6wElsvDd4wEN5wTt3wDdxvTNwvDB1vTN0vTJ0vTB0vTB0vTBuvCdzvS9puSpouSlnuChluSVguyJhux5iviNcxCttxzFnwCFfwxlfshZhsh1pvSpvvy9VqhlSqRdmpTZvu0GHvVB8uFWBumCDvV6Lv2iSyHKYy3OZznqZz3SUzG+SyWqQy2aLx2CJzF6OzV2Py16SzGOSymSJxWKQw2mYyXOXzXWTxHKRv3KSuXSNuXSPtnuQv3iZvXmZvHugv4ecv4Kew4Skx4yt0pOz2JS53py84J27457D56jA5Ke745y455Wu3ZKo24uj1Yei1YSOwW6i0oCp3Yai1Iiq14mk14qr24TB5ajK67LY88Hg9svn+9Po+9Xn+dPj+s7h9c3Y7cHa88ba88bk9dXb88fe9Mzd9Mvj9tPr+97u/OT0/+zn+93n+9vi+tTc+Mva9MTS8rrM77TH66zH7qfC6qG/5aS63Jq03Zy23p+235m+56WZwHvK7K7H7KzC6Km+46bG8K643pzB5KbB7azI5qzK6bLN6LTT7rzR7rjQ8LjU77vV8LvS7LrQ6L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i4uCraohb4U0plsuGZLpIcc3p26uFCz+XQ7MqYwEV03dJ5aVQpVnOZ7Hd/YPu0vrb60xr5wXupqdnOlkib2x/fcr6h2zICDu1mut75tW2ptv8/LWfHrWacr1jf4fWL3JVf51q88AAAAASUVORK5CYII=
  schemas:
    modifiedTs:
      allOf:
      - $ref: '#/components/schemas/timestamp'
      - minLength: 1
        readOnly: true
    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
    deleted:
      type: boolean
      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
    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
    updateMessageResponse:
      allOf:
      - x-$ref: '#/components/schemas/sendMessageRequest'
      - $ref: '#/components/schemas/sendMessageRequest'
    groupMediums:
      allOf:
      - $ref: '#/components/schemas/nullableString'
      - deprecated: true
        description: This is used internally and may be expanded upon or removed in the future
    contactIdBoth:
      type: string
      anyOf:
      - $ref: '#/components/schemas/contactId'
      - $ref: '#/components/schemas/contactIdInt'
    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
    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])
    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'
    contactName:
      type: string
      description: The contact's name
      minLength: 1
      maxLength: 128
    sent:
      title: sent
      allOf:
      - $ref: '#/components/schemas/timestamp'
      - type: string
        nullable: true
      description: The date & time **in UTC** the message was sent at.
    groupCheckAll:
      type: boolean
      deprecated: true
      description: This is used internally and may be expanded upon or removed in the future
    smsGateway:
      type: string
      example: sendhub
      description: This is used internally and may be expanded upon or removed in the future
      readOnly: true
    threadId:
      allOf:
      - $ref: '#/components/schemas/id'
      description: The thread ID
    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
    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)

        '
    errorObject:
      type: object
      properties:
        error:
          type: string
        status:
          type: number
    messageCreatedAt:
      allOf:
      - $ref: '#/components/schemas/timestamp'
      description: UTC timestamp of when the message was created
    messageUnread:
      type: boolean
      nullable: true
      description: 'Whether or not the message is marked as unread

        Changing this will mark the corresponding thread as read or unread'
    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`)'
    nullableString:
      type: string
      nullable: true
    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
    idStr:
      type: string
      pattern: ^\d+$
      description: Same as id but always a string
    id:
      type: string
      pattern: ^\d+$
    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}$
    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))
    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'
    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
    userId:
      allOf:
      - $ref: '#/components/schemas/id'
      description: The ID of a SendHub user (an individual line)
    groupPermissions:
      allOf:
      - $ref: '#/components/schemas/nullableString'
      - default: write
        enum:
        - write
    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
    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}$
    messageResourceUri:
      type: string
      pattern: ^\/v\d+(\.\d+)*\/messages\/\d+$
      description: Resource URI for this message
      example: /v1/messages/123
    isShared:
      type: boolean
      description: Whether the group is shared between the lines
      deprecated: 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'
    scheduledAt:
      title: scheduledAt
      type: string
      nullable: true
      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}$
    ttjResponse:
      type: string
      maximum: 70
      default: You are now subscribed.
      description: A custom response sent when someone texts-to-join this group
    groupName:
      type: string
      description: The group's name
      minLength: 1
      maxLength: 128
    createdTs:
      allOf:
      - $ref: '#/components/schemas/timestamp'
      - minLength: 1
        readOnly: true
    messageId:
      allOf:
      - $ref: '#/components/schemas/id'
      description: The message ID
    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'
    extraInfo:
      type: string
      description: JSON-escaped object containing this contact's custom field(s)
      maxLength: 65535
      readOnly: true
    direction:
      description: The direction of the message; `outbound-api` or `incoming`
      type: string
      enum:
      - outbound-api
      - incoming
    textToSubscribe:
      type: boolean
      default: false
      description: Whether to enable text-to-join functionality for this group
    groupIdInt:
      type: integer
      format: int64
      description: The group ID
    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:
     

# --- 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