curl --request PATCH \
--url https://api.recoupable.dev/api/projects/{projectId}/tasks/{taskId} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"completed": true
}
'{
"status": "success",
"task": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"due_date": "2023-12-25",
"assignee_account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"completed_at": "2023-11-07T05:31:56Z",
"completed_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"comment_count": 123,
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"status": "error",
"error": "<string>",
"message": "<string>"
}{
"status": "error",
"error": "<string>",
"message": "<string>"
}{
"status": "error",
"error": "<string>",
"message": "<string>"
}{
"status": "error",
"error": "<string>",
"message": "<string>"
}Projects
Update Project Task
Update a task. Send only the fields that change.
Completion is toggled with the completed boolean rather than by writing a timestamp: the server stamps completed_at and records completed_by from the authenticated account, so it is never ambiguous who closed an item. Any collaborator may toggle any task, including the client.
PATCH
/
api
/
projects
/
{projectId}
/
tasks
/
{taskId}
curl --request PATCH \
--url https://api.recoupable.dev/api/projects/{projectId}/tasks/{taskId} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"completed": true
}
'{
"status": "success",
"task": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"due_date": "2023-12-25",
"assignee_account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"completed_at": "2023-11-07T05:31:56Z",
"completed_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"comment_count": 123,
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"status": "error",
"error": "<string>",
"message": "<string>"
}{
"status": "error",
"error": "<string>",
"message": "<string>"
}{
"status": "error",
"error": "<string>",
"message": "<string>"
}{
"status": "error",
"error": "<string>",
"message": "<string>"
}Authorizations
apiKeyAuthbearerAuth
Your Recoup API key. Learn more.
Path Parameters
The project's UUID.
The task's UUID.
Body
application/json
The fields to change.
Every field is optional; send only what changes. An empty body is a 400.
Minimum string length:
1true stamps completed_at with the current time and completed_by with the authenticated account. false clears both. This is the only way to change completion; completed_at is not writable directly.
Was this page helpful?
