Create account
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",
"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",
"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',
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',
'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 \"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 \"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 \"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_2Nf...",
"api_key": "b1c2...",
"phone_numbers": [
"+33712345678"
],
"status": "ACTIVE",
"activated": false,
"partner_client_ref": "crm-12345"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}{
"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
}
}Partner
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. The account is billed as one seat on your subscription.
POST
/
v2
/
api
/
partner
/
accounts
Create account
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",
"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",
"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',
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',
'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 \"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 \"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 \"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_2Nf...",
"api_key": "b1c2...",
"phone_numbers": [
"+33712345678"
],
"status": "ACTIVE",
"activated": false,
"partner_client_ref": "crm-12345"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}{
"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:
PARTNERnumber_preference.countryis required (ISO country code, e.g.FR);number_preference.prefixis optional (e.g.+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 is billed as one seat on your subscription; no charge is made to your customer.
- If the email or personal mobile already belongs to an Allo account, the request fails with
PARTNER_ACCOUNT_ALREADY_EXISTS.
Authorizations
Body
application/json
Becomes the account's login.
Example:
Example:
"Jane Doe"
Mandatory — an existing mobile the secondary number attaches to.
Example:
"+33612345678"
Show child attributes
Show child attributes
Your own reference for this customer. Echoed back and on the activation webhook.
Example:
"crm-12345"
Response
Account created
Show child attributes
Show child attributes
Was this page helpful?
⌘I