Users API
Invite and manage users in your organization. Control access with roles and monitor user status.
/users/invite
Send an invitation to a new user to join your organization. The user will receive an email with a link to accept the invitation and create their account.
Required Scope
users:writeRequest Body
| Field | Type | Required | Description |
|---|---|---|---|
| string | ✓ | Email address of the user to invite | |
| name | string | ✓ | Full name of the user |
| role | string | ✓ | Role: admin or member |
Example Request
cURL
curl -X POST https://api.aryna.ai/v1/users/invite \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "john.doe@example.com",
"name": "John Doe",
"role": "member"
}'Response
201 Created
application/json{
"success": true,
"message": "Invitation sent successfully",
"invitation": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"email": "john.doe@example.com",
"name": "John Doe",
"role": "member",
"status": "pending",
"expires_at": "2024-11-18T10:00:00.000Z",
"invite_url": "https://app.aryna.ai/invitations/TOKEN"
}
}/users/:id
Retrieve details of a specific user in your organization by their user ID.
Required Scope
users:readPath Parameters
idUser ID (UUID)
The unique identifier for the user
Example Request
cURL
curl https://api.aryna.ai/v1/users/550e8400-e29b-41d4-a716-446655440000 \ -H "Authorization: Bearer YOUR_API_KEY"
Response
200 OK
application/json{
"id": "550e8400-e29b-41d4-a716-446655440000",
"email": "john.doe@example.com",
"full_name": "John Doe",
"role": "member",
"status": "active",
"created_at": "2024-11-10T12:00:00.000Z",
"updated_at": "2024-11-10T12:00:00.000Z"
}/users/:id
Update specific fields of a user in your organization. Only the fields provided will be updated (partial update).
Required Scope
users:writePath Parameters
idUser ID (UUID)
The unique identifier for the user
Request Body (all optional)
| Field | Type | Description |
|---|---|---|
| full_name | string | User's full name |
| role | string | User role: admin or member |
| status | string | User status: active or inactive |
Example Request
cURL
curl -X PATCH https://api.aryna.ai/v1/users/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"status": "inactive"
}'Response
200 OK
application/json{
"id": "550e8400-e29b-41d4-a716-446655440000",
"email": "john.doe@example.com",
"full_name": "John Doe",
"role": "member",
"status": "inactive",
"created_at": "2024-11-10T12:00:00.000Z",
"updated_at": "2024-11-11T12:00:00.000Z"
}Common Use Cases
Bulk User Invites
Automate onboarding by programmatically inviting multiple users at once.
POST /users/inviteUser Deactivation
Mark users as inactive when they leave your organization without deleting their data.
PATCH /users/:idRole Management
Promote users to admin or change their permissions as needed.
PATCH /users/:idUser Directory Sync
Keep user information synchronized with your HR system or directory service.
GET /users/:idTry it in the Interactive Docs
Test these endpoints directly in your browser with our interactive OpenAPI documentation.
Open Interactive API Docs