Invite Team Member
curl --request POST \
--url https://api.rolla.xyz/api/v1/external/teams/invite \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"email": "jane@example.com",
"fullname": "Jane Doe",
"roleId": "21302ed1-0e63-44e6-bb02-8db6baa2efcd"
}
'import requests
url = "https://api.rolla.xyz/api/v1/external/teams/invite"
payload = {
"email": "jane@example.com",
"fullname": "Jane Doe",
"roleId": "21302ed1-0e63-44e6-bb02-8db6baa2efcd"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email: 'jane@example.com',
fullname: 'Jane Doe',
roleId: '21302ed1-0e63-44e6-bb02-8db6baa2efcd'
})
};
fetch('https://api.rolla.xyz/api/v1/external/teams/invite', 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.rolla.xyz/api/v1/external/teams/invite",
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' => 'jane@example.com',
'fullname' => 'Jane Doe',
'roleId' => '21302ed1-0e63-44e6-bb02-8db6baa2efcd'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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.rolla.xyz/api/v1/external/teams/invite"
payload := strings.NewReader("{\n \"email\": \"jane@example.com\",\n \"fullname\": \"Jane Doe\",\n \"roleId\": \"21302ed1-0e63-44e6-bb02-8db6baa2efcd\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<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.rolla.xyz/api/v1/external/teams/invite")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"jane@example.com\",\n \"fullname\": \"Jane Doe\",\n \"roleId\": \"21302ed1-0e63-44e6-bb02-8db6baa2efcd\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rolla.xyz/api/v1/external/teams/invite")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"jane@example.com\",\n \"fullname\": \"Jane Doe\",\n \"roleId\": \"21302ed1-0e63-44e6-bb02-8db6baa2efcd\"\n}"
response = http.request(request)
puts response.read_body{
"status": 201,
"message": "Invitation sent successfully",
"success": true,
"data": {
"userId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"email": "jane@example.com",
"fullname": "Jane Doe",
"isNewUser": false
}
}{
"status": 400,
"message": "User is already a member of this business"
}{
"status": 400,
"message": "Validation failed",
"code": "ACCOUNT_RESTRICTED",
"errors": [
{
"path": [
"amount"
],
"message": "amount must be a whole number of smallest currency units (e.g. cents)"
}
]
}Teams
Invite Team Member
Invites someone to your business by email. An existing Rolla user is added to the business and emailed an invitation to accept; a new email address gets an account and a sign-in link, and the response then also carries the magicToken from that link.
POST
/
teams
/
invite
Invite Team Member
curl --request POST \
--url https://api.rolla.xyz/api/v1/external/teams/invite \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"email": "jane@example.com",
"fullname": "Jane Doe",
"roleId": "21302ed1-0e63-44e6-bb02-8db6baa2efcd"
}
'import requests
url = "https://api.rolla.xyz/api/v1/external/teams/invite"
payload = {
"email": "jane@example.com",
"fullname": "Jane Doe",
"roleId": "21302ed1-0e63-44e6-bb02-8db6baa2efcd"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email: 'jane@example.com',
fullname: 'Jane Doe',
roleId: '21302ed1-0e63-44e6-bb02-8db6baa2efcd'
})
};
fetch('https://api.rolla.xyz/api/v1/external/teams/invite', 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.rolla.xyz/api/v1/external/teams/invite",
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' => 'jane@example.com',
'fullname' => 'Jane Doe',
'roleId' => '21302ed1-0e63-44e6-bb02-8db6baa2efcd'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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.rolla.xyz/api/v1/external/teams/invite"
payload := strings.NewReader("{\n \"email\": \"jane@example.com\",\n \"fullname\": \"Jane Doe\",\n \"roleId\": \"21302ed1-0e63-44e6-bb02-8db6baa2efcd\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<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.rolla.xyz/api/v1/external/teams/invite")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"jane@example.com\",\n \"fullname\": \"Jane Doe\",\n \"roleId\": \"21302ed1-0e63-44e6-bb02-8db6baa2efcd\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rolla.xyz/api/v1/external/teams/invite")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"jane@example.com\",\n \"fullname\": \"Jane Doe\",\n \"roleId\": \"21302ed1-0e63-44e6-bb02-8db6baa2efcd\"\n}"
response = http.request(request)
puts response.read_body{
"status": 201,
"message": "Invitation sent successfully",
"success": true,
"data": {
"userId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"email": "jane@example.com",
"fullname": "Jane Doe",
"isNewUser": false
}
}{
"status": 400,
"message": "User is already a member of this business"
}{
"status": 400,
"message": "Validation failed",
"code": "ACCOUNT_RESTRICTED",
"errors": [
{
"path": [
"amount"
],
"message": "amount must be a whole number of smallest currency units (e.g. cents)"
}
]
}Send an invitation to a new team member via email. If the user already has a Rolla account, they will be added directly. New users will receive a registration link.
When the email does not belong to an existing user, an account is created for them, the message changes, and
Example Request
curl -X POST "https://api.rolla.xyz/api/v1/external/teams/invite" \
-H "X-API-Key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"email": "jane@example.com",
"fullname": "Jane Doe",
"roleId": "21302ed1-0e63-44e6-bb02-8db6baa2efcd"
}'
Example Response
An existing Rolla user is added to the business and emailed an invitation to accept.{
"status": 201,
"message": "Invitation sent successfully",
"success": true,
"data": {
"userId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"email": "jane@example.com",
"fullname": "Jane Doe",
"isNewUser": false
}
}
data also carries the magicToken from the sign-in link they were emailed.
{
"status": 201,
"message": "User account created and added to team",
"success": true,
"data": {
"userId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"email": "jane@example.com",
"fullname": "Jane Doe",
"magicToken": "b7f1c2a4d9e84f3ba0c5d6e7f8a9b0c1",
"isNewUser": true
}
}
magicToken signs the new user in and sets their password. Treat it as a secret: do not log it or forward it to anyone but the invitee. It expires 48 hours after the invitation is sent.The
roleId is optional and defaults to the Initiator role when omitted. Use /teams/roles to get available role IDs — the assignable set is initiator, approver, and business_admin (the approver and business_admin roles can only be assigned by Business Owners and Business Admins). The roleId UUID model itself is unchanged.Authorizations
Your Rolla API key
Body
application/json
Email address of the person to invite
Example:
"jane@example.com"
Full name of the person to invite
Required string length:
1 - 100Example:
"Jane Doe"
Role to assign, from GET /teams/roles. Optional: defaults to the initiator role when omitted. A caller whose own role is initiator cannot assign business_admin.
Example:
"21302ed1-0e63-44e6-bb02-8db6baa2efcd"