Skip to content
Last updated

Invite a new user to join the organization.

POST/v1/organizations/{organization_id}/invite-user

organization_id string required

Organization ID

Request Body

email string required

Email address of the user to invite.

role_id string required

Role ID to assign to the invited user.

send_invitation boolean optional ยท Defaults to true

Whether to send invitation email.

Returns

Returns the created invitation object.

Notes

  • Creates a unique invitation link
  • Email is sent if send_invitation is true
  • Invitation expires after a set period
  • Cannot invite existing organization members

Authorization

Requires Admin or Owner role.

Bash
curl -X POST https://api.aitronos.com/v1/organizations/org_abc123/invite-user \
  -H "X-API-Key: $FREDDY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "newuser@example.com",
    "role_id": "role_abc123",
    "send_invitation": true
  }'

Response:

{
  "invitation_id": "inv_abc123",
  "email": "newuser@example.com",
  "role_id": "role_abc123",
  "user_id": "usr_xyz789",
  "invitation_link": "https://chat.aitronos.com/user/register?invite=abc123..."
}
FieldTypeDescription
invitation_idstringUnique invitation ID
emailstringInvited email address
role_idstringAssigned role ID
user_idstringCreated/existing user ID
invitation_linkstringFull URL to share with the invitee