Unitpost SMS messaging programs API

What your SMS registrations are built from: the reusable purpose, opt-in, help and stop copy and sample messages a registration copies when a person submits it. Writing a program never changes a registration. Registrations, vetting and numbers are bought through a quote and its confirm (`sms:purchase`, within the owner's monthly API spend cap); identity documents, a toll-free number and releasing a number stay in the dashboard.

GitHub OpenAPI

Operations 6

GET /sms/messaging-programs List messaging programs #
POST /sms/messaging-programs Create a messaging program #
GET /sms/messaging-programs/{id} Retrieve a messaging program #
PATCH /sms/messaging-programs/{id} Update a messaging program #
DELETE /sms/messaging-programs/{id} Archive a messaging program #
POST /sms/messaging-programs/{id}/duplicate Duplicate a messaging program #

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/unitpost-com:unitpost-com-sms-messaging-programs-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

unitpost-com-sms-messaging-programs-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Unitpost SMS messaging programs API
  version: v1
  description: 'Public, versioned API for sending email and SMS and managing contacts, segments, campaigns, templates, domains, and webhooks. SMS is included on paid plans; on the free plan `POST /sms` returns `403` with `limit_reached`. Authenticate every request with an API key: `Authorization: Bearer `. A `User-Agent` header is required. Requests are scoped to the workspace that owns the key and are rate-limited per workspace. List endpoints are cursor-paginated via `limit`/`after`/`before` and return a `{ object: "list", has_more, data }` envelope. Register webhook endpoints to receive events: each create returns a `signing_secret` (`whsec_…`) exactly once. Every delivery is **svix-compatible**: it carries `svix-id`, `svix-timestamp`, and `svix-signature` (`v1,`) headers computed over `..` with your secret — verify them and reject deliveries whose signature doesn''t match (any Svix-compatible library works). Inbound email that lands on a receiving-enabled domain is readable under `/email/received`.'
servers:
- url: https://www.unitpost.com/api/v1
  description: Base URL
security:
- apiKey: []
tags:
- name: SMS messaging programs
  description: 'What your SMS registrations are built from: the reusable purpose, opt-in, help and stop copy and sample messages a registration copies when a person submits it. Writing a program never changes a registration. Registrations, vetting and numbers are bought through a quote and its confirm (`sms:purchase`, within the owner''s monthly API spend cap); identity documents, a toll-free number and releasing a number stay in the dashboard.'
paths:
  /sms/messaging-programs:
    get:
      operationId: sms_messaging_programs_list
      tags:
      - SMS messaging programs
      summary: List messaging programs
      description: 'Your messaging programs: what a sender registration says your texts are for, how people opt in, the help and stop replies and sample messages. Registrations copy a program when submitted; writing a program never changes one. `archived=true` includes archived ones. Requires the `sms:read` capability.'
      parameters:
      - name: limit
        in: query
        required: false
        description: Max rows to return (default 20, max 100).
        schema:
          type: integer
          minimum: 1
          maximum: 100
      - name: after
        in: query
        required: false
        description: Return rows after this id (forward paging).
        schema:
          type: string
      - name: before
        in: query
        required: false
        description: Return rows before this id (backward paging).
        schema:
          type: string
      - name: archived
        in: query
        required: false
        description: '`true` includes archived programs.'
        schema:
          type: string
          enum:
          - 'true'
          - 'false'
      responses:
        '200':
          description: Messaging programs.
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    enum:
                    - list
                  has_more:
                    type: boolean
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/SmsMessagingProgram'
                required:
                - object
                - has_more
                - data
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Insufficient scope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found, or SMS is not enabled for this workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: A bad `archived`, `limit`, `after` or `before`, or an unknown query key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    post:
      operationId: sms_messaging_programs_create
      tags:
      - SMS messaging programs
      summary: Create a messaging program
      description: 'Create a program (`name` required). Each field is checked by the carriers'' rules (the dashboard''s own): lengths, help and stop replies that are a sentence and not just a keyword, links to a real web address (no localhost, bare IP or other scheme). Pass an `Idempotency-Key` so a retry never makes a second one. Requires the `sms:manage` capability.'
      parameters:
      - name: Idempotency-Key
        in: header
        required: false
        description: Any unique string (1–256 characters, e.g. a UUID). Retrying with the same key and the same body within 24 hours returns the first result instead of sending again; the same key with a different body is `409 invalid_idempotent_request`, and one still in flight is `409 concurrent_idempotent_requests`.
        schema:
          type: string
          minLength: 1
          maxLength: 256
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SmsMessagingProgramCreate'
      responses:
        '201':
          description: The program.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SmsMessagingProgram'
        '400':
          description: The body isn't JSON, or the `Idempotency-Key` header is not 1–256 characters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Insufficient scope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found, or SMS is not enabled for this workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: The `Idempotency-Key` is in use by a request still running, or with another body.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: A field that breaks a carrier rule (named in `details`), a consent setup that isn't yours, or an unknown key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /sms/messaging-programs/{id}:
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: string
    get:
      operationId: sms_messaging_programs_get
      tags:
      - SMS messaging programs
      summary: Retrieve a messaging program
      description: Retrieve one program, archived ones too. Requires the `sms:read` capability.
      responses:
        '200':
          description: The program.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SmsMessagingProgram'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Insufficient scope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Messaging program not found, or SMS is not enabled.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: A query key (this operation takes none).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    patch:
      operationId: sms_messaging_programs_update
      tags:
      - SMS messaging programs
      summary: Update a messaging program
      description: 'Edit a program: only the fields sent change, `null` clears one, and the result must still pass the carriers'' rules. `revision` moves on a material change; registrations keep the copy they made. An archived program is a `409`: duplicate it to keep editing. Requires the `sms:manage` capability.'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SmsMessagingProgramUpdate'
      responses:
        '200':
          description: The program.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SmsMessagingProgram'
        '400':
          description: The body isn't JSON.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Insufficient scope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Messaging program not found, or SMS is not enabled.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: The program is archived, or it changed while this edit was being saved (read it again and retry).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: No field to change, a field that breaks a carrier rule, an unknown `recipe_id`, a consent setup that isn't yours, or an unknown key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      operationId: sms_messaging_programs_delete
      tags:
      - SMS messaging programs
      summary: Archive a messaging program
      description: Archive a program. Registrations that copied it keep their copy; Duplicate a messaging program to use it again. Requires the `sms:manage` capability.
      responses:
        '204':
          description: Archived.
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Insufficient scope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Messaging program not found (or already archived), or SMS is not enabled.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: A query key (this operation takes none).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /sms/messaging-programs/{id}/duplicate:
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: string
    post:
      operationId: sms_messaging_programs_duplicate
      tags:
      - SMS messaging programs
      summary: Duplicate a messaging program
      description: Copy a program (an archived one too) into a new editable one named "… (copy)" at revision 1, its consent setup and recipe included. Takes no body. Pass an `Idempotency-Key` so a retry returns the same copy. Requires the `sms:manage` capability.
      parameters:
      - name: Idempotency-Key
        in: header
        required: false
        description: Any unique string (1–256 characters, e.g. a UUID). Retrying with the same key and the same body within 24 hours returns the first result instead of sending again; the same key with a different body is `409 invalid_idempotent_request`, and one still in flight is `409 concurrent_idempotent_requests`.
        schema:
          type: string
          minLength: 1
          maxLength: 256
      responses:
        '201':
          description: The copy.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SmsMessagingProgram'
        '400':
          description: The body isn't JSON, or the `Idempotency-Key` header is not 1–256 characters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Insufficient scope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Messaging program not found, or SMS is not enabled.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: The `Idempotency-Key` is in use by a request still running, or with another body.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: A body key or a query key (this operation takes none).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    SmsMessagingProgramCreate:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 100
        description:
          anyOf:
          - type: string
          - type: 'null'
        message_type:
          type: string
          enum:
          - transactional
          - marketing
        canonical_purpose:
          anyOf:
          - type: string
          - type: 'null'
        frequency_disclosure:
          anyOf:
          - type: string
          - type: 'null'
        opt_in_type:
          anyOf:
          - type: string
          - type: 'null'
        opt_in_workflow:
          anyOf:
          - type: string
          - type: 'null'
        opt_in_confirmation:
          anyOf:
          - type: string
          - type: 'null'
        help_message:
          anyOf:
          - type: string
          - type: 'null'
        stop_message:
          anyOf:
          - type: string
          - type: 'null'
        terms_url:
          anyOf:
          - type: string
          - type: 'null'
        privacy_url:
          anyOf:
          - type: string
          - type: 'null'
        monthly_volume:
          anyOf:
          - type: string
          - type: 'null'
        sample_messages:
          maxItems: 3
          type: array
          items:
            type: string
        embedded_links:
          type: boolean
        embedded_link_sample:
          anyOf:
          - type: string
          - type: 'null'
        embedded_phones:
          type: boolean
        age_gated:
          type: boolean
        provider_overrides:
          anyOf:
          - type: object
            properties:
              toll_free:
                type: object
                properties:
                  use_case_category:
                    type: string
                additionalProperties: false
              ten_dlc:
                type: object
                properties:
                  use_case:
                    type: string
                  sub_use_cases:
                    maxItems: 5
                    type: array
                    items:
                      type: string
                additionalProperties: false
            additionalProperties: false
          - type: 'null'
        recipe_id:
          description: The compliance recipe the program follows; its version is the recipe's current one. Left out, it's derived from `canonical_purpose`.
          type: string
          enum:
          - ACCOUNT_NOTIFICATIONS
          - SECURITY_ALERTS
          - ONE_TIME_PASSCODES
          - ORDER_UPDATES
          - APPOINTMENT_REMINDERS
          - CUSTOMER_SUPPORT
          - MARKETING_PROMOTIONS
          - OTHER_CUSTOM
        consent_setup_id:
          description: A consent setup (`cset_…`) this workspace has.
          anyOf:
          - type: string
          - type: 'null'
      required:
      - name
    SmsMessagingProgram:
      type: object
      properties:
        name:
          type: string
        description:
          anyOf:
          - type: string
          - type: 'null'
        message_type:
          type: string
          enum:
          - transactional
          - marketing
        canonical_purpose:
          anyOf:
          - type: string
          - type: 'null'
        frequency_disclosure:
          anyOf:
          - type: string
          - type: 'null'
        opt_in_type:
          anyOf:
          - type: string
          - type: 'null'
        opt_in_workflow:
          anyOf:
          - type: string
          - type: 'null'
        opt_in_confirmation:
          anyOf:
          - type: string
          - type: 'null'
        help_message:
          anyOf:
          - type: string
          - type: 'null'
        stop_message:
          anyOf:
          - type: string
          - type: 'null'
        terms_url:
          anyOf:
          - type: string
          - type: 'null'
        privacy_url:
          anyOf:
          - type: string
          - type: 'null'
        monthly_volume:
          anyOf:
          - type: string
          - type: 'null'
        sample_messages:
          type: array
          items:
            type: string
        embedded_links:
          type: boolean
        embedded_link_sample:
          anyOf:
          - type: string
          - type: 'null'
        embedded_phones:
          type: boolean
        age_gated:
          type: boolean
        provider_overrides:
          anyOf:
          - type: object
            properties:
              toll_free:
                type: object
                properties:
                  use_case_category:
                    type: string
                additionalProperties: false
              ten_dlc:
                type: object
                properties:
                  use_case:
                    type: string
                  sub_use_cases:
                    maxItems: 5
                    type: array
                    items:
                      type: string
                additionalProperties: false
            additionalProperties: false
          - type: 'null'
        recipe_id:
          anyOf:
          - type: string
          - type: 'null'
        consent_setup_id:
          description: A consent setup (`cset_…`) this workspace has.
          anyOf:
          - type: string
          - type: 'null'
        object:
          type: string
          const: sms_messaging_program
        id:
          type: string
        recipe_version:
          anyOf:
          - type: integer
            minimum: -9007199254740991
            maximum: 9007199254740991
          - type: 'null'
        revision:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
          description: Moves on a material change; registrations keep the revision they copied.
        readiness:
          type: object
          properties:
            ready:
              type: boolean
            missing:
              type: array
              items:
                type: string
          required:
          - ready
          - missing
          description: Whether the program has what a registration needs; `missing` names the fields still to fill (the wizard's own check).
        archived_at:
          anyOf:
          - type: string
          - type: 'null'
        created_at:
          type: string
        updated_at:
          type: string
      required:
      - name
      - message_type
      - sample_messages
      - embedded_links
      - embedded_phones
      - age_gated
      - recipe_id
      - object
      - id
      - recipe_version
      - revision
      - readiness
      - archived_at
      - created_at
      - updated_at
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: Stable machine-readable error code (branch on this, not the message).
            message:
              type: string
              description: 'Human-readable summary. For validation errors it''s path-prefixed (e.g. "template.variables.first_name: …").'
            details:
              type: array
              description: 'Present on errors that carry per-field reasons: validation errors (422), a blocked campaign send (409), a plan that doesn''t include a feature (403 `limit_reached` with one entry whose `code` is `feature_not_in_plan` and whose `field` names the feature, e.g. `smsChannel`), and a send cap (429 `quota_exceeded` with one entry, `field` empty, whose `code` says which cap: `daily_quota_exceeded` or `monthly_quota_exceeded` (the free plan''s daily or monthly cap), `plan_required` (the workspace needs a paid plan to send this), `allowance_used` (a paid plan''s allowance is spent and it has no pay-as-you-go), `shared_plan_cap` (the organization''s shared plan, or this workspace''s cap on it, is used up) or `risk_throttled` (the account review''s daily cap, which an upgrade doesn''t lift)). One entry per offending field/blocker.'
              items:
                type: object
                properties:
                  field:
                    type: string
                    description: Dotted path to the field, e.g. "template.variables.first_name" (empty for a whole-body problem).
                  code:
                    type: string
                    description: Machine-readable reason for this entry, when there is one (e.g. `template_not_published` on `template_id` for a blocked SMS campaign send, or `feature_not_in_plan` on `smsChannel` when the plan has no SMS). Absent on plain validation errors.
                  message:
                    type: string
                required:
                - field
                - message
            doc_url:
              type: string
              format: uri
              description: 'A page that explains this error and what to do, when there is one: an absolute link on the API''s own host. Every 429 has one (a section of the rate-limits guide: the request limit, an operation''s limit, the plan''s send caps or the account review cap), as do `sending_paused`, the SMS access review''s `sms_review_pending` and `account_under_review`, and errors about domains, API keys, idempotency keys, plan limits, billing, SMS consent and suppression. A `details[].code` with a page of its own picks it. Additive; absent otherwise.'
          required:
          - code
          - message
      required:
      - error
    SmsMessagingProgramUpdate:
      type: object
      properties:
        name:
          type: string
          maxLength: 100
        description:
          anyOf:
          - type: string
          - type: 'null'
        message_type:
          type: string
          enum:
          - transactional
          - marketing
        canonical_purpose:
          anyOf:
          - type: string
          - type: 'null'
        frequency_disclosure:
          anyOf:
          - type: string
          - type: 'null'
        opt_in_type:
          anyOf:
          - type: string
          - type: 'null'
        opt_in_workflow:
          anyOf:
          - type: string
          - type: 'null'
        opt_in_confirmation:
          anyOf:
          - type: string
          - type: 'null'
        help_message:
          anyOf:
          - type: string
          - type: 'null'
        stop_message:
          anyOf:
          - type: string
          - type: 'null'
        terms_url:
          anyOf:
          - type: string
          - type: 'null'
        privacy_url:
          anyOf:
          - type: string
          - type: 'null'
        monthly_volume:
          anyOf:
          - type: string
          - type: 'null'
        sample_messages:
          maxItems: 3
          type: array
          items:
            type: string
        embedded_links:
          type: boolean
        embedded_link_sample:
          anyOf:
          - type: string
          - type: 'null'
        embedded_phones:
          type: boolean
        age_gated:
          type: boolean
        provider_overrides:
          anyOf:
          - type: object
            properties:
              toll_free:
                type: object
                properties:
                  use_case_category:
                    type: string
                additionalProperties: false
              ten_dlc:
                type: object
                properties:
                  use_case:
                    type: string
                  sub_use_cases:
                    maxItems: 5
                    type: array
                    items:
                      type: string
                additionalProperties: false
            additionalProperties: false
          - type: 'null'
        recipe_id:
          description: The compliance recipe the program follows; its version is the recipe's current one. Left out, it's derived from `canonical_purpose`.
          type: string
          enum:
          - ACCOUNT_NOTIFICATIONS
          - SECURITY_ALERTS
          - ONE_TIME_PASSCODES
          - ORDER_UPDATES
          - APPOINTMENT_REMINDERS
          - CUSTOMER_SUPPORT
          - MARKETING_PROMOTIONS
          - OTHER_CUSTOM
        consent_setup_id:
          description: A consent setup (`cset_…`) this workspace has.
          anyOf:
          - type: string
          - type: 'null'
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: Your workspace API key.