curl --request POST \
--url https://api.exowpee.com/v1/auth/{type}/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/{type}/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/{type}/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/{type}/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/{type}/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/{type}/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/{type}/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": {}
}Sign up with a company
Creates a new user account and its first company from an emailed sign-up token, with the person as administrator.
curl --request POST \
--url https://api.exowpee.com/v1/auth/{type}/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/{type}/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/{type}/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/{type}/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/{type}/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/{type}/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/{type}/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.
- Only type user is routed.
- 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.
- The company needs a type, name, currency, a country code that exists in the tax catalog (currently BJ only) and a fiscal status valid for that country. Currency defaults to XOF with exponent 0 when omitted.
- Creates the account (active, email not yet verified).
- Creates a new organization named after the company, owned by the person, with its own books and the person as organization member with an administrator profile.
- Creates the company with its default settings, its accounting set-up (books in the company currency) and the tax profile for its country and fiscal status.
- Creates the built-in administrator and read only profiles of the company, assigns the administrator profile to the person and adds the person as company member named after their first and last name.
- 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.
Path Parameters
Kind of account to create. Only user is accepted: it creates a person with a new company.
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.
Company created with the account. The person becomes its administrator and owner.
Show child attributes
Show child attributes
Response
Always true when the account was created.