Revoke eSIM
curl --request POST \
--url https://api.withallo.com/v2/api/partner/esims/{id}/revoke \
--header 'Authorization: <api-key>'import requests
url = "https://api.withallo.com/v2/api/partner/esims/{id}/revoke"
headers = {"Authorization": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: '<api-key>'}};
fetch('https://api.withallo.com/v2/api/partner/esims/{id}/revoke', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.withallo.com/v2/api/partner/esims/{id}/revoke",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.withallo.com/v2/api/partner/esims/{id}/revoke"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.withallo.com/v2/api/partner/esims/{id}/revoke")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.withallo.com/v2/api/partner/esims/{id}/revoke")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "eso-2F6A1C9D4B7E8A0F3D5C6B9A1E2F4D7C8B0A3E61",
"account_id": "usr-575966AF3661061265263C58882BC409D2A427B8",
"partner_client_ref": "crm-12345",
"phone_number": "+33745805999",
"tier": "ESIM_20GB",
"status": "REVOKED",
"failure_code": null,
"created_at": "2026-10-14T10:05:00"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}{
"error": {}
}{
"error": {}
}{
"error": {}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}eSIM
Revoke eSIM
Revokes an eSIM right away: it stops working on its phone for good. The number stays on the account, keeps its history and rings the Allo apps instead. The eSIM’s data tier ends now. To put the number on a phone again, order a new eSIM for it, which charges the setup fee. Idempotent: revoking an eSIM that is already REVOKED returns it unchanged. Requires the PARTNER scope.
POST
/
v2
/
api
/
partner
/
esims
/
{id}
/
revoke
Revoke eSIM
curl --request POST \
--url https://api.withallo.com/v2/api/partner/esims/{id}/revoke \
--header 'Authorization: <api-key>'import requests
url = "https://api.withallo.com/v2/api/partner/esims/{id}/revoke"
headers = {"Authorization": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: '<api-key>'}};
fetch('https://api.withallo.com/v2/api/partner/esims/{id}/revoke', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.withallo.com/v2/api/partner/esims/{id}/revoke",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.withallo.com/v2/api/partner/esims/{id}/revoke"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.withallo.com/v2/api/partner/esims/{id}/revoke")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.withallo.com/v2/api/partner/esims/{id}/revoke")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "eso-2F6A1C9D4B7E8A0F3D5C6B9A1E2F4D7C8B0A3E61",
"account_id": "usr-575966AF3661061265263C58882BC409D2A427B8",
"partner_client_ref": "crm-12345",
"phone_number": "+33745805999",
"tier": "ESIM_20GB",
"status": "REVOKED",
"failure_code": null,
"created_at": "2026-10-14T10:05:00"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}{
"error": {}
}{
"error": {}
}{
"error": {}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}Required scope:
PARTNERREVOKED.
What happens to the number
- The number stays on the account, with the same owner and its call and message history.
- Calls to the number ring the Allo apps instead of the eSIM.
- The eSIM’s data tier ends now and is no longer billed.
- A revoked eSIM cannot be reactivated. To put the number on a phone again, order a new eSIM for it. The new order charges the setup fee.
Idempotency
Revoking an eSIM that is alreadyREVOKED returns it unchanged. An eSIM replaced by a later eSIM on the same number also reads REVOKED, and revoking it never touches the new one.
Errors
| Code | What it means |
|---|---|
PARTNER_ESIM_NOT_REVOCABLE | The eSIM is not live: it is still PROVISIONING, it FAILED, or it is being moved between the network and the eSIM (409). Only an ACTIVE eSIM can be revoked. Check it with Get eSIM. |
PARTNER_ESIM_MOVE_FAILED | The eSIM failed to move between the network and the eSIM (409), so it cannot be revoked until it is checked. Contact Allo support. Nothing was changed. |
PARTNER_ESIM_NOT_FOUND | No eSIM with this id was ordered on an account your API key created (404). |
Was this page helpful?