SMSTunnel Scheduled texts API

Texts sent with `sendAt`: list, read and cancel them.

GitHub OpenAPI

Operations 3

GET /api/v1/sms/scheduled List the texts this key scheduled #
GET /api/v1/sms/scheduled/{id} Get a scheduled text #
DELETE /api/v1/sms/scheduled/{id} Cancel a scheduled text #

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/smstunnel-io:smstunnel-io-scheduled-texts-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

smstunnel-io-scheduled-texts-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: SMSTunnel Scheduled texts API
  version: 1.0.0
  description: 'SMSTunnel sends text messages (SMS) through **your own Android phone and SIM**, from your own number. Your software hands a text to your SMSTunnel account with this API, and the SMSTunnel app on your linked phone sends it. Made by NARBOWEB SRL.


    ## Authentication


    Create an API key in the dashboard (**Apps → Add an app**). Keys look like `sk_live_…` and are shown once. Send the key from your server, in one of these ways:


    - `X-API-Key: ` (when present, it wins over the others);

    - `Authorization: Bearer `;

    - HTTP Basic with the key as the password (the user name is ignored).


    Never put a key in a web page: a key sent in `Authorization` from a page on another site is refused with `401` and the code `API_KEY_FROM_WEB_PAGE`.


    Keys carry permissions: `sms:send` (send and cancel), `sms:read` (status of texts, list of scheduled texts) and `sms:inbox` (read received texts, off by default). Each operation names the one it needs; an operation that names none works with any valid key.


    ## How a text travels


    - **One recipient per request.** Every send operation in this document takes one number. To text several people, make one request per person.

    - **`sent` is the last good status.** The Android app requests no delivery reports, so `sent` means the phone handed the text to its SIM and Android confirmed it went out. A text you send never reaches `delivered`, and SMSTunnel cannot tell you that it arrived.

    - **`unconfirmed` means the text may have gone out. Never resend it automatically**, or the recipient may get it twice. Show it to a person instead. The same applies after a timeout or a `5xx` answer to a send, unless you send the same `Idempotency-Key` again.

    - **Offline phones.** A text waits up to 3 days for an offline phone, then fails. A text the phone had already taken but never reported on ends `unconfirmed` instead.

    - **Pace.** Android allows about 30 SMS parts per minute per app, and a long text is several parts. SMSTunnel hands one phone at most 28 parts in any 65 seconds; other texts wait their turn on the server.


    ## Retrying safely


    The send operations take an optional `Idempotency-Key` header: POST /api/v1/sms/send, /sms/send-2fa, the /sms/compat routes, /cgi-bin/sms_send, Twilio''s Messages.json and Verify''s Verifications. Within 24 hours, the same key with the same request gets the first answer back, with `Idempotent-Replayed: true`, and no second text. Each API key has its own idempotency keys. Fields a first answer left out come back as `null` in a replay. No other operation reads this header.


    ## Limits


    Per API key and route: **30 requests a minute** on the send routes (the /sms/compat routes and /cgi-bin/sms_send count together with the route they follow) and on Verify''s other POST and DELETE routes, 60 on Verify''s VerificationCheck, and **100** on everything else. All the keys of one account together get three times that. Every answer carries `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset`, except the rate limiter''s own `429`. Over the limit: `429` with `Retry-After`. A `429` **without** `Retry-After` means an allowance is used up (the plan''s daily or monthly one, the key''s own daily limit, or a verification''s attempts): don''t retry it. Allowances depend on the plan: see Pricing.


    ## Errors


    Errors under /api/v1 have `statusCode`, `message` (a string, or a list of strings for a request that failed validation) and often `error` and a stable `code`. The Twilio-compatible routes answer in Twilio''s shape, and /cgi-bin/sms_send in plain text.


    Full guides: API reference, Twilio-compatible API, Twilio Verify-compatible sign-in codes.'
  termsOfService: https://smstunnel.io/terms/
  contact:
    name: SMSTunnel (NARBOWEB SRL)
    url: https://smstunnel.io/contact/
    email: support@smstunnel.io
  x-logo:
    url: https://smstunnel.io/android-chrome-512x512.png
    altText: SMSTunnel
servers:
- url: https://smstunnel.io
  description: The REST API (paths under /api/v1). The Twilio-compatible routes and /cgi-bin/sms_send name their own hosts.
