curl --request POST \
--url https://app.thinnest.ai/api/v1/invitations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "anjali@sunrisedental.in",
"role": "member"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({email: 'anjali@sunrisedental.in', role: 'member'})
};
fetch('https://app.thinnest.ai/api/v1/invitations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.thinnest.ai/api/v1/invitations"
payload = {
"email": "anjali@sunrisedental.in",
"role": "member"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "inv_2d3f5a7c-9e1b-4d6f-8a2c-4e6a8c0e2f57",
"email": "anjali@sunrisedental.in",
"role": "member",
"status": "pending",
"expiresAt": "2026-10-20T10:40:00.000Z",
"createdAt": "2026-10-02T08:15:27.610Z"
}{
"id": "inv_2d3f5a7c-9e1b-4d6f-8a2c-4e6a8c0e2f57",
"email": "anjali@sunrisedental.in",
"role": "member",
"status": "pending",
"expiresAt": "2026-10-20T10:40:00.000Z",
"createdAt": "2026-10-06T10:40:00.000Z"
}{
"error": "`email` is required — the address to invite."
}{
"error": "Unauthorized",
"code": "unauthorized"
}{
"error": "This workspace includes 5 seats."
}{
"error": "Only an owner can invite another owner."
}{
"error": "Workspace not found.",
"code": "workspace_not_found"
}{
"error": "They are already in this workspace."
}{
"error": "This workspace was deleted on 2026-10-06 and is erased on 2026-11-05. POST /v1/customers/{id}/restore brings it back until then.",
"code": "workspace_deleted"
}{
"error": "Over 240 requests a minute. Slow down and retry.",
"code": "rate_limit_resources",
"limit": {
"name": "resources",
"perMinute": 240
}
}Create Invitation
Invites somebody to the workspace and emails them a link that works for 14 days (the email goes out just after the answer). Inviting an address that already has a pending invitation sends it again with a fresh 14 days and its new role, and answers 200 instead of 201. Every seat counts — the people in the workspace plus pending invitations. Addresses at reserved test domains (example.com, .test, …) get the invitation but no email. Needs a full key.
curl --request POST \
--url https://app.thinnest.ai/api/v1/invitations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "anjali@sunrisedental.in",
"role": "member"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({email: 'anjali@sunrisedental.in', role: 'member'})
};
fetch('https://app.thinnest.ai/api/v1/invitations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.thinnest.ai/api/v1/invitations"
payload = {
"email": "anjali@sunrisedental.in",
"role": "member"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "inv_2d3f5a7c-9e1b-4d6f-8a2c-4e6a8c0e2f57",
"email": "anjali@sunrisedental.in",
"role": "member",
"status": "pending",
"expiresAt": "2026-10-20T10:40:00.000Z",
"createdAt": "2026-10-02T08:15:27.610Z"
}{
"id": "inv_2d3f5a7c-9e1b-4d6f-8a2c-4e6a8c0e2f57",
"email": "anjali@sunrisedental.in",
"role": "member",
"status": "pending",
"expiresAt": "2026-10-20T10:40:00.000Z",
"createdAt": "2026-10-06T10:40:00.000Z"
}{
"error": "`email` is required — the address to invite."
}{
"error": "Unauthorized",
"code": "unauthorized"
}{
"error": "This workspace includes 5 seats."
}{
"error": "Only an owner can invite another owner."
}{
"error": "Workspace not found.",
"code": "workspace_not_found"
}{
"error": "They are already in this workspace."
}{
"error": "This workspace was deleted on 2026-10-06 and is erased on 2026-11-05. POST /v1/customers/{id}/restore brings it back until then.",
"code": "workspace_deleted"
}{
"error": "Over 240 requests a minute. Slow down and retry.",
"code": "rate_limit_resources",
"limit": {
"name": "resources",
"perMinute": 240
}
}Authorizations
Headers
Developers only: the customer workspace this request acts in — its org_… id from POST /customers. Leave it out to act in your own workspace. Refused with 404 (Workspace not found.) when the id is unknown, is not one of your customers, or is not an org_… id; 410 when that customer was deleted (restore it with POST /customers/{id}/restore until it is erased); 403 when the key belongs to one customer workspace (it cannot act as another); 400 when your workspace is not a developer workspace. /customers/* and GET /customers/usage are your own workspace's and refuse the header with 400: call them without it.
"org_3fKq9TzQ1mN8vB2xR7cLpA"
Body
Response
A pending invitation to this address was refreshed and sent again.