Skip to main content
This page is the map of the API: its base URL, the tables of its 70 operations with the credential each one takes, the conventions every operation follows, and the compatibility rules. Each operation has its own page, with its parameters, its responses and its errors.

Base URL

Every operation is served at this host, under the /v1/ path prefix. There is one host for every kind of key. Calls use HTTPS: a plain HTTP request is not served and returns 301 to the HTTPS URL. Call the API from a server: iSnap does not grant cross-origin browser access to other websites.

Operations

These tables are the canonical list of the operations. Their columns:
  • Credential. API key is an isnap_live_ or isnap_test_ key: both do the same thing. Trial key is the key of one trial. None means that the operation needs no credential. See Authentication.
  • Account. “Wholesale partners only” marks an operation that a direct account cannot use. An empty cell means any account. See Accounts.
  • Idempotency-Key. “Yes” means that the operation reads the header and recognizes a repeated request. “No” means that it ignores the header: a repeated request acts again. See Idempotency.
A line-scoped key is limited to its lines on some of these operations only: see Line-scoped keys.

Messages

Chats

Attachments

Recipient lookup

Lines

Webhooks

Trials

BYOD

Pre-orders

Hosted macOS sessions

Service

Conventions

Requests

  • A request body is JSON. Send Content-Type: application/json with every body. A +json subtype, and parameters such as charset, are accepted.
  • JSON fields and query parameters are in snake_case.
  • A body field that the operation does not define is ignored. Nine operations refuse it instead, with 400 validation_failed and the issue code unrecognized_keys: PATCH /v1/lines/{id}/config, POST /v1/pre-orders, PATCH /v1/pre-orders/{id}, POST /v1/byod/pair, POST /v1/trial/init, POST /v1/trial/{trial_id}/revoke, PATCH /v1/trial/{trial_id}, POST /v1/macos-sessions/rent and PATCH /v1/macos-sessions/{id}. On the other operations, a misspelled optional field is dropped without an error: check the response.
  • A query parameter that the operation does not define is ignored, without an error: a misspelled filter returns the list unfiltered.
  • A path or a method that the API does not define returns 404 not_found. Without an API key, a POST, PATCH, PUT or DELETE outside /v1/webhooks returns 403 forbidden first: see How a request is checked.
  • Timestamps in requests are ISO 8601 with a Z suffix: see Timestamps.

Responses

A success with a body has this shape, here the response of DELETE /v1/chats/{chat_id}/typing. It has no error key.
Other rules of a response:
  • Timestamps are ISO 8601 in UTC with milliseconds: see Timestamps.
  • Ids have a prefix that names the resource: see Identifiers.
  • A list returns its items one page at a time: see Pagination.
  • Every response carries the X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers: see Rate limits.
  • The responses of the operations that can return a secret carry Cache-Control: no-store, whatever their status: POST /v1/byod/pair, POST and GET /v1/pre-orders, GET /v1/pre-orders/{id}, its confirm and cancel, POST and GET /v1/webhooks, GET and PATCH /v1/webhooks/{id}, POST /v1/webhooks/{id}/rotate-secret, POST /v1/trial/init and GET /v1/trial/status.

Request and trace ids

Every response carries two ids in its headers. A response in the standard envelope, success or error, carries them in its body too. Log both with every call: you need them to report a problem. Write to support@isnap.ai with the trace_id and request_id of the response. Two request headers are optional:
  • X-Request-Id: your own request id. iSnap keeps it only when it has the form req_ followed by 25 letters and digits, and replaces any other value.
  • traceparent: a W3C trace context, 00-<32 hex>-<16 hex>-<2 hex> in lowercase. Its trace id becomes the trace_id of the response, and the header is returned. A malformed value is ignored.

Versioning and compatibility

The version of the API is a MAJOR.MINOR.PATCH number. It is the info.version of the OpenAPI document, and GET /v1/version returns it in data.version. These pages describe version 2.45.0. The path prefix stays /v1 whatever the major version. Build your client so that a minor version does not break it:
  • Ignore response fields, enum values and event types you do not know.
  • Record an event of an unknown type as processed, and skip it.

Deprecation

Before iSnap removes an operation or a field, it marks it deprecated for at least 30 days. A deprecation shows in three places: No operation is deprecated at this version. One field is: monthly_price on a line. No removal date is set for it. A removed operation returns 410. Its body is not the error format: error is the string endpoint_removed, and message, removed_at, successor and reason say when it was removed and what replaces it. Webhook payloads carry api_version: "v1", which is not the API version number. The changelog lists the versions, newest first.

OpenAPI document

GET https://api.isnap.ai/openapi.json returns the OpenAPI 3.0 document of the /v1 surface. It needs no credential.
That document also describes 17 operations under /v1/api-keys and /v1/billing. They accept only a dashboard session and return 401 to an API key: they are not part of this reference. API keys are created and revoked in the iSnap dashboard, where a direct account also pays: see Accounts. The document does not list a server: send its operations to https://api.isnap.ai.