curl --request POST \
--url https://api.withallo.com/v2/api/partner/accounts \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "[email protected]",
"name": "Jane Doe",
"interval": "MONTHLY",
"personal_mobile": "+33612345678",
"partner_client_ref": "crm-12345",
"number_preference": {
"country": "FR",
"prefix": "+337"
}
}
'import requests
url = "https://api.withallo.com/v2/api/partner/accounts"
payload = {
"email": "[email protected]",
"name": "Jane Doe",
"interval": "MONTHLY",
"personal_mobile": "+33612345678",
"partner_client_ref": "crm-12345",
"number_preference": {
"country": "FR",
"prefix": "+337"
}
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email: '[email protected]',
name: 'Jane Doe',
interval: 'MONTHLY',
personal_mobile: '+33612345678',
partner_client_ref: 'crm-12345',
number_preference: {country: 'FR', prefix: '+337'}
})
};
fetch('https://api.withallo.com/v2/api/partner/accounts', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email' => '[email protected]',
'name' => 'Jane Doe',
'interval' => 'MONTHLY',
'personal_mobile' => '+33612345678',
'partner_client_ref' => 'crm-12345',
'number_preference' => [
'country' => 'FR',
'prefix' => '+337'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.withallo.com/v2/api/partner/accounts"
payload := strings.NewReader("{\n \"email\": \"[email protected]\",\n \"name\": \"Jane Doe\",\n \"interval\": \"MONTHLY\",\n \"personal_mobile\": \"+33612345678\",\n \"partner_client_ref\": \"crm-12345\",\n \"number_preference\": {\n \"country\": \"FR\",\n \"prefix\": \"+337\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
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")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"[email protected]\",\n \"name\": \"Jane Doe\",\n \"interval\": \"MONTHLY\",\n \"personal_mobile\": \"+33612345678\",\n \"partner_client_ref\": \"crm-12345\",\n \"number_preference\": {\n \"country\": \"FR\",\n \"prefix\": \"+337\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.withallo.com/v2/api/partner/accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"[email protected]\",\n \"name\": \"Jane Doe\",\n \"interval\": \"MONTHLY\",\n \"personal_mobile\": \"+33612345678\",\n \"partner_client_ref\": \"crm-12345\",\n \"number_preference\": {\n \"country\": \"FR\",\n \"prefix\": \"+337\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "usr-575966AF3661061265263C58882BC409D2A427B8",
"api_key": "b1c2...",
"phone_numbers": [
"+33712345678"
],
"status": "ACTIVE",
"activated": false,
"partner_client_ref": "crm-12345"
}
}{
"error": {}
}{
"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
}
}Create account
Creates an Allo account for one of your customers, provisions a phone number, and returns a scoped API key for the account. Requires the PARTNER scope and a Discounted licence (reseller) partner contract. The account gets its own Business plan subscription, billed to your payment method at the chosen interval with your partner discount applied. The full period is charged when the account is created, with no proration. Allo never charges your customer. This endpoint is optional: the partner portal (web.withallo.com/partner) creates accounts without code.
curl --request POST \
--url https://api.withallo.com/v2/api/partner/accounts \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "[email protected]",
"name": "Jane Doe",
"interval": "MONTHLY",
"personal_mobile": "+33612345678",
"partner_client_ref": "crm-12345",
"number_preference": {
"country": "FR",
"prefix": "+337"
}
}
'import requests
url = "https://api.withallo.com/v2/api/partner/accounts"
payload = {
"email": "[email protected]",
"name": "Jane Doe",
"interval": "MONTHLY",
"personal_mobile": "+33612345678",
"partner_client_ref": "crm-12345",
"number_preference": {
"country": "FR",
"prefix": "+337"
}
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email: '[email protected]',
name: 'Jane Doe',
interval: 'MONTHLY',
personal_mobile: '+33612345678',
partner_client_ref: 'crm-12345',
number_preference: {country: 'FR', prefix: '+337'}
})
};
fetch('https://api.withallo.com/v2/api/partner/accounts', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email' => '[email protected]',
'name' => 'Jane Doe',
'interval' => 'MONTHLY',
'personal_mobile' => '+33612345678',
'partner_client_ref' => 'crm-12345',
'number_preference' => [
'country' => 'FR',
'prefix' => '+337'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.withallo.com/v2/api/partner/accounts"
payload := strings.NewReader("{\n \"email\": \"[email protected]\",\n \"name\": \"Jane Doe\",\n \"interval\": \"MONTHLY\",\n \"personal_mobile\": \"+33612345678\",\n \"partner_client_ref\": \"crm-12345\",\n \"number_preference\": {\n \"country\": \"FR\",\n \"prefix\": \"+337\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
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")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"[email protected]\",\n \"name\": \"Jane Doe\",\n \"interval\": \"MONTHLY\",\n \"personal_mobile\": \"+33612345678\",\n \"partner_client_ref\": \"crm-12345\",\n \"number_preference\": {\n \"country\": \"FR\",\n \"prefix\": \"+337\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.withallo.com/v2/api/partner/accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"[email protected]\",\n \"name\": \"Jane Doe\",\n \"interval\": \"MONTHLY\",\n \"personal_mobile\": \"+33612345678\",\n \"partner_client_ref\": \"crm-12345\",\n \"number_preference\": {\n \"country\": \"FR\",\n \"prefix\": \"+337\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "usr-575966AF3661061265263C58882BC409D2A427B8",
"api_key": "b1c2...",
"phone_numbers": [
"+33712345678"
],
"status": "ACTIVE",
"activated": false,
"partner_client_ref": "crm-12345"
}
}{
"error": {}
}{
"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
}
}PARTNERintervalis required:MONTHLYorYEARLY. It sets the billing interval of the account’s subscription.number_preference.countryis required (ISO country code, e.g.FR);number_preference.prefixis optional (e.g.+337).number_preference.esimis optional,falseby default. Set it totrueto get a French mobile number that can carry an eSIM, which you then order with Order eSIM. eSIM numbers are only available in France: with anycountryother thanFR, the request fails withESIM_NOT_AVAILABLE_IN_COUNTRY.prefixstill applies, for example7or+337.- A phone number is secured before the account is created. If none can be assigned or purchased, the request fails with
NO_NUMBER_AVAILABLEand nothing is created. - The account gets its own Business plan subscription, billed to your payment method with your partner discount applied. The full period is charged when the account is created. No charge is made to your customer. Call Get account price first to see the amount.
- If your payment method is missing or declined, the request fails with
PARTNER_BILLING_FAILEDand nothing is created. - If the email or personal mobile already belongs to an Allo account, the request fails with
PARTNER_ACCOUNT_ALREADY_EXISTS. - If your account is not an enabled partner, the request fails with
PARTNER_ACCESS_REQUIRED. If your partner contract cannot create accounts, it fails withPARTNER_CONTRACT_CANNOT_PROVISION. Only Discounted licence (reseller) partners can create accounts.
Authorizations
Body
Becomes the account's login.
"Jane Doe"
Billing interval of the account's own subscription, billed to your payment method.
MONTHLY, YEARLY "MONTHLY"
Show child attributes
Show child attributes
Optional. An existing mobile the new number can attach to.
"+33612345678"
Your own reference for this customer. Echoed back and on the activation webhook.
"crm-12345"
Response
Account created
Show child attributes
Show child attributes
Was this page helpful?