Workspace · Invites
Creates an invite token.
Request
Send your API key as Authorization: Bearer pz_live_.... Read-only keys cannot call it. Authentication
Request body
application/json, required
scopestringrequiredOne of
all,profiles.profileIdsarray of stringrolestringOne of
admin,member,billing_admin,viewer. Defaultmember.disabledResourceGroupsarray of stringEach item: one of
publishing,engagement,messages,contacts,analytics,ads,telephony,accounts,billing,webhooks,commerce.readOnlybooleandeprecatedemailstring (email)Optional. Pozy emails the invitation to this address.
Example
curl -X POST "https://api.pozy.ai/v1/invite/tokens" \
-H "Authorization: Bearer $POZY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"scope": "all"
}'const res = await fetch("https://api.pozy.ai/v1/invite/tokens", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.POZY_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
scope: "all"
}),
});
const data = await res.json();
if (!res.ok) throw new Error(data?.error ?? `Request failed with status ${res.status}`);
console.log(data);import os
import requests
resp = requests.post(
"https://api.pozy.ai/v1/invite/tokens",
headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
json={
"scope": "all",
},
timeout=30,
)
resp.raise_for_status()
print(resp.json())Response
201 on success
tokenstringscopestringinvitedProfileIdsarray of stringdisabledResourceGroupsarray of stringexpiresAtstring (date-time)inviteUrlstring (URL)rolestringOne of
admin,member,billing_admin,viewer.emailstring (email)Can be null.
emailSentbooleanTrue when Pozy emailed the invitation. False when no email address was given or the email could not be sent: share inviteUrl yourself.
{
"token": "string",
"scope": "string",
"invitedProfileIds": [
"string"
],
"disabledResourceGroups": [
"string"
],
"expiresAt": "2026-10-02T09:00:00.000Z",
"inviteUrl": "https://pozy.ai/media/example-1.jpg",
"role": "admin",
"email": "alex@example.com",
"emailSent": true
}Errors
Errors use one shape: { error, type, code, param?, details? }. The ones you are most likely to see here:
| 400 | invalid_request_error | A parameter or body field is missing or invalid. param names it. |
| 401 | authentication_error | The API key is missing, revoked or expired. |
| 403 | permission_error | The key is read-only, scoped to other profiles, or has this resource group disabled. |
| 429 | rate_limit_error | Too many requests this minute. Wait for Retry-After seconds. |
Every code is listed in Errors.