Invite a user
Invite someone to the sub-account. Sends an invitation email that is valid for 7 days. Inviting an email that already has an invitation here refreshes that invitation (new link, new 7-day expiry, new role) and emails it again.
POST
https://api.centerfy.ai/webhooks/inbound/users/invite Headers
| Header | Required | Value | Description |
|---|---|---|---|
x-api-key | Yes | your sub-account API key (cfy_…) | Authenticates the request; or use Authorization: Bearer <key>. |
Body parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
email | string | Yes | — | Email to invite; max 320 characters. Stored lowercased. |
role | string | Yes | — | Role granted on acceptance. One of sub_account_owner, sub_account_admin, sub_account_user, sub_account_read_only. |
first_name | string | No | — | Invitee’s first name; max 100 characters. |
last_name | string | No | — | Invitee’s last name; max 100 characters. |
Request body
{
"email": "[email protected]",
"role": "sub_account_user",
"first_name": "Jamie",
"last_name": "Rivera"
}Example
curl -X POST "https://api.centerfy.ai/webhooks/inbound/users/invite" \
-H "x-api-key: $CENTERFY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]",
"role": "sub_account_user",
"first_name": "Jamie",
"last_name": "Rivera"
}' import { CenterfyClient } from "@centerfy/sdk";
const centerfy = new CenterfyClient({ apiKey: process.env.CENTERFY_API_KEY! });
const result = await centerfy.users.invite({
"email": "[email protected]",
"role": "sub_account_user",
"first_name": "Jamie",
"last_name": "Rivera"
});
console.log(result); centerfy users invite '{"email":"[email protected]","role":"sub_account_user","first_name":"Jamie","last_name":"Rivera"}' MCP tool: centerfy_users_invite (see MCP server)
Response
{
"status": "success",
"invitation": {
"id": "5a1e2b3c-4d5e-4f60-8a7b-9c0d1e2f3a4b",
"email": "[email protected]",
"role": "sub_account_user",
"first_name": "Jamie",
"last_name": "Rivera",
"status": "pending",
"expires_at": "2026-10-13T10:00:00.000Z",
"accepted_at": null,
"created_at": "2026-10-06T10:00:00.000Z"
},
"resent": false
}Errors
400— if email is not a valid address or role is invalid.403— with current_users and max_users when the sub-account’s user limit is reached.409— with user_id if the email already belongs to an active member; 409 if the API key has no owning user.502— with invitation if the invitation was saved but the email could not be sent — retry with Resend an invitation.
Notes
Returns 201; resent is true when an earlier invitation for the email was refreshed. The invitation link token is never returned.