Create a new user plan
Provisions a local line for an existing user: a market-bound phone number and the eSIM that carries it.
The user must exist in your organization before creating a plan. Use the users endpoint to create users first if needed.
Provisioning flow:
- The user plan is created and returns PROVISIONING — a local number id, and travelNumberId: null
- A SIM is assigned from available inventory and the number allocated with the local market's operator
- The plan reaches ACTIVE, and GET /v1/user-plans/{userId} carries the local number's sim.activationCode
A travel eSIM is not part of this call. One is added afterwards, on its own, and only for an organization whose contract includes one and which holds a data pool outside its home zone — poll GET /v1/user-plans/{userId} to see whether a travelNumber appeared.
To install the eSIM yourself, take sim.activationCode — a GSMA LPA:1$… string — from GET /v1/user-plans/{userId} and encode it as a QR code; any QR library will do.
Organizations with Telgea's end-user communications enabled also send the user installation instructions by email. White-label integrations have them switched off, so that activation code is the only delivery and presenting it is yours to do.
Request
- Base URLhttps://api.telgea.com
- AuthAPI key in header x-api-key
Headers
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.
Request body
Example request
{
"userId": "9c1f2a6e-3b7d-4e0a-8f21-5d6c7b8a9e01",
"countryCode": "DK"
}Response
User plan created successfully. Returns the complete plan details including assigned phone numbers and SIM information.
Example response
{
"status": "PROVISIONING",
"localNumberId": "8238c1b9-c2c0-4455-9b03-4bd787052709"
}Changes
No recorded changes to this operation across all 1 revision of this API.