Overview
Projects in Xenia group related tasks together for coordinated execution. They’re ideal for:
- Multi-step work that spans multiple assignees or locations
- Recurring work programs (daily rounds, weekly audits)
- Asset-based maintenance programs
- Role-based task distribution
Projects require the PROJECTS feature to be enabled for your workspace.
Project Types:
- User Projects: Assign tasks to specific users
- Asset Projects: Create tasks for each asset
- Role Projects: Distribute tasks based on user roles and locations
Create a Project
User-Based Project
Create a project that assigns tasks to specific users.
curl -X POST "https://api.xenia.team/api/v1/ops/workspaces/{workspaceId}/tasks" \
-H "x-client-key: YOUR_CLIENT_KEY" \
-H "x-client-secret: YOUR_CLIENT_SECRET" \
-H "workspace-id: {workspaceId}" \
-H "Content-Type: application/json" \
-d '{
"title": "Weekly Safety Rounds",
"description": "Complete weekly safety inspection at assigned locations",
"isProject": true,
"projectType": "user",
"assignees": ["user-uuid-1", "user-uuid-2", "user-uuid-3"],
"recurringTask": true,
"recurringByEvery": "weekly",
"intervalWeek": [1],
"startTime": "08:00",
"dueTime": "12:00",
"timezone": "America/New_York",
"ChecklistId": "safety-checklist-uuid",
"isChecklistRequired": true,
"notification": {
"email": true,
"push": true
}
}'
Response:
{
"status": "success",
"code": 200,
"data": {
"id": "project-uuid",
"title": "Weekly Safety Rounds",
"type": "user",
"state": "creating",
"isPaused": false,
"entityIds": ["user-uuid-1", "user-uuid-2", "user-uuid-3"],
"isSchedulesProject": true,
"recurringByEvery": "weekly",
"CreatedBy": "creator-uuid",
"createdAt": "2024-12-20T10:00:00Z"
},
"message": "We are setting up your project, Please check back shortly"
}
Project creation is asynchronous. The state will be creating initially and transition to ready once all schedules are generated.
Asset-Based Project
Create a project that generates tasks for each specified asset.
curl -X POST "https://api.xenia.team/api/v1/ops/workspaces/{workspaceId}/tasks" \
-H "x-client-key: YOUR_CLIENT_KEY" \
-H "x-client-secret: YOUR_CLIENT_SECRET" \
-H "workspace-id: {workspaceId}" \
-H "Content-Type: application/json" \
-d '{
"title": "Monthly HVAC Maintenance",
"description": "Perform monthly preventive maintenance on HVAC units",
"isProject": true,
"projectType": "asset",
"assets": ["hvac-uuid-1", "hvac-uuid-2", "hvac-uuid-3"],
"recurringTask": true,
"recurringByEvery": "monthly",
"recurringOnDay": 1,
"startTime": "08:00",
"dueTime": "17:00",
"timezone": "America/New_York",
"ChecklistId": "hvac-maintenance-checklist-uuid",
"isChecklistRequired": true
}'
Role-Based Project
Create a project that distributes tasks based on user roles.
curl -X POST "https://api.xenia.team/api/v1/ops/workspaces/{workspaceId}/tasks" \
-H "x-client-key: YOUR_CLIENT_KEY" \
-H "x-client-secret: YOUR_CLIENT_SECRET" \
-H "workspace-id: {workspaceId}" \
-H "Content-Type: application/json" \
-d '{
"title": "Daily Opening Checklist",
"description": "Complete opening procedures",
"isProject": true,
"projectType": "role",
"assigneesRoles": {
"creationType": "CREATE_TASKS_BY_LOCATION",
"roles": ["shift-supervisor-role-uuid"]
},
"recurringTask": true,
"recurringByEvery": "daily",
"startTime": "06:00",
"dueTime": "08:00",
"timezone": "America/New_York",
"ChecklistId": "opening-checklist-uuid",
"isChecklistRequired": true
}'
Role Assignment Types:
| Type | Description |
|---|
CREATE_SEPARATE_TASK_USER_WISE | One task per user with the role |
CREATE_TASKS_BY_LOCATION | One task per location with users having the role |
List Projects
Get All Projects
curl -X GET "https://api.xenia.team/api/v1/ops/workspaces/{workspaceId}/projects?detailed=true" \
-H "x-client-key: YOUR_CLIENT_KEY" \
-H "x-client-secret: YOUR_CLIENT_SECRET" \
-H "workspace-id: {workspaceId}"
Query Parameters:
| Parameter | Type | Description |
|---|
detailed | boolean | Include analytics and statistics |
all | boolean | Include all projects (bypass user filtering) |
List Projects with Filters
curl -X POST "https://api.xenia.team/api/v1/ops/workspaces/{workspaceId}/projects" \
-H "x-client-key: YOUR_CLIENT_KEY" \
-H "x-client-secret: YOUR_CLIENT_SECRET" \
-H "workspace-id: {workspaceId}" \
-H "Content-Type: application/json" \
-d '{
"offset": 0,
"limit": 20,
"searchText": "safety",
"sortField": "createdAt",
"sortOrder": "DESC",
"status": "ACTIVE"
}'
Request Body:
| Field | Type | Description |
|---|
offset | number | Pagination offset (default: 0) |
limit | number | Items per page (default: 10) |
searchText | string | Search in title/description |
sortField | string | Field to sort by (default: createdAt) |
sortOrder | string | ASC or DESC (default: DESC) |
status | string | ALL, ACTIVE, PAUSED, EXPIRED |
advanceFilters | object | Additional filter criteria |
Response:
{
"status": "success",
"code": 200,
"data": {
"projects": [
{
"id": "project-uuid",
"title": "Weekly Safety Rounds",
"type": "user",
"state": "ready",
"isPaused": false,
"recurringByEvery": "weekly",
"entityIds": ["user-uuid-1", "user-uuid-2"],
"statistics": {
"totalSchedules": 3,
"activeSchedules": 3,
"completedTasks": 45,
"overdueCount": 2,
"completionRate": 95.7
},
"nextInstanceDate": "2024-12-23T08:00:00Z",
"createdAt": "2024-12-01T10:00:00Z"
}
],
"meta": {
"total": 8,
"offset": 0,
"limit": 20
}
}
}
Get Project Details
curl -X GET "https://api.xenia.team/api/v1/ops/workspaces/{workspaceId}/projects/{projectId}" \
-H "x-client-key: YOUR_CLIENT_KEY" \
-H "x-client-secret: YOUR_CLIENT_SECRET" \
-H "workspace-id: {workspaceId}"
Response:
{
"status": "success",
"code": 200,
"data": {
"id": "project-uuid",
"title": "Weekly Safety Rounds",
"description": "Complete weekly safety inspection at assigned locations",
"type": "user",
"state": "ready",
"isPaused": false,
"entityIds": ["user-uuid-1", "user-uuid-2", "user-uuid-3"],
"recurringTask": true,
"recurringByEvery": "weekly",
"intervalWeek": [1],
"startTime": "08:00",
"dueTime": "12:00",
"timezone": "America/New_York",
"Checklist": {
"id": "checklist-uuid",
"title": "Safety Inspection Checklist"
},
"isChecklistRequired": true,
"isEditable": true,
"NextTask": {
"id": "next-task-uuid",
"startDate": "2024-12-23T08:00:00Z"
},
"ActiveTask": null,
"statistics": {
"totalSchedules": 3,
"activeSchedules": 3,
"totalTasks": 48,
"completedTasks": 45,
"missedTasks": 3,
"completionRate": 93.75
},
"CreatedBy": {
"id": "creator-uuid",
"fullName": "Admin User"
},
"createdAt": "2024-12-01T10:00:00Z",
"updatedAt": "2024-12-20T15:00:00Z"
}
}
Get Active Tasks
Get currently active tasks for a project.
curl -X GET "https://api.xenia.team/api/v1/ops/workspaces/{workspaceId}/projects/{projectId}/active/tasks" \
-H "x-client-key: YOUR_CLIENT_KEY" \
-H "x-client-secret: YOUR_CLIENT_SECRET" \
-H "workspace-id: {workspaceId}"
Response:
{
"status": "success",
"code": 200,
"data": {
"project": {
"id": "project-uuid",
"title": "Weekly Safety Rounds"
},
"activeTasks": [
{
"id": "task-uuid-1",
"taskNumber": "T-2024-001250",
"taskStatus": "In Progress",
"Assignee": {
"id": "user-uuid-1",
"fullName": "John Smith"
},
"startDate": "2024-12-20T08:00:00Z",
"dueDate": "2024-12-20T12:00:00Z"
},
{
"id": "task-uuid-2",
"taskNumber": "T-2024-001251",
"taskStatus": "Open",
"Assignee": {
"id": "user-uuid-2",
"fullName": "Jane Doe"
},
"startDate": "2024-12-20T08:00:00Z",
"dueDate": "2024-12-20T12:00:00Z"
}
]
}
}
Edit Project
Update project configuration. Changes apply to future task instances.
curl -X PATCH "https://api.xenia.team/api/v1/ops/workspaces/{workspaceId}/projects/{projectId}/edit" \
-H "x-client-key: YOUR_CLIENT_KEY" \
-H "x-client-secret: YOUR_CLIENT_SECRET" \
-H "workspace-id: {workspaceId}" \
-H "Content-Type: application/json" \
-d '{
"title": "Updated Weekly Safety Rounds",
"description": "Updated description",
"dueTime": "14:00",
"priority": "High",
"notification": {
"email": true,
"push": true,
"sms": false
}
}'
Editable Fields:
title, description, additionalDescription
startTime, dueTime
priority
notification
assignees (for user projects)
ChecklistId, isChecklistRequired
endDate
You cannot change the recurrence pattern (recurringByEvery, intervalWeek) or project type after creation.
Manage Project State
Pause Project
Temporarily stop generating new task instances.
curl -X GET "https://api.xenia.team/api/v1/ops/workspaces/{workspaceId}/projects/{projectId}/toggle-pause" \
-H "x-client-key: YOUR_CLIENT_KEY" \
-H "x-client-secret: YOUR_CLIENT_SECRET" \
-H "workspace-id: {workspaceId}"
Response (Paused):
{
"status": "success",
"code": 200,
"data": {
"id": "project-uuid",
"isPaused": true
},
"message": "Project has been paused"
}
Resume Project
curl -X GET "https://api.xenia.team/api/v1/ops/workspaces/{workspaceId}/projects/{projectId}/toggle-pause" \
-H "x-client-key: YOUR_CLIENT_KEY" \
-H "x-client-secret: YOUR_CLIENT_SECRET" \
-H "workspace-id: {workspaceId}"
Response (Resumed):
{
"status": "success",
"code": 200,
"data": {
"id": "project-uuid",
"isPaused": false
},
"message": "Project has been resumed"
}
This endpoint toggles the pause state. Call once to pause, call again to resume.
End Project
Permanently stop the project. No new tasks will be generated.
curl -X PUT "https://api.xenia.team/api/v1/ops/workspaces/{workspaceId}/projects/{projectId}/end" \
-H "x-client-key: YOUR_CLIENT_KEY" \
-H "x-client-secret: YOUR_CLIENT_SECRET" \
-H "workspace-id: {workspaceId}"
Response:
{
"status": "success",
"code": 200,
"data": null
}
Ending a project is permanent. All schedules are ended and no new tasks will be created. Existing tasks remain.
Add Schedule to Project
Add a new entity (user, asset, or location) to an existing project.
curl -X POST "https://api.xenia.team/api/v1/ops/workspaces/{workspaceId}/projects/{projectId}/add-schedule" \
-H "x-client-key: YOUR_CLIENT_KEY" \
-H "x-client-secret: YOUR_CLIENT_SECRET" \
-H "workspace-id: {workspaceId}" \
-H "Content-Type: application/json" \
-d '{
"entityId": "new-user-uuid"
}'
Request Body:
| Field | Type | Description |
|---|
entityId | string | User ID (for user projects), Asset ID (for asset projects), or Location ID (for role projects) |
Response:
{
"status": "success",
"code": 200,
"data": {},
"message": "Project is updating, Check back shortly"
}
Project Access Control
Manage who can view and manage a project.
Set Project Access
curl -X PUT "https://api.xenia.team/api/v1/ops/workspaces/{workspaceId}/projects/{projectId}/access" \
-H "x-client-key: YOUR_CLIENT_KEY" \
-H "x-client-secret: YOUR_CLIENT_SECRET" \
-H "workspace-id: {workspaceId}" \
-H "Content-Type: application/json" \
-d '{
"access": ["user-uuid-1", "user-uuid-2", "role-uuid", "team-uuid"]
}'
Request Body:
| Field | Type | Description |
|---|
access | string[] | Array of user, role, or team IDs to grant access |
This replaces the entire access list. Include all entities that should have access.
Project Analytics
Get Task Analytics
curl -X POST "https://api.xenia.team/api/v1/ops/workspaces/{workspaceId}/projects/{projectId}/tasks/analytics" \
-H "x-client-key: YOUR_CLIENT_KEY" \
-H "x-client-secret: YOUR_CLIENT_SECRET" \
-H "workspace-id: {workspaceId}" \
-H "Content-Type: application/json" \
-d '{}'
Response:
{
"status": "success",
"code": 200,
"data": {
"totalTasks": 96,
"completedTasks": 90,
"missedTasks": 4,
"inProgressTasks": 2,
"completionRate": 93.75,
"averageCompletionTime": "2.5 hours",
"byAssignee": [
{
"assignee": "John Smith",
"completed": 30,
"missed": 2,
"completionRate": 93.75
},
{
"assignee": "Jane Doe",
"completed": 32,
"missed": 0,
"completionRate": 100
}
]
}
}
Get Schedule Analytics
curl -X POST "https://api.xenia.team/api/v1/ops/workspaces/{workspaceId}/projects/{projectId}/schedules/analytics" \
-H "x-client-key: YOUR_CLIENT_KEY" \
-H "x-client-secret: YOUR_CLIENT_SECRET" \
-H "workspace-id: {workspaceId}" \
-H "Content-Type: application/json" \
-d '{}'
Response:
{
"status": "success",
"code": 200,
"data": {
"totalSchedules": 3,
"activeSchedules": 3,
"pausedSchedules": 0,
"endedSchedules": 0,
"schedules": [
{
"id": "schedule-uuid-1",
"assignee": "John Smith",
"status": "active",
"instancesGenerated": 16,
"nextInstance": "2024-12-23T08:00:00Z"
},
{
"id": "schedule-uuid-2",
"assignee": "Jane Doe",
"status": "active",
"instancesGenerated": 16,
"nextInstance": "2024-12-23T08:00:00Z"
}
]
}
}
Delete Project
curl -X DELETE "https://api.xenia.team/api/v1/ops/workspaces/{workspaceId}/projects/{projectId}" \
-H "x-client-key: YOUR_CLIENT_KEY" \
-H "x-client-secret: YOUR_CLIENT_SECRET" \
-H "workspace-id: {workspaceId}"
Response:
{
"status": "success",
"code": 200,
"message": "Project has been deleted"
}
Deleting a project removes all associated schedules and tasks. This cannot be undone.
Project States
| State | Description |
|---|
creating | Project is being set up, schedules generating |
ready | Project is active and operational |
updating | Project is being modified |
expired | Project has ended |
Common Workflows
Multi-Location Inspection Program
Asset Maintenance Program
#!/bin/bash
# Create asset maintenance project
WORKSPACE_ID="your-workspace-uuid"
# Get all HVAC assets
ASSETS=$(curl -s -X POST "https://api.xenia.team/api/v1/mgt/workspaces/${WORKSPACE_ID}/assets" \
-H "x-client-key: YOUR_KEY" \
-H "x-client-secret: YOUR_SECRET" \
-H "workspace-id: ${WORKSPACE_ID}" \
-H "Content-Type: application/json" \
-d '{"type": "hvac"}' | jq -r '[.data[].id]')
# Create maintenance project for all HVAC units
curl -X POST "https://api.xenia.team/api/v1/ops/workspaces/${WORKSPACE_ID}/tasks" \
-H "x-client-key: YOUR_KEY" \
-H "x-client-secret: YOUR_SECRET" \
-H "workspace-id: ${WORKSPACE_ID}" \
-H "Content-Type: application/json" \
-d "{
\"title\": \"Quarterly HVAC Maintenance\",
\"description\": \"Preventive maintenance for HVAC units\",
\"isProject\": true,
\"projectType\": \"asset\",
\"assets\": ${ASSETS},
\"recurringTask\": true,
\"recurringByEvery\": \"quarterly\",
\"recurringOnDay\": 1,
\"timezone\": \"America/New_York\",
\"ChecklistId\": \"hvac-checklist-uuid\",
\"isChecklistRequired\": true
}"
Best Practices
Choose the right project type
- User projects: When you know specific individuals who should do the work
- Asset projects: For equipment-based maintenance programs
- Role projects: For location-based work where any user with the role can complete it
Attach checklists for consistency
Require checklist completion (isChecklistRequired: true) to ensure standardized data collection across all project tasks.
Regularly check project analytics. Low completion rates may indicate staffing issues, unrealistic schedules, or training needs.
Use pause for temporary stops
If a project needs to be temporarily halted (holiday season, construction period), use pause instead of ending it.
Add schedules incrementally
When new users, assets, or locations need to be included, use the add-schedule endpoint rather than recreating the project.
Configure project access so only relevant managers and supervisors can view and manage the project.
Permissions
| Action | Required Permission |
|---|
| Create project | CAN_MANAGE_TASKS |
| View projects | — (access controlled) |
| Edit project | CAN_EDIT_PROJECT |
| Pause/Resume | CAN_PAUSE_RESUME_PROJECT |
| Delete project | CAN_DELETE_PROJECT |
| Manage access | CAN_EDIT_PROJECT |