# Get Project Task

Source: https://recoupable.dev/docs/api-reference/projects/task-get

Get project task

## GET /api/projects/{projectId}/tasks/{taskId}

Full OpenAPI specification: https://recoupable.dev/docs/spec/projects.json

## Authentication

This operation requires one of the security alternatives in the specification below. Security scheme definitions are included where present in the published specification.

[Authentication guide](https://recoupable.dev/docs/authentication)

## Operation and referenced schemas

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Recoup API - Projects",
    "description": "Client-facing project status: the tasks on a client engagement, who they are waiting on, and the comment thread against each one.",
    "license": {
      "name": "MIT"
    },
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.recoupable.dev"
    }
  ],
  "paths": {
    "/api/projects/{projectId}/tasks/{taskId}": {
      "get": {
        "summary": "Get project task",
        "description": "One task with its comment feed and the project's collaborators. This is what the task detail page renders.",
        "security": [
          {
            "apiKeyAuth": []
          },
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "description": "The project's UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "description": "The task's UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The task, its comments and the project's collaborators.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectTaskResponse"
                }
              }
            }
          },
          "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.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ProjectTaskResponse": {
        "type": "object",
        "required": [
          "status",
          "task",
          "comments",
          "collaborators"
        ],
        "properties": {
          "status": {
            "type": "string",
            "example": "success"
          },
          "task": {
            "$ref": "#/components/schemas/ProjectTask"
          },
          "comments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectComment"
            },
            "description": "Oldest first, so the feed reads top to bottom."
          },
          "collaborators": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectCollaborator"
            }
          }
        }
      },
      "Error": {
        "type": "object",
        "required": [
          "status",
          "error"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "error"
            ],
            "description": "Always `\"error\"` for error responses."
          },
          "error": {
            "type": "string",
            "description": "Human-readable error message."
          },
          "message": {
            "type": "string",
            "description": "Carries the message in place of `error` when the failure comes from the authentication layer, so a 401 raised while verifying the credential reads `message` and every other error reads `error`."
          }
        }
      },
      "ProjectTask": {
        "type": "object",
        "required": [
          "id",
          "project_id",
          "title",
          "created_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "due_date": {
            "type": "string",
            "format": "date",
            "nullable": true,
            "description": "A calendar date with no time of day, e.g. `2026-09-12`."
          },
          "assignee_account_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "Who the task is waiting on. A client renders its \"needs you\" treatment when this matches the viewing account."
          },
          "completed_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Null means the task is not complete. There is no separate boolean."
          },
          "completed_by": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "comment_count": {
            "type": "integer",
            "format": "int32",
            "description": "Number of comments on this task. Present on the project read so a list can render a count without a call per task."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Also the sort key: tasks come back oldest first."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ProjectComment": {
        "type": "object",
        "required": [
          "id",
          "task_id",
          "account_id",
          "body",
          "created_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "task_id": {
            "type": "string",
            "format": "uuid"
          },
          "account_id": {
            "type": "string",
            "format": "uuid"
          },
          "author_name": {
            "type": "string",
            "nullable": true,
            "description": "The author's `accounts.name`, resolved server-side. Frequently null; render a fallback."
          },
          "body": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ProjectCollaborator": {
        "type": "object",
        "required": [
          "account_id"
        ],
        "properties": {
          "account_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true,
            "description": "The collaborator's `accounts.name`. Frequently null — nothing captures a name at sign-up today — so clients must render a fallback."
          }
        }
      }
    },
    "securitySchemes": {
      "apiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key",
        "description": "Your Recoup API key. [Learn more](/quickstart#api-keys)."
      },
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "A Recoup API key or a Privy access token. [Learn more](/authentication)."
      }
    }
  }
}
```
