Firsty

Search...

Search...

Porting

Cancel a port-in request

Experimental. This endpoint is still settling — its request and response shape may change without a deprecation cycle.

Requests cancellation of a pending port-in. Cancellation is asynchronous: the status moves to cancelling and becomes cancelled once the provider confirms. After a confirmed cancellation the eSIM stays pre-active — submit a corrected request or abandon to activate with the temporary number.

post/profiles/{profileReference}/esims/{esimReference}/port-ins/{portInRequestReference}/cancel

Authorization

Authorization: Bearer {token} — an OAuth2 access token from the client-credentials flow. How authentication works

Path parameters

profileReferencestringrequired

The eSIM's profile reference (16-digit numeric string)

esimReferencestringrequired

eSIM reference identifier (18-digit opaque token)

portInRequestReferencestringrequired

Public port-in request reference (8-char uppercase base36)

Headers

X-Idempotency-Keystring

Optional idempotency key for mutating requests (POST, PATCH). If provided, duplicate requests with the same key within 48 hours will return the cached original response without duplicating side effects.

Behavior:

  • Same key + same request body → returns cached response (prevents duplicate operations)
  • Same key + different request body → returns 422 error
  • Same key + in-flight request → returns 409 error with Retry-After header
  • Keys expire after 48 hours

Request Body Matching: Request bodies are compared using a deterministic fingerprint. The fingerprint is computed by canonicalizing the JSON (sorting object keys recursively) and hashing with SHA-256. This means:

  • {"a":1,"b":2} and {"b":2,"a":1} are treated as identical ✓
  • Whitespace differences are ignored ✓
  • URL parameters and headers are NOT included in the fingerprint

Best Practices:

  • Use UUIDs or client-generated unique strings
  • Store keys on your side to support retries
  • Don't reuse keys across different operations

Responses

200Cancellation requestedapplication/json
Show response body
dataobject
Show properties
portInRequestReferencestringrequired

Public opaque port-in request reference (8-char uppercase base36)

profileReferencestringrequired
esimReferencestringrequired

The eSIM this port-in belongs to

msisdnstringrequired

The number being ported, in international format (E.164 without a leading +)

detailsobject

Provider-specific donor details. The exact fields and validation depend on the eSIM variant. Fields that are accepted, required, or mutually exclusive are resolved from the selected eSIM's number-porting provider. Unknown fields are rejected.

Show properties
donorContractTypestringrequired

Contract type of the number at the donor operator

Optionsprepaidpostpaid
donorIccidstring

Donor SIM ICCID at the donor operator. Exact format is validated per eSIM variant.

donorAccountNumberstring

Account/customer number at the donor operator

statusstringrequired
  • requested: Accepted by Firsty; provider submission in progress
  • approved: Donor/provider accepted the port
  • scheduled: Port scheduled for a future date (reserved for future markets)
  • cancelling: Cancellation requested, awaiting provider confirmation
  • completed: Number ported — the eSIM activates with the ported number
  • rejected: Donor rejected the request (see reason)
  • failed: Port failed (see reason)
  • cancelled: Cancellation confirmed
Optionsrequestedapprovedscheduledcancellingcompletedrejectedfailedcancelled
reasonobject | null

Failure/rejection detail, present when status is rejected or failed

Show properties
codestringrequired

Normalized failure/rejection code

messagestring | null

Human-readable detail when available

scheduledDatestring | null · date

Planned porting date when known (reserved for future markets)

submittedAtstring | null · date-time

When the port-in was submitted to the provider; null while submission is still pending

completedAtstring | null · date-time

When the port completed

abandonedboolean

Whether porting was abandoned in favour of the temporary number (irreversible; no corrected request possible)

createdAtstring · date-timerequired
updatedAtstring · date-timerequired
409Attempt is not cancellable in its current statusapplication/problem+json
Show response body
typestring · urirequired

URI reference to error documentation

titlestringrequired

Short, consistent error summary

statusintegerrequired

HTTP status code

detailstringrequired

Human-readable explanation specific to this occurrence

401Unauthorized - missing or invalid API key403Forbidden - client does not have access to this resource404Resource not found429Rate limit exceeded500Internal server error