Aryna

Aryna API Documentation

Version 1.0

Dashboard

Users API

Invite and manage users in your organization. Control access with roles and monitor user status.

POST

/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:write

Request Body

FieldTypeRequiredDescription
emailstringEmail address of the user to invite
namestringFull name of the user
rolestringRole: 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"
  }
}
GET

/users/:id

Retrieve details of a specific user in your organization by their user ID.

Required Scope

users:read

Path Parameters

id

User 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"
}
PATCH

/users/:id

Update specific fields of a user in your organization. Only the fields provided will be updated (partial update).

Required Scope

users:write

Path Parameters

id

User ID (UUID)

The unique identifier for the user

Request Body (all optional)

FieldTypeDescription
full_namestringUser's full name
rolestringUser role: admin or member
statusstringUser 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/invite

User Deactivation

Mark users as inactive when they leave your organization without deleting their data.

PATCH /users/:id

Role Management

Promote users to admin or change their permissions as needed.

PATCH /users/:id

User Directory Sync

Keep user information synchronized with your HR system or directory service.

GET /users/:id

Try it in the Interactive Docs

Test these endpoints directly in your browser with our interactive OpenAPI documentation.

Open Interactive API Docs