curl --request POST \
--url https://api.exowpee.com/v1/auth/client/register \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"token": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "jsmith@example.com",
"phone_number": "<string>",
"password": "<string>"
}
'import requests
url = "https://api.exowpee.com/v1/auth/client/register"
payload = {
"token": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "jsmith@example.com",
"phone_number": "<string>",
"password": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
token: '<string>',
first_name: '<string>',
last_name: '<string>',
email: 'jsmith@example.com',
phone_number: '<string>',
password: '<string>'
})
};
fetch('https://api.exowpee.com/v1/auth/client/register', 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.exowpee.com/v1/auth/client/register",
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([
'token' => '<string>',
'first_name' => '<string>',
'last_name' => '<string>',
'email' => 'jsmith@example.com',
'phone_number' => '<string>',
'password' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.exowpee.com/v1/auth/client/register"
payload := strings.NewReader("{\n \"token\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone_number\": \"<string>\",\n \"password\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.exowpee.com/v1/auth/client/register")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"token\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone_number\": \"<string>\",\n \"password\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/auth/client/register")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"token\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone_number\": \"<string>\",\n \"password\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"detail": true
}{
"message": "<string>",
"errors": {}
}Register a client account
Creates an account, a new organization and a client account under it from an emailed sign-up token, with the person as administrator.
curl --request POST \
--url https://api.exowpee.com/v1/auth/client/register \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"token": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "jsmith@example.com",
"phone_number": "<string>",
"password": "<string>"
}
'import requests
url = "https://api.exowpee.com/v1/auth/client/register"
payload = {
"token": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "jsmith@example.com",
"phone_number": "<string>",
"password": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
token: '<string>',
first_name: '<string>',
last_name: '<string>',
email: 'jsmith@example.com',
phone_number: '<string>',
password: '<string>'
})
};
fetch('https://api.exowpee.com/v1/auth/client/register', 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.exowpee.com/v1/auth/client/register",
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([
'token' => '<string>',
'first_name' => '<string>',
'last_name' => '<string>',
'email' => 'jsmith@example.com',
'phone_number' => '<string>',
'password' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.exowpee.com/v1/auth/client/register"
payload := strings.NewReader("{\n \"token\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone_number\": \"<string>\",\n \"password\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.exowpee.com/v1/auth/client/register")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"token\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone_number\": \"<string>\",\n \"password\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/auth/client/register")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"token\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone_number\": \"<string>\",\n \"password\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"detail": true
}{
"message": "<string>",
"errors": {}
}- No sign-in is needed; the route allows 5 calls per minute.
- The token must be a sign-up token issued by check-email for the same email address as the request, not expired and not already used; this is checked before any other field.
- The email must be a valid address not used by any existing account, and the phone number must not be used by any existing account (accounts that were deactivated still count).
- The password needs at least 8 characters with lower case, upper case, a digit and a symbol.
- A client name, a currency code of 3 characters in upper case and an exponent from 0 to 6 are required; currency defaults to XOF with exponent 0 when omitted.
- Creates the account (active, email not yet verified).
- Creates a new organization named by organization.name, owned by the person, with its own books and the person as organization member with an administrator profile.
- Creates the client under that organization, with its own books, and the person as its owner member.
- Creates the built-in administrator and read only profiles of the client space and assigns the administrator profile to the person as default profile.
- Invalidates the sign-up token and sends an email verification link (valid 1 hour); the person cannot sign in until the address is verified.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Sign-up token received in the email sent by check-email. It must have been issued for the same email address as this request, must not be expired (1 day) and is invalidated once the account is created.
First name of the new person, 3 to 250 characters.
3 - 250Last name of the new person, 3 to 250 characters.
3 - 250Email address of the new account. Must be valid, must not be used by any existing account and must be the address the token was issued for. The account cannot sign in until it is verified.
Phone number of the new account, 3 to 30 characters. Must not be used by any existing account.
3 - 30Password of the new account: at least 8 characters with lower case, upper case, a digit and a symbol.
New organization created for the client account.
Show child attributes
Show child attributes
Client account created with the person as its owner.
Show child attributes
Show child attributes
Response
Always true when the account was created.