Developer API - Users
Introduction
The WorkComposer Users API allows you to manage users within your organization. Use these endpoints to create, retrieve, update, delete, activate, and deactivate users programmatically.
Users are the foundation of WorkComposer's time tracking and project management capabilities. This API is particularly useful for synchronizing user accounts with your HR systems, automating user onboarding and offboarding, and maintaining consistent user data across your organization.
Retrieve Users
This endpoint returns a list of all users in your workspace or details about a specific user if a user ID is provided. The response includes user information such as ID, name, email, team, role, and status.
API Endpoint
https://api.workcomposer.com/v1/user/Parameters
| Parameter | Required | Description |
|---|---|---|
| apiKey | Required | Your unique API Key |
| userId | Optional | Filter by specific User ID |
| teamId | Optional | Filter by specific Team ID |
| search | Optional | Search users by name or email |
| limit | Optional | Maximum number of results (default: 25, max: 100) |
| offset | Optional | Number of results to skip for pagination |
| includeInactive | Optional | Include archived/inactive users (default: false) |
Response Example
{
"status": 1,
"users": [
{
"id": "507f1f77bcf86cd799439011",
"externalId": "507f1f77bcf86cd799439011",
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com",
"teamId": "507f191e810c19729de860ea",
"teamName": "Engineering",
"role": "User",
"isActive": true,
"createdAt": "2025-12-02T10:30:00.000Z",
"lastSyncedAt": "2025-12-02T15:00:00.000Z"
}
],
"pagination": {
"total": 42,
"offset": 0,
"limit": 25,
"hasMore": true
}
}
Invite User
Recommended: This is the preferred way to add users to your workspace. Users receive an email invitation, set their own name and password, and then sign in.
This endpoint invites a new user to your workspace via email. The user will receive an invitation email with a link to accept the invitation, set their first and last name, create their password, and sign in. Only users with Admin or Owner roles can invite users. The invited user will be automatically assigned the default 'User' role.
API Endpoint
https://api.workcomposer.com/v1/user/invite/Parameters
| Parameter | Required | Description |
|---|---|---|
| apiKey | Required | Your unique API Key |
| Required | Email address of the user to invite (must be unique) | |
| teamId | Optional | Team ID to assign the user to. Defaults to the oldest team if not provided. |
Response Example
{
"status": 1,
"userId": "507f1f77bcf86cd799439011",
"message": "Invitation sent successfully"
}
How the Invitation Process Works
- You send an invitation request with the user's email address
- WorkComposer creates a pending user account and sends an invitation email
- The user clicks the invitation link in the email
- The user enters their first name, last name, and creates a password
- The user account is activated and they can sign in immediately
Create User
Note: Consider using the Invite User endpoint instead. The invitation flow allows users to set their own name and password, which is more secure and user-friendly than creating users with a password and sharing it with them.
This endpoint allows you to create a new user directly with a password in your workspace. Only users with Admin or Owner roles can create users. The user will be automatically assigned the default 'User' role. You will need to securely share the password with the user after creation.
API Endpoint
https://api.workcomposer.com/v1/user/create/Parameters
| Parameter | Required | Description |
|---|---|---|
| apiKey | Required | Your unique API Key |
| firstName | Required | User's first name |
| lastName | Required | User's last name |
| Required | User's email address (must be unique) | |
| password | Required | Password (must meet complexity requirements) |
| teamId | Optional | Team ID to assign the user to. Defaults to the oldest team if not provided. |
Response Example
{
"status": 1,
"userId": "507f1f77bcf86cd799439011",
"message": "User created successfully"
}
Update User
This endpoint allows you to update an existing user's details. Only users with Admin or Owner roles can update users. You only need to include the fields you want to update.
API Endpoint
https://api.workcomposer.com/v1/user/update/Parameters
| Parameter | Required | Description |
|---|---|---|
| apiKey | Required | Your unique API Key |
| id | Required | ID of the user to update |
| firstName | Optional | User's first name |
| lastName | Optional | User's last name |
| teamId | Optional | Team ID to assign the user to |
Response Example
{
"status": 1,
"message": "User updated successfully"
}
Delete User
This endpoint allows you to permanently delete a user from your workspace. Only users with Admin or Owner roles can delete users. Use with caution as this action cannot be undone. Note that Owner accounts cannot be deleted.
API Endpoint
https://api.workcomposer.com/v1/user/delete/Parameters
| Parameter | Required | Description |
|---|---|---|
| apiKey | Required | Your unique API Key |
| id | Required | ID of the user to delete |
Response Example
{
"status": 1,
"message": "User deleted successfully"
}
Activate User
This endpoint allows you to activate (unarchive) a deactivated user. Only users with Admin or Owner roles can activate users. Activated users will be able to log in and track time again.
API Endpoint
https://api.workcomposer.com/v1/user/activate/Parameters
| Parameter | Required | Description |
|---|---|---|
| apiKey | Required | Your unique API Key |
| id | Required | ID of the user to activate |
Response Example
{
"status": 1,
"message": "User activated successfully"
}
Deactivate User
This endpoint allows you to deactivate (archive) a user without deleting them. Only users with Admin or Owner roles can deactivate users. Deactivated users cannot log in or track time, but their historical data remains intact. Note that Owner accounts cannot be deactivated.
API Endpoint
https://api.workcomposer.com/v1/user/deactivate/Parameters
| Parameter | Required | Description |
|---|---|---|
| apiKey | Required | Your unique API Key |
| id | Required | ID of the user to deactivate |
Response Example
{
"status": 1,
"message": "User deactivated successfully"
}
Best Practices
Use deactivation instead of deletion: When employees leave, deactivate their accounts instead of deleting them to preserve historical tracking data and maintain data integrity for reports.
Ensure unique email addresses: Each user must have a unique email address. Check for existing users before creating new ones to avoid errors.
Store user IDs for reference: After creating users, store their IDs in your system for easy reference when assigning tasks, projects, or retrieving user data.
Implement proper password policies: Ensure passwords meet complexity requirements (minimum length, mixed case, numbers, special characters) when creating users.
Use pagination for large datasets: When retrieving users, use the limit and offset parameters to efficiently handle large numbers of users.
Need Help?
If you have questions about using the Users API or need assistance with implementing these endpoints in your application, our developer support team is available to help.
Contact Developer Support