Skip to content

Create a ticket for the claim socket

POST
/numbers/device/claim/ticket
curl --request POST \
--url https://api.clearance.rest/numbers/device/claim/ticket \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--data '{ "label": "example" }'

Browsers cannot send headers on a WebSocket and the API key must not reach the browser: a backend gets a single-use, 60-second ticket with its key and hands it to the browser.

Media typeapplication/json
object
label
string
<= 255 characters
Examplegenerated
{
"label": "example"
}

Default Response

Media typeapplication/json
object
success
required
boolean
mobile_claim_ticket
required
string
expires_at
required
number
ttl_ms
required
number
apk_url
required
string
Example
{
"success": true
}

Default Response

Media typeapplication/json

Error envelope returned by every JSON endpoint.

object
success
required
boolean
error
required
object
code
required

Machine-readable error code (snake_case).

string
message
required

Human-readable message.

string
details

Extra context for the error.

object
key
additional properties
Example
{
"success": false
}

Default Response

Media typeapplication/json

Error envelope returned by every JSON endpoint.

object
success
required
boolean
error
required
object
code
required

Machine-readable error code (snake_case).

string
message
required

Human-readable message.

string
details

Extra context for the error.

object
key
additional properties
Example
{
"success": false
}