Build integrations with the ThisWeek API. Create tasks, manage workspaces, and automate workflows.
https://thisweek.is/api
The API uses Bearer token authentication. You can create personal API tokens from your profile settings.
Include your token in the Authorization header:
Authorization: Bearer YOUR_API_TOKENcurl -X GET "https://thisweek.is/api/workspaces" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"Treat your API token like a password. Don't share it or commit it to version control. If a token is compromised, revoke it immediately from your profile settings.
Follow these steps to create your first task via the API:
curl -X GET "https://thisweek.is/api/workspaces" \
-H "Authorization: Bearer YOUR_API_TOKEN"curl -X GET "https://thisweek.is/api/workspaces/1/spaces" \
-H "Authorization: Bearer YOUR_API_TOKEN"curl -X GET "https://thisweek.is/api/workspaces/1/spaces/1/projects" \
-H "Authorization: Bearer YOUR_API_TOKEN"curl -X POST "https://thisweek.is/api/workspaces/1/spaces/1/projects/1/tasks" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"task": {
"title": "My first API task",
"description": "Created via the API",
"status": "not_started",
"priority": 2
}
}'Workspaces are the top-level containers for organizing your work.
/api/workspaces
List all workspaces you have access to
{
"workspaces": [
{
"id": 1,
"name": "Main Workspace",
"description": null,
"status": "active",
"spaces": []
}
]
}Spaces are containers within workspaces for related projects and tasks.
/api/workspaces/:workspace_id/spaces
List all spaces in a workspace
{
"spaces": [
{
"id": 1,
"name": "Product Development",
"description": "Main product work",
"status": "active",
"workspace_id": 1,
"board_name": "Tasks"
}
]
}Projects group related tasks within a space.
Every project response includes:
id, name, description, color, position, space_idtask_count — total taskscompletion_percentage — % of tasks donetask_counts_by_status — object of status key → countall_tasks_done — true if all tasks are done/api/workspaces/:workspace_id/spaces/:space_id/projects
List all projects in a space
/api/workspaces/:workspace_id/spaces/:space_id/projects
Create a new project
{
"project": {
"name": "Q1 Goals",
"description": "First quarter objectives",
"color": "#3B82F6",
"position": 0
}
}/api/workspaces/:workspace_id/spaces/:space_id/projects/:id
Update a project
/api/workspaces/:workspace_id/spaces/:space_id/projects/:id
Delete a project and all its tasks
Tasks are the core work items in ThisWeek.
Every task response includes core and computed fields:
id, title, description, status, priority, due_date, position, project_id, space_id, custom_fieldsassignees — array of { id, email, name, avatar }status_display, priority_display, project_name, project_color, due_date_formattedoverdue, due_today, completed, in_progress, blocked, archived, trashedcreated_at, updated_at (ISO 8601)not_started
working_on_it
stuck
done
0
1
2
3
/api/workspaces/:workspace_id/spaces/:space_id/tasks
List all tasks in a space
status — Filter by statuspriority — Filter by priority levelproject_id — Filter by project/api/.../projects/:project_id/tasks
Create a new task
{
"task": {
"title": "Implement new feature",
"description": "Add the checkout flow",
"status": "not_started",
"priority": 2,
"due_date": "2025-02-15"
}
}/api/.../tasks/:id
Update a task
/api/.../tasks/:id/move_to_project
Move a task to a different project
{ "target_project_id": 5 }/api/.../tasks/:id/toggle_status
Toggle task between done and not_started
/api/.../tasks/:id
Move task to trash (recoverable for 30 days)
Tasks can have multiple assignees. Each item has id, email, name, and avatar.
/api/.../tasks/assignable_users
List users who can be assigned (owner + accepted collaborators)
/api/.../tasks/:id/assign_user
Assign a user. Body: { "user_id": 123 }
/api/.../tasks/:id/unassign_user?user_id=123
Unassign a user from the task
Track numeric values on tasks such as sale amounts, hours, or percentages. Define field types at the space level, then set values on individual tasks.
number
currency
hours
percentage
Field definitions are created at the space level and apply to all tasks within that space.
/api/.../task_custom_field_definitions
List all custom field definitions for a space
{
"field_definitions": [
{
"id": 1,
"name": "Sale Amount",
"field_type": "currency",
"prefix": "£",
"suffix": "",
"show_sum": true,
"position": 0
}
]
}/api/.../task_custom_field_definitions
Create a new custom field definition
{
"field_definition": {
"name": "Sale Amount",
"field_type": "currency",
"prefix": "£",
"suffix": "",
"show_sum": true
}
}/api/.../task_custom_field_definitions/:id
Get a single custom field definition
/api/.../task_custom_field_definitions/:id
Update a custom field definition
/api/.../task_custom_field_definitions/:id
Delete a custom field definition (removes all values from tasks)
/api/.../task_custom_field_definitions/reorder
Reorder custom field definitions
{ "field_ids": [3, 1, 2] }Include the custom_fields object with field definition IDs as keys.
{
"task": {
"title": "Close enterprise deal",
"custom_fields": {
"1": { "value": 25000.00, "label": "Sale Amount", "prefix": "£" },
"2": { "value": 40, "label": "Hours Estimated", "suffix": " hrs" }
}
}
}When retrieving tasks, the custom_fields object is included with current values for each defined field.
Set a field to null to clear it: "custom_fields": { "1": null }
The API uses standard HTTP status codes to indicate success or failure.
| Code | Meaning |
|---|---|
| 200 | Success |
| 201 | Created successfully |
| 401 | Unauthorized — Invalid or missing token |
| 403 | Forbidden — No permission to access this resource |
| 404 | Not found — Resource doesn't exist or no access |
| 422 | Validation error — Check the error message for details |
| 500 | Server error — Please try again or contact support |
{
"error": "Workspace not found"
}
// Validation errors:
{
"errors": {
"title": ["can't be blank"],
"status": ["is not a valid status"]
}
}Create an API token and start building your integration.
Sign in to get started