curl --request POST \
--url https://api.exowpee.com/v1/team/invitations/accept/{token} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"first_name": "<string>",
"last_name": "<string>",
"password": "<string>",
"phone_number": "<string>"
}
'import requests
url = "https://api.exowpee.com/v1/team/invitations/accept/{token}"
payload = {
"first_name": "<string>",
"last_name": "<string>",
"password": "<string>",
"phone_number": "<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({
first_name: '<string>',
last_name: '<string>',
password: '<string>',
phone_number: '<string>'
})
};
fetch('https://api.exowpee.com/v1/team/invitations/accept/{token}', 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/team/invitations/accept/{token}",
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([
'first_name' => '<string>',
'last_name' => '<string>',
'password' => '<string>',
'phone_number' => '<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/team/invitations/accept/{token}"
payload := strings.NewReader("{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"password\": \"<string>\",\n \"phone_number\": \"<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/team/invitations/accept/{token}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"password\": \"<string>\",\n \"phone_number\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/team/invitations/accept/{token}")
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 \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"password\": \"<string>\",\n \"phone_number\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"errors": {}
}Accept an invitation
Lets an invited person join using the link from their invitation email. New people set up their account details; existing accounts are simply added.
curl --request POST \
--url https://api.exowpee.com/v1/team/invitations/accept/{token} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"first_name": "<string>",
"last_name": "<string>",
"password": "<string>",
"phone_number": "<string>"
}
'import requests
url = "https://api.exowpee.com/v1/team/invitations/accept/{token}"
payload = {
"first_name": "<string>",
"last_name": "<string>",
"password": "<string>",
"phone_number": "<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({
first_name: '<string>',
last_name: '<string>',
password: '<string>',
phone_number: '<string>'
})
};
fetch('https://api.exowpee.com/v1/team/invitations/accept/{token}', 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/team/invitations/accept/{token}",
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([
'first_name' => '<string>',
'last_name' => '<string>',
'password' => '<string>',
'phone_number' => '<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/team/invitations/accept/{token}"
payload := strings.NewReader("{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"password\": \"<string>\",\n \"phone_number\": \"<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/team/invitations/accept/{token}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"password\": \"<string>\",\n \"phone_number\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/team/invitations/accept/{token}")
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 \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"password\": \"<string>\",\n \"phone_number\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"errors": {}
}- No sign-in is needed.
- The token must be a valid invitation token, not expired and not blacklisted.
- The token must be the latest one sent for the invitation: inviting the same email again renews the pending invitation and older links stop working.
- The invitation must still be pending and not past its expiry date.
- The person must not already be a member of the space (company, client or organization) of the invitation.
- When the email has no account yet, first_name, last_name (3 to 250 characters), phone_number (7 to 15 digits with an optional leading +, not used by any account) and a strong password (8 or more characters with lower case, upper case, a digit and a symbol) are required; when an account exists these fields are not used to create anything, but any value sent is still format-checked, and a phone number that already belongs to an account is refused even if it is the person’s own.
- The invitation must still carry at least one profile, and each profile must still belong to the space; otherwise the acceptance is rolled back.
- Creates the account for the invited email when none exists, with the email already marked verified; the email comes from the invitation, not from the body.
- Gives the person an active assignment for each profile of the invitation in the invitation’s space; none is the default.
- Creates the member (company member, client member or organization member), active, with the pseudo of the invitation or first and last name; a numbered suffix such as (2) is added when the pseudo was taken meanwhile.
- Marks the invitation accepted, stamps accepted_at and links it to the new member.
- Invalidates the invitation token after the transaction commits, so the link cannot be reused.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Invitation token from the emailed link. It is valid until the invitation's expiry and only if no newer invitation was sent to the same email.
Body
First name of the new person, 3 to 250 characters. Required when the invited email has no account yet; not used when an account exists.
255Last name of the new person, 3 to 250 characters. Required when the invited email has no account yet; not used when an account exists.
255Password of the new account: at least 8 characters with lower case, upper case, a digit and a symbol. Required when the invited email has no account yet; not used when an account exists.
Phone number of the new account, optional plus sign followed by 7 to 15 digits. Required when the invited email has no account yet. Must not belong to any existing account.