Suspend account
curl --request POST \
--url https://api.withallo.com/v2/api/partner/accounts/{id}/suspend \
--header 'Authorization: <api-key>'import requests
url = "https://api.withallo.com/v2/api/partner/accounts/{id}/suspend"
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/accounts/{id}/suspend', 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/accounts/{id}/suspend",
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/accounts/{id}/suspend"
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/accounts/{id}/suspend")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.withallo.com/v2/api/partner/accounts/{id}/suspend")
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": "usr-575966AF3661061265263C58882BC409D2A427B8",
"phone_numbers": [
"+33712345678"
],
"status": "SUSPENDED",
"activated": true,
"partner_client_ref": "crm-12345"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}{
"error": {}
}{
"error": {}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}Accounts
Suspend account
Suspends an account you provisioned, right away. Inbound and outbound calls, outgoing SMS and the AI receptionist stop for every member of the account: each member’s status becomes SUSPENDED, and their eSIM lines are suspended. The account keeps its numbers, its eSIMs and its history, and its billing does not change. Incoming SMS are stored without any notification. Idempotent: suspending an account that is already suspended changes nothing and sends no second webhook. Allo sends partner.account.suspended to your webhook endpoint. Requires the PARTNER scope.
POST
/
v2
/
api
/
partner
/
accounts
/
{id}
/
suspend
Suspend account
curl --request POST \
--url https://api.withallo.com/v2/api/partner/accounts/{id}/suspend \
--header 'Authorization: <api-key>'import requests
url = "https://api.withallo.com/v2/api/partner/accounts/{id}/suspend"
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/accounts/{id}/suspend', 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/accounts/{id}/suspend",
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/accounts/{id}/suspend"
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/accounts/{id}/suspend")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.withallo.com/v2/api/partner/accounts/{id}/suspend")
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": "usr-575966AF3661061265263C58882BC409D2A427B8",
"phone_numbers": [
"+33712345678"
],
"status": "SUSPENDED",
"activated": true,
"partner_client_ref": "crm-12345"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}{
"error": {}
}{
"error": {}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}Required scope:
PARTNERstatus: SUSPENDED.
What stops
The suspension covers every member and every number of the account. Each member’sstatus becomes SUSPENDED, and a member you add while the account is suspended is SUSPENDED from the start.
- Inbound calls are refused: they do not ring the apps or the eSIMs.
- Outbound calls from the Allo apps play a short message instead, saying the line is suspended and asking the caller to contact their provider. The message does not name Allo.
- Outgoing SMS are refused with
403 ACCOUNT_SUSPENDED. On/v2/sms, the endpoint the Allo apps use, the error code isAllo.9. - The AI receptionist does not answer, since inbound calls stop before they reach it.
- eSIM lines are suspended at the mobile network, since their holder is
SUSPENDED. This usually takes seconds. If the network does not confirm at once, Allo retries every 5 minutes. Until then, calls and SMS on the eSIM itself can still go through.
What stays
- The account’s numbers, its eSIMs and its call and message history.
- Incoming SMS are stored in the conversation, with no notification and no automatic reply.
- Sign-in. Members can still open the Allo apps and read their history. They cannot call or text.
- Billing does not change. The subscription you pay for the account keeps running and renews as usual. To stop billing, deactivate the account.
Webhook and idempotency
Allo sendspartner.account.suspended to your own webhook endpoint, not to the account’s. Without a webhook endpoint, read the status with Get account.
The request is idempotent. Suspending an account that is already suspended changes nothing, and Allo sends no second webhook.
{id} is the account id returned by Create account. An account your API key did not create, or one already deactivated, returns 404 PARTNER_ACCOUNT_NOT_FOUND.Was this page helpful?