security:
- ApiKeyHeader: []
- BearerAuth: []
- BasicAuth: []
tags:
- name: Scheduled texts
  description: 'Texts sent with `sendAt`: list, read and cancel them.'
paths:
  /api/v1/sms/scheduled:
    get:
      tags:
      - Scheduled texts
      operationId: listScheduledTexts
      summary: List the texts this key scheduled
      description: 'Permission: `sms:read`. The texts **this key** scheduled with `POST /api/v1/sms/send` and `sendAt`: the waiting ones, soonest first, or with `scope=done` the ones that went out, failed or were canceled, kept for 30 days. Another key''s texts and the dashboard''s are not listed.'
      parameters:
      - name: scope
        in: query
        required: false
        description: '`done` for the texts that went out, failed or were canceled. Leave it out for the waiting ones.'
        schema:
          type: string
          enum:
          - done
      - name: page
        in: query
        required: false
        description: The page, from 1. Values outside 1 to 1000 are brought into that range.
        schema:
          type: integer
          minimum: 1
          maximum: 1000
          default: 1
      - name: limit
        in: query
        required: false
        description: Texts per page. Values outside 1 to 100 are brought into that range.
        schema:
          type: integer
          minimum: 1
          maximum: 100
          default: 50
      responses:
        '200':
          description: The list.
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/XRateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/XRateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/XRateLimitReset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScheduledTextList'
              examples:
                waiting:
                  summary: One text waiting
                  value:
                    success: true
                    data:
                      items:
                      - id: 00000000000000000000000b
                        to: '+14155550123'
                        message: 'Reminder: your appointment is tomorrow at 10:00.'
                        sendAt: '2030-01-15T07:00:00.000Z'
                        status: scheduled
                        deviceId: null
                        messageId: null
                        error: null
                        createdAt: '2030-01-14T12:00:00.000Z'
                      total: 1
                      page: 1
                      limit: 50
                      waiting: 1
                      max: 200
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: The key lacks the `sms:read` permission.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                permission:
                  summary: Missing permission
                  value:
                    statusCode: 403
                    error: Forbidden
                    code: PERMISSION_REQUIRED
                    permission: sms:read
                    message: This API key lacks the 'sms:read' permission
        '429':
          $ref: '#/components/responses/RateLimited'
  /api/v1/sms/scheduled/{id}:
    get:
      tags:
      - Scheduled texts
      operationId: getScheduledText
      summary: Get a scheduled text
      description: 'Permission: `sms:read`. One text this key scheduled. Once it went out, `messageId` is set: follow it with `GET /api/v1/sms/status/{messageId}`.'
      parameters:
      - name: id
        in: path
        required: true
        description: The id of the scheduled text.
        schema:
          type: string
        example: 00000000000000000000000b
      responses:
        '200':
          description: The scheduled text.
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/XRateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/XRateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/XRateLimitReset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScheduledTextAnswer'
              examples:
                scheduled:
                  summary: Waiting
                  value:
                    success: true
                    data:
                      id: 00000000000000000000000b
                      to: '+14155550123'
                      message: 'Reminder: your appointment is tomorrow at 10:00.'
                      sendAt: '2030-01-15T07:00:00.000Z'
                      status: scheduled
                      deviceId: null
                      messageId: null
                      error: null
                      createdAt: '2030-01-14T12:00:00.000Z'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: The key lacks the `sms:read` permission.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                permission:
                  summary: Missing permission
                  value:
                    statusCode: 403
                    error: Forbidden
                    code: PERMISSION_REQUIRED
                    permission: sms:read
                    message: This API key lacks the 'sms:read' permission
        '404':
          description: No such scheduled text for this key. A malformed id, and another key's text, get the same answer.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                notFound:
                  summary: Not found
                  value:
                    statusCode: 404
                    error: Not Found
                    code: SCHEDULE_NOT_FOUND
                    message: This scheduled text no longer exists.
        '429':
          $ref: '#/components/responses/RateLimited'
    delete:
      tags:
      - Scheduled texts
      operationId: cancelScheduledText
      summary: Cancel a scheduled text
      description: 'Permission: `sms:send`. Cancels a text this key scheduled, while it still waits.'
      parameters:
      - name: id
        in: path
        required: true
        description: The id of the scheduled text.
        schema:
          type: string
        example: 00000000000000000000000b
      responses:
        '200':
          description: Canceled.
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/XRateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/XRateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/XRateLimitReset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScheduledTextAnswer'
              examples:
                canceled:
                  summary: Canceled
                  value:
                    success: true
                    data:
                      id: 00000000000000000000000b
                      to: '+14155550123'
                      message: 'Reminder: your appointment is tomorrow at 10:00.'
                      sendAt: '2030-01-15T07:00:00.000Z'
                      status: canceled
                      deviceId: null
                      messageId: null
                      error: null
                      createdAt: '2030-01-14T12:00:00.000Z'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: The key lacks the `sms:send` permission.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                permission:
                  summary: Missing permission
                  value:
                    statusCode: 403
                    error: Forbidden
                    code: PERMISSION_REQUIRED
                    permission: sms:send
                    message: This API key lacks the 'sms:send' permission
        '404':
          description: No such scheduled text for this key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                notFound:
                  summary: Not found
                  value:
                    statusCode: 404
                    error: Not Found
                    code: SCHEDULE_NOT_FOUND
                    message: This scheduled text no longer exists.
        '409':
          description: It already went out or was canceled.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                notEditable:
                  summary: Too late
                  value:
                    statusCode: 409
                    error: Conflict
                    code: SCHEDULE_NOT_EDITABLE
                    message: This text has already gone out or was canceled.
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  schemas:
    Error:
      type: object
      description: An error from a route under /api/v1.
      required:
      - statusCode
      - message
      properties:
        statusCode:
          type: integer
          description: The HTTP status.
          example: 400
        message:
          description: 'What went wrong: a sentence, or a list of sentences when the request failed validation.'
          oneOf:
          - type: string
          - type: array
            items:
              type: string
        error:
          type: string
          description: The name of the HTTP status.
          example: Bad Request
        code:
          type: string
          description: 'A stable code, on the errors that have one: `API_KEY_FROM_WEB_PAGE`, `PERMISSION_REQUIRED`, `KEY_DAILY_CAP_REACHED`; `IDEMPOTENCY_KEY_INVALID`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_KEY_IN_PROGRESS`; `SCHEDULE_INVALID_INPUT`, `SCHEDULE_TOO_SOON`, `SCHEDULE_TOO_FAR`, `SCHEDULE_TEXT_TOO_LONG`, `SCHEDULE_NUMBER_NOT_ALLOWED`, `SCHEDULE_PHONE_NOT_FOUND`, `SCHEDULE_SEALED_ONLY_PHONE`, `SCHEDULE_LIMIT_REACHED`, `SCHEDULE_NOT_FOUND`, `SCHEDULE_NOT_EDITABLE`, `SCHEDULE_ENCRYPTED_TEXT`, `SCHEDULE_SIGN_IN_CODE`; `FORWARDING_NOT_AVAILABLE`; on the /sms/compat routes `BODY_NOT_OBJECT`, `RECIPIENT_LIST`, `RECIPIENT_CONFLICT`, `RECIPIENT_MISSING`, `TEXT_MISSING`, `CODE_MISSING`, `SCHEDULE_NOT_HERE`, `ENCRYPTED_NOT_HERE`, `CALLS_NOT_SUPPORTED`.'
          example: PERMISSION_REQUIRED
        permission:
          type: string
          description: 'With `PERMISSION_REQUIRED`: the permission the key lacks.'
          example: sms:send
        max:
          type: integer
          description: 'With `SCHEDULE_LIMIT_REACHED`: how many texts your plan lets wait at once.'
          example: 200
        limit:
          type: integer
          description: 'With `KEY_DAILY_CAP_REACHED`: the key''s daily limit, in SMS parts.'
          example: 100
        used:
          type: integer
          description: 'With `KEY_DAILY_CAP_REACHED`: the parts this key used today (UTC).'
          example: 100
        parts:
          type: integer
          description: 'With `KEY_DAILY_CAP_REACHED`: the parts this text takes.'
          example: 1
    ScheduledTextList:
      type: object
      required:
      - success
      - data
      properties:
        success:
          type: boolean
          enum:
          - true
        data:
          type: object
          required:
          - items
          - total
          - page
          - limit
          - waiting
          - max
          properties:
            items:
              type: array
              items:
                $ref: '#/components/schemas/ScheduledText'
            total:
              type: integer
              description: How many this key has in this list.
              example: 1
            page:
              type: integer
              example: 1
            limit:
              type: integer
              example: 50
            waiting:
              type: integer
              description: How many texts wait in the whole account, from any key, the dashboard or the desktop app.
              example: 1
            max:
              type: integer
              description: 'How many your plan lets wait at once: Free 10, Starter 50, Standard 200, Professional 500, Enterprise 1000.'
              example: 200
    ScheduledText:
      type: object
      description: A text scheduled through the API.
      required:
      - id
      - to
      - message
      - sendAt
      - status
      - deviceId
      - messageId
      - error
      - createdAt
      properties:
        id:
          type: string
          description: The id of the scheduled text.
          example: 00000000000000000000000b
        to:
          type: string
          description: The number, as you wrote it.
          example: '+14155550123'
        message:
          type: string
          example: 'Reminder: your appointment is tomorrow at 10:00.'
        sendAt:
          type: string
          format: date-time
          description: When it goes out, in UTC.
          example: '2030-01-15T07:00:00.000Z'
        status:
          type: string
          enum:
          - scheduled
          - sent
          - failed
          - canceled
          description: '`scheduled`: waiting. `sent`: handed on to your phone at its time; the text''s own status is on `messageId`. `failed`: not handed on, and never retried on its own (see `error`). `canceled`.'
        deviceId:
          type:
          - string
          - 'null'
          pattern: ^[0-9a-fA-F]{24}$
          description: The phone your request named, or `null` for your default phone at that time.
          example: 00000000000000000000000a
        messageId:
          type:
          - string
          - 'null'
          pattern: ^[0-9a-fA-F]{24}$
          description: 'Once it went out: the id to follow with `GET /api/v1/sms/status/{messageId}`.'
          example: null
        error:
          type:
          - string
          - 'null'
          description: 'Why it failed: `key_not_active` (the key was stopped, deleted or expired, or lost `sms:send`), `limit_reached`, `key_cap_reached`, `invalid_number`, `phone_not_found`, `interrupted` or `failed`.'
          example: null
        createdAt:
          type:
          - string
          - 'null'
          format: date-time
          example: '2030-01-14T12:00:00.000Z'
    ScheduledTextAnswer:
      type: object
      required:
      - success
      - data
      properties:
        success:
          type: boolean
          enum:
          - true
        data:
          $ref: '#/components/schemas/ScheduledText'
  responses:
    Unauthorized:
      description: The API key is missing, wrong, expired or deactivated, or was sent from a web page on another site.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            missing:
              summary: No key
              value:
                statusCode: 401
                error: Unauthorized
                message: 'API key is required. Use the X-API-Key header, Authorization: Bearer <key>, or HTTP Basic auth with the key as the password.'
            invalid:
              summary: Wrong or deactivated key
              value:
                statusCode: 401
                error: Unauthorized
                message: Invalid or expired API key
            fromWebPage:
              summary: Sent from a web page on another site
              value:
                statusCode: 401
                error: Unauthorized
                code: API_KEY_FROM_WEB_PAGE
                message: API keys are not accepted from a web page on another site. Call the SMSTunnel API from your server and keep the key there.
    RateLimited:
      description: 'Too many requests: wait for the seconds in `Retry-After`.'
      headers:
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            rateLimit:
              summary: Over the per-key limit
              value:
                statusCode: 429
                message: 'ThrottlerException: Too Many Requests'
            accountLimit:
              summary: Over the limit of all the keys of the account
              value:
                statusCode: 429
                message: 'Too Many Requests: the API keys of this account together may make 300 of these requests every 60 seconds (each one 100). Retry after the seconds in Retry-After.'
  headers:
    XRateLimitRemaining:
      description: Requests left in the window.
      schema:
        type: integer
    RetryAfter:
      description: Seconds to wait before trying again.
      schema:
        type: integer
    XRateLimitReset:
      description: Seconds until the window ends.
      schema:
        type: integer
    XRateLimitLimit:
      description: Requests allowed in the current one-minute window (the tighter of the key's and the account's).
      schema:
        type: integer
  securitySchemes:
    ApiKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
      description: Your API key (`sk_live_…`). When present, it wins over `Authorization`.
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: sk_live_…
      description: Your API key as a bearer token.
    BasicAuth:
      type: http
      scheme: basic
      description: HTTP Basic with your API key as the **password**; the user name is ignored (on the Twilio-compatible routes, your Account SID). The key as the user name with an empty password also works.
externalDocs:
  description: API reference
  url: https://smstunnel.io/api-reference/