API REFERENCE
Create project task
On this page
/api/projects/{projectId}/tasksAdd a task to a project. New tasks are always incomplete; set completed with the update endpoint instead.
Authentication
x-api-key in header
bearerAuth bearer
Request
curl --request POST \
--url 'https://api.recoupable.dev/api/projects/YOUR_PROJECT_ID/tasks' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"title": "Distribution portal access",
"description": "Create a read only login for your distributor dashboard and share it with us.",
"due_date": "2026-09-12",
"assignee_account_id": "0f0e6d8a-1b2c-4d3e-8f90-a1b2c3d4e5f6"
}'Replace the YOUR_ placeholders with your values. Required query parameters are included; optional parameters are listed below.
Try it
Fill in the fields, send the request from your browser, and read the live response. The curl below updates as you type.
Kept in this browser tab only and cleared when it closes.
curl --request POST \
--url 'https://api.recoupable.dev/api/projects/{projectId}/tasks' \
--header 'Content-Type: application/json' \
--data '{
"title": "Distribution portal access",
"description": "Create a read only login for your distributor dashboard and share it with us.",
"due_date": "2026-09-12",
"assignee_account_id": "0f0e6d8a-1b2c-4d3e-8f90-a1b2c3d4e5f6"
}'Parameters
Path parameters
projectIdstringrequiredThe project's UUID.
Request body required
The task to create.
application/json
titlestringrequiredminLength: 1
descriptionstringnullabledue_datestringnullableformat: date
assignee_account_idstringnullableMust be a collaborator on this project.
format: uuid
A task waiting on the client
{
"title": "Distribution portal access",
"description": "Create a read only login for your distributor dashboard and share it with us.",
"due_date": "2026-09-12",
"assignee_account_id": "0f0e6d8a-1b2c-4d3e-8f90-a1b2c3d4e5f6"
}Responses
201Task created.+
application/json
statusstringrequiredExample: "success"
taskobjectrequiredProperties for task
idstringrequiredformat: uuid
project_idstringrequiredformat: uuid
titlestringrequireddescriptionstringnullabledue_datestringnullableA calendar date with no time of day, e.g. 2026-09-12.
format: date
assignee_account_idstringnullableWho the task is waiting on. A client renders its "needs you" treatment when this matches the viewing account.
format: uuid
completed_atstringnullableNull means the task is not complete. There is no separate boolean.
format: date-time
completed_bystringnullableformat: uuid
comment_countintegerNumber of comments on this task. Present on the project read so a list can render a count without a call per task.
format: int32
created_atstringrequiredAlso the sort key: tasks come back oldest first.
format: date-time
updated_atstringformat: date-time
400Bad request — invalid path parameter or request body.+
application/json
statusstring · enumrequiredAlways error.
Values: "error"
errorstringrequiredHuman-readable error message or documented error code.
Additional properties
any
401Unauthorized — missing or invalid credentials. Missing or conflicting authentication headers return status: "error" with error. Invalid API keys, malformed Bearer headers and token-verification failures return status: "error" with message. Read the field provided by the response.+
application/json
anyOf · object 1
statusstring · enumrequiredAlways error.
Values: "error"
errorstringrequiredHuman-readable error message or documented error code.
Additional properties
any
anyOf · object 2
statusstring · enumrequiredAlways error.
Values: "error"
messagestringrequiredHuman-readable authentication error message.
Additional properties
any
404Not found — either no project or task with this id exists, or the authenticated account is not a collaborator on it. The two cases are deliberately indistinguishable so the response cannot be used to discover which project ids are real.+
application/json
statusstring · enumrequiredAlways error.
Values: "error"
errorstringrequiredHuman-readable error message or documented error code.
Additional properties
any
500Internal server error.+
application/json
statusstring · enumrequiredAlways error.
Values: "error"
errorstringrequiredHuman-readable error message or documented error code.
Additional properties
any
Full specification
Download the OpenAPI file for complete schemas, constraints, and examples.
Download projects.jsonView operation source
{
"operationId": "postProjectsByProjectIdTasks",
"summary": "Create project task",
"description": "Add a task to a project. New tasks are always incomplete; set `completed` with [the update endpoint](/api-reference/projects/task-update) instead.",
"security": [
{
"apiKeyAuth": []
},
{
"bearerAuth": []
}
],
"parameters": [
{
"name": "projectId",
"in": "path",
"required": true,
"description": "The project's UUID.",
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"requestBody": {
"description": "The task to create.",
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateProjectTaskRequest"
},
"examples": {
"needsClient": {
"summary": "A task waiting on the client",
"value": {
"title": "Distribution portal access",
"description": "Create a read only login for your distributor dashboard and share it with us.",
"due_date": "2026-09-12",
"assignee_account_id": "0f0e6d8a-1b2c-4d3e-8f90-a1b2c3d4e5f6"
}
}
}
}
}
},
"responses": {
"201": {
"description": "Task created.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProjectTaskMutationResponse"
}
}
}
},
"400": {
"description": "Bad request — invalid path parameter or request body.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized — missing or invalid credentials. Missing or conflicting authentication headers return `status: \"error\"` with `error`. Invalid API keys, malformed Bearer headers and token-verification failures return `status: \"error\"` with `message`. Read the field provided by the response.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AuthenticationError"
}
}
}
},
"404": {
"description": "Not found — either no project or task with this id exists, or the authenticated account is not a collaborator on it. The two cases are deliberately indistinguishable so the response cannot be used to discover which project ids are real.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}