Skip to main content

Users

Manage user accounts and profiles. Standard users can view profiles and update their own account. Administrative endpoints allow creating, archiving, and managing other user accounts.

All endpoints require authentication via X-API-Key header and the appropriate scope.


User Object

{
"id": "user_456",
"email": "jane@example.com",
"emails": [
{
"address": "jane@example.com",
"verified": true
}
],
"name": "Jane Smith",
"username": "janesmith",
"profile": {
"firstName": "Jane",
"lastName": "Smith",
"bio": "ML Engineer",
"timezone": "America/New_York"
},
"role": "admin",
"roles": ["admin"],
"status": "active",
"organizationId": "org_xyz",
"organization": {
"id": "org_xyz",
"name": "Acme Corp"
},
"avatarUrl": "https://cdn.strongly.ai/avatars/user_456.png",
"lastLogin": "2025-02-01T14:22:00Z",
"lastLoginAt": "2025-02-01T14:22:00Z",
"createdAt": "2024-06-15T10:30:00Z",
"updatedAt": "2025-02-01T14:22:00Z"
}

GET /api/v1/users

List all users in the organization. Returns safe fields only (sensitive data is excluded).

Scope: users:read

Query Parameters

ParameterTypeRequiredDescription
searchstringNoSearch by name, email, or username
archivedbooleanNoFilter by archived status
activebooleanNoFilter by active status
limitintegerNoNumber of results to return (default: 20)
offsetintegerNoNumber of results to skip (default: 0)
sortstringNoSort field and direction, e.g. createdAt:desc

Response 200 OK

{
"count": 25,
"limit": 20,
"offset": 0,
"users": [
{
"id": "user_456",
"email": "jane@example.com",
"name": "Jane Smith",
"username": "janesmith",
"role": "admin",
"status": "active",
"organizationId": "org_xyz",
"avatarUrl": "https://cdn.strongly.ai/avatars/user_456.png",
"lastLoginAt": "2025-02-01T14:22:00Z",
"createdAt": "2024-06-15T10:30:00Z"
}
]
}

GET /api/v1/users/me

Get the currently authenticated user's full profile, including organization information.

Scope: users:read

Response 200 OK

{
"id": "user_456",
"email": "jane@example.com",
"emails": [
{
"address": "jane@example.com",
"verified": true
}
],
"name": "Jane Smith",
"username": "janesmith",
"profile": {
"firstName": "Jane",
"lastName": "Smith",
"bio": "ML Engineer",
"timezone": "America/New_York"
},
"role": "admin",
"roles": ["admin"],
"status": "active",
"organizationId": "org_xyz",
"organization": {
"id": "org_xyz",
"name": "Acme Corp",
"plan": "enterprise",
"status": "active"
},
"avatarUrl": "https://cdn.strongly.ai/avatars/user_456.png",
"lastLoginAt": "2025-02-01T14:22:00Z",
"createdAt": "2024-06-15T10:30:00Z",
"updatedAt": "2025-02-01T14:22:00Z"
}

PUT /api/v1/users/me

Update the currently authenticated user's own profile.

Scope: users:write

Request Body

{
"name": "Jane M. Smith",
"username": "janemsmith",
"profile": {
"firstName": "Jane",
"lastName": "Smith",
"bio": "Senior ML Engineer",
"timezone": "America/Chicago"
}
}
FieldTypeRequiredDescription
namestringNoDisplay name
usernamestringNoUsername (must be unique)
profileobjectNoProfile fields (firstName, lastName, bio, timezone)

Response 200 OK

Returns the updated User object.


GET /api/v1/users/:id

Get a user by ID. Returns safe fields only (sensitive data is excluded).

Scope: users:read

Path Parameters

ParameterTypeRequiredDescription
idstringYesUser ID

Response 200 OK

{
"id": "user_789",
"email": "bob@example.com",
"name": "Bob Johnson",
"username": "bobjohnson",
"role": "user",
"status": "active",
"organizationId": "org_xyz",
"avatarUrl": "https://cdn.strongly.ai/avatars/user_789.png",
"lastLoginAt": "2025-01-30T09:15:00Z",
"createdAt": "2024-08-20T14:00:00Z"
}

POST /api/v1/users

Create a new user account. Requires administrator privileges.

Scope: users:admin

Request Body

{
"email": "newuser@example.com",
"name": "New User",
"role": "user",
"password": "SecureP@ssw0rd!"
}
FieldTypeRequiredDescription
emailstringYesUser email address (must be unique)
namestringYesDisplay name
rolestringNoUser role: user, admin (default: user)
passwordstringNoInitial password (a temporary password is generated if omitted)

Response 201 Created

{
"userId": "user_new001",
"email": "newuser@example.com",
"temporaryPassword": false
}

PUT /api/v1/users/:id

Update a user account. Requires administrator privileges.

Scope: users:admin

Path Parameters

ParameterTypeRequiredDescription
idstringYesUser ID

Request Body

{
"name": "Updated Name",
"role": "admin",
"status": "active"
}
FieldTypeRequiredDescription
namestringNoDisplay name
rolestringNoUser role: user, admin
statusstringNoAccount status: active, suspended

Response 200 OK

Returns the updated User object.


POST /api/v1/users/:id/archive

Archive a user account. Archived users cannot log in but their data is preserved. Requires administrator privileges.

Scope: users:admin

Path Parameters

ParameterTypeRequiredDescription
idstringYesUser ID

Response 200 OK

{
"message": "User archived successfully",
"userId": "user_789",
"status": "archived"
}

POST /api/v1/users/:id/reset-password

Reset a user's password. Sends a password reset email or generates a temporary password. Requires administrator privileges.

Scope: users:admin

Path Parameters

ParameterTypeRequiredDescription
idstringYesUser ID

Response 200 OK

{
"message": "Password reset initiated",
"userId": "user_789",
"resetEmailSent": true
}