Create Onboarding Invite
curl --request POST \
--url https://composer.personal.ai/lab/api/v1/op/onboarding.invite \
--header 'Content-Type: <content-type>' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"onboarding": "<string>",
"label": "<string>",
"hours": 123,
"session_hours": 123,
"max_sessions": 123,
"known": {}
}
'import requests
url = "https://composer.personal.ai/lab/api/v1/op/onboarding.invite"
payload = {
"onboarding": "<string>",
"label": "<string>",
"hours": 123,
"session_hours": 123,
"max_sessions": 123,
"known": {}
}
headers = {
"x-api-key": "<x-api-key>",
"Content-Type": "<content-type>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<x-api-key>', 'Content-Type': '<content-type>'},
body: JSON.stringify({
onboarding: '<string>',
label: '<string>',
hours: 123,
session_hours: 123,
max_sessions: 123,
known: {}
})
};
fetch('https://composer.personal.ai/lab/api/v1/op/onboarding.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://composer.personal.ai/lab/api/v1/op/onboarding.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([
'onboarding' => '<string>',
'label' => '<string>',
'hours' => 123,
'session_hours' => 123,
'max_sessions' => 123,
'known' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: <content-type>",
"x-api-key: <x-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://composer.personal.ai/lab/api/v1/op/onboarding.invite"
payload := strings.NewReader("{\n \"onboarding\": \"<string>\",\n \"label\": \"<string>\",\n \"hours\": 123,\n \"session_hours\": 123,\n \"max_sessions\": 123,\n \"known\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("Content-Type", "<content-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://composer.personal.ai/lab/api/v1/op/onboarding.invite")
.header("x-api-key", "<x-api-key>")
.header("Content-Type", "<content-type>")
.body("{\n \"onboarding\": \"<string>\",\n \"label\": \"<string>\",\n \"hours\": 123,\n \"session_hours\": 123,\n \"max_sessions\": 123,\n \"known\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://composer.personal.ai/lab/api/v1/op/onboarding.invite")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"onboarding\": \"<string>\",\n \"label\": \"<string>\",\n \"hours\": 123,\n \"session_hours\": 123,\n \"max_sessions\": 123,\n \"known\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"url": "<string>",
"qr_svg": "<string>",
"qr_payload": "<string>",
"expires_at": "<string>"
}Onboarding APIs
Create Onboarding Invite
Create a QR code anyone can scan to start setup
POST
/
lab
/
api
/
v1
/
op
/
onboarding.invite
Create Onboarding Invite
curl --request POST \
--url https://composer.personal.ai/lab/api/v1/op/onboarding.invite \
--header 'Content-Type: <content-type>' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"onboarding": "<string>",
"label": "<string>",
"hours": 123,
"session_hours": 123,
"max_sessions": 123,
"known": {}
}
'import requests
url = "https://composer.personal.ai/lab/api/v1/op/onboarding.invite"
payload = {
"onboarding": "<string>",
"label": "<string>",
"hours": 123,
"session_hours": 123,
"max_sessions": 123,
"known": {}
}
headers = {
"x-api-key": "<x-api-key>",
"Content-Type": "<content-type>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<x-api-key>', 'Content-Type': '<content-type>'},
body: JSON.stringify({
onboarding: '<string>',
label: '<string>',
hours: 123,
session_hours: 123,
max_sessions: 123,
known: {}
})
};
fetch('https://composer.personal.ai/lab/api/v1/op/onboarding.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://composer.personal.ai/lab/api/v1/op/onboarding.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([
'onboarding' => '<string>',
'label' => '<string>',
'hours' => 123,
'session_hours' => 123,
'max_sessions' => 123,
'known' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: <content-type>",
"x-api-key: <x-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://composer.personal.ai/lab/api/v1/op/onboarding.invite"
payload := strings.NewReader("{\n \"onboarding\": \"<string>\",\n \"label\": \"<string>\",\n \"hours\": 123,\n \"session_hours\": 123,\n \"max_sessions\": 123,\n \"known\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("Content-Type", "<content-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://composer.personal.ai/lab/api/v1/op/onboarding.invite")
.header("x-api-key", "<x-api-key>")
.header("Content-Type", "<content-type>")
.body("{\n \"onboarding\": \"<string>\",\n \"label\": \"<string>\",\n \"hours\": 123,\n \"session_hours\": 123,\n \"max_sessions\": 123,\n \"known\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://composer.personal.ai/lab/api/v1/op/onboarding.invite")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"onboarding\": \"<string>\",\n \"label\": \"<string>\",\n \"hours\": 123,\n \"session_hours\": 123,\n \"max_sessions\": 123,\n \"known\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"url": "<string>",
"qr_svg": "<string>",
"qr_payload": "<string>",
"expires_at": "<string>"
}Overview
Creates an invite to a live onboarding, ready to print as a QR code. Every person who opens it gets their own private setup conversation.Requires an admin key.
onboarding.invite.
Authorization
Headers
Body
Example Request
{
"onboarding": "New customer",
"label": "front desk poster"
}
Response
Example Success Response
{
"id": "4d5e6f70-8192-4a3b-b4c5-d6e7f8091a2b",
"onboarding": "New customer",
"url": "https://composer.personal.ai/onboard/i/XyZ789...",
"path": "/onboard/i/XyZ789...",
"qr_payload": "https://composer.personal.ai/onboard/i/XyZ789...",
"qr_svg": "<svg ...>",
"label": "front desk poster",
"expires_at": "2026-12-30T12:00:00Z",
"max_sessions": null,
"session_hours": 72
}
Example cURL
cURL
curl --request POST 'https://composer.personal.ai/lab/api/v1/op/onboarding.invite' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <your-api-key>' \
--data '{"onboarding": "New customer", "label": "front desk poster"}'
Error Codes
| Code | Description |
|---|---|
| 400 | The body doesn’t match the fields above, or the operation failed. The response body says why. |
| 401 | Missing or invalid API key |
| 403 | This key isn’t allowed to call this operation (it needs an admin key) |