Skip to content

Release a number

POST
/release
curl --request POST \
--url https://api.clearance.rest/numbers/release \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--data '{ "sid": "c1aaeac1-ec52-44e2-b00a-d1350fb6bee6" }'

Releases a number. What that means depends on the number’s provider, which is read from the number itself:

  • Twilio: the number is deleted from the Twilio account.

  • Hero SMS: the activation is cancelled (refunded if no SMS arrived) or completed (if one did). Hero SMS refuses cancellation during the first ~2 minutes after renting; retry after that, or let the rental expire and refund on its own.

  • Mobile: only your project’s attachment is removed.

Media typeapplication/json
object
sid
required

The sid of a number from GET /list. Twilio’s own providerSid (PN…) is also accepted.

string
Example
{
"sid": "c1aaeac1-ec52-44e2-b00a-d1350fb6bee6"
}

Released.

Media typeapplication/json
object
success
required
boolean
Example
{
"success": true
}

sid is missing.

Media typeapplication/json

Error envelope returned with a non-2xx status.

object
success
required
boolean
error
required

Human-readable error message.

string
Example
{
"success": false,
"error": "sid zorunludur"
}

The X-API-Key header is missing or invalid.

Media typeapplication/json

Error envelope returned with a non-2xx status.

object
success
required
boolean
error
required

Human-readable error message.

string
Example
{
"success": false,
"error": "geçersiz API anahtarı"
}

The number does not belong to your project.

Media typeapplication/json

Error envelope returned with a non-2xx status.

object
success
required
boolean
error
required

Human-readable error message.

string
Example
{
"success": false,
"error": "numara bu projeye ait değil"
}

The upstream provider call failed (network error, auth error, or the provider’s own error).

Media typeapplication/json

Error envelope returned with a non-2xx status.

object
success
required
boolean
error
required

Human-readable error message.

string
Example
{
"success": false,
"error": "invalid json body"
}