User Plans

Replace a SIM card

Initiates a SIM card replacement (eSIM swap) for a specific number within a user's plan. This provisions a new eSIM and deactivates the previous one.

Important: This endpoint should only be used when the end-user changes devices and the existing eSIM activation QR code (LPA string) has been confirmed to be expired or no longer working. Do not use this endpoint to troubleshoot connectivity issues — contact support instead.

Rate limit: one replacement per number inside the cooldown your organization's SIM-swap offering sets, counted from when the number's last replacement finished — and once per calendar day for a German number. A request inside the window gets a 429 naming when to retry.

Flow:

  1. A new eSIM profile is provisioned and the old SIM is deactivated
  2. Until the new profile is ready, GET /v1/user-plans/{userId} reports the number with sim: null — its state is REPLACING, and SIM details are published only in READY
  3. Back in READY, the number's sim.activationCode is the new one to render as a QR code

Organizations with Telgea's end-user communications enabled also email the user the new activation code. White-label integrations have them switched off and present it themselves.

Scopes: numbers:replace-sim and user-plans:read — the number is checked against the addressed user's plan before any replacement is started.

post/v1/user-plans/{userId}/sim-replacement

Request

  • Base URL
    https://api.telgea.com
  • Auth
    API key in header x-api-key

Path parameters

userIdstring uuid required

UUID of the user whose plan this is.

Example:9c1f2a6e-3b7d-4e0a-8f21-5d6c7b8a9e01

Headers

idempotency-keystring

A value unique to this request, of 1 to 255 printable ASCII characters — a UUID is the usual choice. Retry with the same key within 24 hours and you get the original response back, even if it was a failure, and nothing is done twice. Send a new key whenever you change the request. Keys are private to your API key and organisation.

Example:0b7e4f1c-6a2d-4c9e-8f35-d1a7b2c93e60

Request body

numberIdstring uuid required

UUID of the number to replace the SIM for. Obtain from the user plan details endpoint (localNumber.id or travelNumber.id).

Example request

{
  "numberId": "8238c1b9-c2c0-4455-9b03-4bd787052709"
}

Response

SIM replacement request accepted and processed asynchronously. Poll GET /v1/user-plans/{userId} until the number is READY again with its new SIM.

statusstring required

Status of the SIM replacement request

Example response

{
  "status": "accepted"
}

Changes

No recorded changes to this operation across all 1 revision of this API.