Skip to main content
POST
Rent a hosted macOS session
  • Credential: an API key.
  • Account: wholesale partners only: any other account receives 403 not_a_wholesale_partner. A direct account buys sessions in the iSnap dashboard. See Who can rent through the API.
  • Line-scoped keys: the list of lines of a line-scoped key is not applied.
  • Test keys: a rent sent with an isnap_test_ account key rents a billable session: see Test keys.
  • Idempotency-Key: honored, and remembered for 24 hours. Send it with every rent. Without a key, every call rents one more billable session. See Renting a session and Lines and hosted macOS sessions.
  • Events: none. macos_session.rented is sent only when iSnap attaches a session to your account on its own: see Events.
  • No list: no operation lists sessions. Store the id of the response.

Errors

The errors that every operation shares are in Errors.

Authorizations

Authorization
string
header
required

An API key created in the iSnap dashboard, or a trial key, sent as Authorization: Bearer <key>. An API key starts with isnap_live_ or isnap_test_; both act on the same account, lines and billing. A trial key acts on its trial only.

Headers

idempotency-key
string

Optional key that makes a retry safe. A request repeated with the same key, by the same API key, with the same method, path and body, within 24 hours, returns the first successful response unchanged, its trace_id and request_id included, and does not act again. The body is compared byte for byte: a request with no body and a request with {} are two different requests. The same key with another method, path or body returns 409 idempotency_key_collision. While the first request is still running, a retry returns 503 idempotency_in_flight; a request that never completes frees its key after 60 seconds. Only a 2xx response is recorded: after a failed request, the retry runs again. At most 255 characters: a longer key returns 400 validation_failed. The X-Idempotency-Key header is read when Idempotency-Key is absent.

Maximum string length: 255

Body

application/json

Metadata for the rental. The body is optional.

metadata
object

Your own key-value data. iSnap stores it as sent and does not interpret it. Events about this resource carry it in data.metadata. At most 20 keys and 8,192 bytes once serialized as JSON.

Example:

Response

The hosted macOS session, rented from now.

success
enum<boolean>
required

Always true on a success response.

Available options:
true
data
object
required

A hosted macOS session that the account rents.

trace_id
string
required

Trace id of the request that produced this response: 32 lowercase hexadecimal characters. Quote it when you report a problem to iSnap.

request_id
string
required

Id of the request that produced this response: req_ followed by 25 letters or digits.