Invite a user to an organization with role and department assignments in a single call.
Invites a user to the specified organization. If the user already exists globally (by email), they are added to the organization. If not, a new user account is created. You can assign roles and departments in the same request.
organization_id string required
The unique identifier of the organization (format: org_*).
email string required
The email address of the user to invite.
full_name string optional
The full name of the user. Max 255 characters.
role_ids array of strings optional · Defaults to []
List of role IDs to assign to the user (format: role_*).
department_ids array of strings optional · Defaults to []
List of department IDs to assign the user to (format: dept_*).
send_invitation boolean optional · Defaults to true
Whether to send an invitation email to the user.
custom_message string optional
Custom message to include in the invitation email.
The user object with their role and department assignments, with a 201 Created status code.
- Bash
- Python
- Python
- JavaScript
curl -X POST https://api.aitronos.com/v1/organizations/org_xyz789/users/invite/v2 \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"email": "jane@example.com",
"full_name": "Jane Doe",
"role_ids": ["role_abc123"],
"department_ids": ["dept_eng001"],
"send_invitation": true
}'