Unitpost SMS quotes API

Buy carrier resources by API: quote (`sms:manage`, nothing charged), show the person the price, then confirm with the quote's single-use token and an `Idempotency-Key` (`sms:purchase`, which no key preset includes). API purchases count against a monthly cap the workspace owner sets in the dashboard; with none set they are refused. A toll-free number takes its opt-in evidence as a file (`opt_in_evidence_file_id`). Releasing a number stays in the dashboard.

GitHub OpenAPI

Operations 3

POST /sms/quotes Create an SMS purchase quote #
GET /sms/quotes/{id} Retrieve an SMS purchase quote #
POST /sms/quotes/{id}/confirm Confirm an SMS purchase quote #

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-quotes-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-quotes-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Unitpost SMS quotes 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 quotes
  description: 'Buy carrier resources by API: quote (`sms:manage`, nothing charged), show the person the price, then confirm with the quote''s single-use token and an `Idempotency-Key` (`sms:purchase`, which no key preset includes). API purchases count against a monthly cap the workspace owner sets in the dashboard; with none set they are refused. A toll-free number takes its opt-in evidence as a file (`opt_in_evidence_file_id`). Releasing a number stays in the dashboard.'
paths:
  /sms/quotes:
    post:
      operationId: sms_quotes_create
      tags:
      - SMS quotes
      summary: Create an SMS purchase quote
      description: 'Price a carrier purchase and bind exactly what it buys: a 10DLC brand registration (or the paid resubmission of one carriers sent back), brand vetting, a 10DLC campaign registered from a messaging program with its local number, the number of an approved campaign that has none, or a local number that needs no registration (Canada). Nothing is charged or submitted. The answer names the product, `due_now_cents` (charged at the confirm), `monthly_cents` (from when the number leases or carriers approve the campaign, then monthly), the line items and `expires_at` (10 minutes), and carries a single-use `confirm_token`, shown once. Show the person the price, then Confirm an SMS purchase quote. A toll-free number is composed from the brand and a messaging program, with its opt-in evidence as a file (`opt_in_evidence_file_id`, made with Create a file). Something already registered or under review, a number the plan can''t hold, a failing card or a fee the plan can''t fit are refused here, before a price is shown. Unitpost reviews every new SMS account before its first carrier order, usually within one business day. Until then every product but a first `ten_dlc_brand_registration` is refused with `409 sms_review_pending`; that one is charged at the confirm and held as `pending` until the approval. Requires the `sms:manage` capability.'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SmsQuoteCreate'
      responses:
        '201':
          description: The quote, with its confirm token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SmsQuote'
        '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'
        '402':
          description: The plan can't fit the fee (`sms_allowance_short`, `sms_plan_too_small`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Insufficient scope, SMS isn't on this plan (`limit_reached`), the account's SMS access was declined (`account_under_review` with `details[].code` `sms_access_rejected`) or it is under review and can't add senders (`account_under_review` with `details[].code` `account_review_hold`); `error.doc_url` explains both, or the card is failing (`sms_payment_failed`, `sms_full_discount`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: The brand, registration or messaging program isn't in this workspace, or SMS is not enabled.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: 'Nothing to buy (already registered, under review, the number exists, or a failed number''s fee is already committed: retry it free with POST /sms/registrations/{id}/number), an order for the same purchase still in flight (`conflict`, naming its quote: follow it), a file whose bytes haven''t been uploaded, the plan can''t hold another number (`number_limit_reached`), a pending plan change, or the account''s SMS review isn''t done (`sms_review_pending`: Unitpost reviews every new SMS account before its first carrier order, usually within one business day; nothing was charged, `error.doc_url` explains it, and GET /usage `sms_review.access` reads `approved` once it is): every product but a first `ten_dlc_brand_registration`, which is bought and held as `pending`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: 'A missing or misplaced field for the product, an unknown key, or (`ten_dlc_campaign`) a messaging program carriers would refuse: fewer than two distinct sample messages, no `terms_url` or `privacy_url`, a HELP or STOP reply over 160 characters, an opt-in confirmation without the brand, HELP, STOP, frequency and rates, or an opt-in that needs a screenshot (verbal or printed, or an `opt_in_workflow` with no public link). `error.details` names the program''s fields; update the program, then quote again.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Too many quotes; honor Retry-After.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /sms/quotes/{id}:
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: string
    get:
      operationId: sms_quotes_get
      tags:
      - SMS quotes
      summary: Retrieve an SMS purchase quote
      description: 'A quote''s price and state: `open` until confirmed or expired, `ordered` with what the order made (`order.registration_id` or `order.number_id`), `pending` while the outcome is unknown (the carrier didn''t answer: a fee due now is held, monthly fees are committed) or while a first 10DLC brand registration is held for Unitpost''s SMS account review (charged, not sent yet; GET /usage `sms_review`), or `failed` when the confirm bought nothing (nothing was charged). A `pending` quote settles from the billing ledger when it is read: `ordered` once the fee is captured or the number or campaign goes live, `failed` once the fee is refunded or the commitments are released. An `ordered` number or campaign whose commitments are released before it ever goes live reads `failed` too and stops counting against the cap. Never the confirm token. Requires the `sms:read` capability.'
      responses:
        '200':
          description: The quote.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SmsQuote'
        '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: Quote 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'
  /sms/quotes/{id}/confirm:
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: string
    post:
      operationId: sms_quotes_confirm
      tags:
      - SMS quotes
      summary: Confirm an SMS purchase quote
      description: 'Buy what the quote binds, with its single-use `confirm_token`. It charges the workspace: confirm only after the person agreed to the quoted price. Requires an `Idempotency-Key`: a retry with the same key answers what the first call answered and never charges twice. The order runs exactly as in the dashboard: the plan''s purchase rules, the one-time fee taken from the plan''s allowance before carriers are called and refunded if they refuse the submission, the monthly fee from when the number leases or carriers approve the campaign. Every API purchase counts against the workspace''s monthly API spend cap (the fee due now plus the first month, per UTC month): read it with `GET /spend-caps`; the workspace owner sets it in the dashboard or with `PATCH /spend-caps` (`spend_caps:write`), at most the platform maximum ($1,000 a month by default). A workspace that starts a paid plan on its own card starts with a $75 cap when it has none, unless a key or app of it already holds `sms:purchase` (a workspace its organization pays for follows the organization Owner''s rules instead; a key still needs `sms:purchase` to buy). With no cap set, API purchases are refused (`api_spend_cap_not_set`), and one over it is `api_spend_cap_exceeded`; the dashboard buys past it. The owner gets an email per purchase, and the activity log names the key. Refusals charge nothing: a changed price (`price_changed`), an expired quote (`quote_expired`), a brand or messaging program edited since (`quote_stale`), a quote already used (`quote_already_used`), an order for the same purchase still in flight (`conflict`, naming its quote). These refusals are answered before the shared hourly limits are spent. A confirm that recorded nothing leaves the quote open (and frees its `Idempotency-Key`); one that reached carriers spends it: `failed` when carriers refused it (quote again), `pending` when their answer is unknown (follow the quote; don''t buy the same thing meanwhile). Requires the `sms:purchase` capability.'
      parameters:
      - name: Idempotency-Key
        in: header
        required: true
        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/SmsQuoteConfirm'
      responses:
        '200':
          description: The quote, `ordered`, with what the order made.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SmsQuote'
        '400':
          description: The body isn't JSON, or the `Idempotency-Key` header is missing (`idempotency_key_required`) or 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'
        '402':
          description: The plan's allowance can't cover the fee now (`sms_allowance_short`, `insufficient_wallet`, `sms_plan_too_small`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Insufficient scope (`sms:purchase`), no monthly API spend cap set (`api_spend_cap_not_set`), over it (`api_spend_cap_exceeded`), the account's SMS access declined or the account under review (`account_under_review`; `details[].code` `sms_access_rejected` or `account_review_hold`), the card failing, SMS not on the plan, or a key an organization key minted on a workspace that organization no longer pays for (`forbidden`; a payer change away from the organization also removes the key's `sms:purchase`, which is then `insufficient_scope`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Quote not found, or SMS is not enabled.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: '`price_changed`, `quote_expired`, `quote_stale`, `quote_already_used`, an order for the same purchase still in flight (`conflict`), a pending plan change, a carrier-side state that refuses the order, the account''s SMS review isn''t done (`sms_review_pending`: Unitpost reviews every new SMS account before its first carrier order, usually within one business day; nothing was charged, `error.doc_url` explains it, and GET /usage `sms_review.access` reads `approved` once it is) (a first `ten_dlc_brand_registration` is charged and held instead, the order `pending`), or the `Idempotency-Key` in use by another body or a request still running.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: The confirm token doesn't match the quote, an unknown key, or values carriers would reject (named in `details`; nothing was charged).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Too many confirms or carrier submissions; honor Retry-After.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: 'Something failed before the purchase was recorded (`internal_error`): nothing was charged, the quote is still open and the `Idempotency-Key` is free, so the same call can be made again.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: 'The carrier didn''t answer, so the outcome is unknown (`engine_unavailable`): the quote is `pending` and counted. Follow it until it reads `ordered` or `failed`; don''t confirm again or buy the same thing meanwhile.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    SmsQuote:
      type: object
      properties:
        object:
          type: string
          const: sms_quote
        id:
          type: string
          description: The quote (`squote_…`).
        product:
          type: string
          enum:
          - ten_dlc_brand_registration
          - ten_dlc_brand_vetting
          - ten_dlc_campaign
          - ten_dlc_number
          - long_code_number
          - toll_free_number
        status:
          type: string
          enum:
          - open
          - expired
          - confirming
          - ordered
          - pending
          - failed
          description: '`open` until confirmed or `expires_at`; `ordered` once placed; `pending` while the outcome is unknown (the carrier didn''t answer: a fee due now is held, monthly fees are committed, and it settles to `ordered` or `failed` from the billing ledger, so read it again; don''t buy the same thing meanwhile), or while a first 10DLC brand registration is held for Unitpost''s SMS account review (charged, not sent to carriers yet; it settles `ordered` once the account is approved and the brand is sent, `failed` with the fee refunded if it isn''t; GET /usage `sms_review` shows the review); `failed` when the confirm bought nothing (nothing was charged; quote again).'
        label:
          type: string
          description: What is bought, as the dashboard names it.
        brand_id:
          anyOf:
          - type: string
          - type: 'null'
        registration_id:
          description: The registration the order is for (a brand registration, or the campaign whose number it is).
          anyOf:
          - type: string
          - type: 'null'
        messaging_program_id:
          anyOf:
          - type: string
          - type: 'null'
        country:
          anyOf:
          - type: string
          - type: 'null'
        due_now_cents:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
          description: Charged at the confirm, from the plan's allowance (one-time fees).
        monthly_cents:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
          description: Charged when the number leases or carriers approve the campaign, then every month.
        currency:
          type: string
          const: usd
        line_items:
          type: array
          items:
            type: object
            properties:
              fee_code:
                type: string
              label:
                type: string
              amount_cents:
                type: integer
                minimum: -9007199254740991
                maximum: 9007199254740991
              cadence:
                type: string
                enum:
                - one_time
                - monthly
              starts_when:
                type: string
                enum:
                - on_confirmation
                - number_leased
                - campaign_approved
                description: 'When the fee starts: at the confirm, when the number leases, or when carriers approve the campaign.'
            required:
            - fee_code
            - label
            - amount_cents
            - cadence
            - starts_when
        covered_by_unitpost:
          type: boolean
          description: 'This workspace''s carrier fees are covered by Unitpost: nothing is charged.'
        expires_at:
          type: string
          description: Confirm before this (quotes last 10 minutes).
        created_at:
          type: string
        confirmed_at:
          anyOf:
          - type: string
          - type: 'null'
        order:
          anyOf:
          - type: object
            properties:
              registration_id:
                description: The carrier registration the order made (`sreg_…`).
                anyOf:
                - type: string
                - type: 'null'
              number_id:
                description: The number it ordered (`snum_…`); it leases shortly after.
                anyOf:
                - type: string
                - type: 'null'
              status:
                description: The registration's or the number request's status as the order left it.
                anyOf:
                - type: string
                - type: 'null'
            required:
            - registration_id
            - number_id
            - status
          - type: 'null'
          description: What the confirmed order made; null until then.
        confirm_token:
          description: 'Only in the create response, once: pass it to the confirm. Stored only as a hash; a lost token means a new quote.'
          type: string
      required:
      - object
      - id
      - product
      - status
      - label
      - brand_id
      - registration_id
      - messaging_program_id
      - country
      - due_now_cents
      - monthly_cents
      - currency
      - line_items
      - covered_by_unitpost
      - expires_at
      - created_at
      - confirmed_at
      - order
    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
    SmsQuoteCreate:
      type: object
      properties:
        product:
          type: string
          enum:
          - ten_dlc_brand_registration
          - ten_dlc_brand_vetting
          - ten_dlc_campaign
          - ten_dlc_number
          - long_code_number
          - toll_free_number
          description: 'What to buy. `ten_dlc_brand_registration` registers a brand with US carriers (or resubmits one they sent back; the fee is the resubmission''s). `ten_dlc_brand_vetting` vets an approved brand for higher throughput. `ten_dlc_campaign` registers a 10DLC campaign from a messaging program, with its local number, which leases once carriers approve it. `ten_dlc_number` orders the number of an approved campaign that has none (a failed number whose fee is already committed is retried for free: POST /sms/registrations/{id}/number). `long_code_number` orders a local number that needs no registration (`country: "CA"`). `toll_free_number` orders a US toll-free number and files its carrier verification from the brand and a messaging program, with the opt-in evidence as a file (`opt_in_evidence_file_id`).'
        brand_id:
          description: The SMS brand (`sbrand_…`).
          type: string
          minLength: 1
        registration_id:
          description: '`ten_dlc_number`: the approved 10DLC campaign registration (`sreg_…`).'
          type: string
          minLength: 1
        messaging_program_id:
          description: '`ten_dlc_campaign`: the messaging program (`prog_…`) the campaign is registered from.'
          type: string
          minLength: 1
        country:
          description: '`long_code_number`: the two-letter country (`CA`).'
          type: string
          minLength: 2
          maxLength: 2
        display_name:
          description: '`long_code_number`: the number''s name in the dashboard.'
          type: string
          minLength: 1
          maxLength: 100
        brand_verification_email:
          description: '`ten_dlc_brand_registration`: who at the company follows the registry''s email link, on the brand website''s domain. Required for a public company, or when carriers ask for it; else the brand''s saved one.'
          type: string
          maxLength: 254
          format: email
          pattern: ^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
        acknowledge_unchanged:
          description: '`ten_dlc_brand_registration`, a resubmission: send it anyway although nothing carriers flagged changed, because the cause was fixed outside Unitpost (the website now loads, the registry was updated). Without it, an identical resubmission is refused (`registration_unchanged`, nothing charged).'
          type: boolean
          const: true
        opt_in_screenshot_file_id:
          description: '`ten_dlc_campaign`: a screenshot of the opt-in (POST /files, purpose `sms_opt_in_evidence`: PNG up to 400 KB). Carriers require one for verbal or printed opt-in, or when the opt-in workflow links to no public page.'
          type: string
          minLength: 1
          maxLength: 64
        opt_in_evidence_file_id:
          description: '`toll_free_number`: the opt-in evidence carriers review (POST /files, purpose `sms_opt_in_evidence`: a PNG up to 400 KB of the form, page or flow where people agree to receive these texts).'
          type: string
          minLength: 1
          maxLength: 64
        business_registration_document_file_id:
          description: '`toll_free_number`: an IRS letter (CP 575, 147C or SS-4) or registry extract showing the legal name and company ID (POST /files, purpose `sms_document`, up to 2 MB). Required when the brand is a government agency.'
          type: string
          minLength: 1
          maxLength: 64
        consent_source_url:
          description: '`toll_free_number`: the public https page where people opt in (your form or checkout). Goes into the opt-in description carriers read.'
          type: string
          maxLength: 2048
      required:
      - product
    SmsQuoteConfirm:
      type: object
      properties:
        confirm_token:
          type: string
          minLength: 1
          maxLength: 200
          description: The quote's confirm token (`sqct_…`), from its create response. Single use.
      required:
      - confirm_token
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: Your workspace API key.