Tasks
For instructions on how to authenticate to use this endpoint, see API overview.
Endpoints
GET | |
GET | |
GET | |
GET | |
POST | |
POST |
Retrieve tasks repositories
Return the set of repositories referenced by non-deleted, non-internal tasks in the current project. Used to populate repository filter pickers without being constrained by task list pagination.
Required API key scopes
task:readResponse
Example request
GET /api /projects /:project_id /tasks /repositoriesExample response
Status 200 Distinct repositories used by tasks in the current project.
Retrieve tasks repositories
Return the set of repositories referenced by non-deleted, non-internal tasks in the current project. Used to populate repository filter pickers without being constrained by task list pagination.
Required API key scopes
task:readResponse
Example request
GET /api /projects /:project_id /tasks /repositoriesExample response
Status 200 Distinct repositories used by tasks in the current project.
Retrieve tasks repository readiness
Get autonomy readiness details for a specific repository in the current project.
Required API key scopes
task:readQuery parameters
- refreshbooleanDefault:
false - repositorystring
- window_daysintegerDefault:
7
Response
Example request
GET /api /projects /:project_id /tasks /repository_readinessExample response
Status 200 Repository readiness status
Retrieve tasks repository readiness
Get autonomy readiness details for a specific repository in the current project.
Required API key scopes
task:readQuery parameters
- refreshbooleanDefault:
false - repositorystring
- window_daysintegerDefault:
7
Response
Example request
GET /api /projects /:project_id /tasks /repository_readinessExample response
Status 200 Repository readiness status
Retrieve tasks search
API for managing tasks within a project. Tasks represent units of work to be performed by an agent.
Required API key scopes
task:readQuery parameters
- limitintegerDefault:
20 - qstring
Example request
GET /api /projects /:project_id /tasks /searchExample response
Status 200
Retrieve tasks search
API for managing tasks within a project. Tasks represent units of work to be performed by an agent.
Required API key scopes
task:readQuery parameters
- limitintegerDefault:
20 - qstring
Example request
GET /api /projects /:project_id /tasks /searchExample response
Status 200
Retrieve tasks slack thread context
PostHog-internal debug tool. Resolves a Slack permalink to the linked task, its runs, the task-processing and mention-dispatch Temporal workflow ids/URLs, and presigned log URLs.
Required API key scopes
task:readQuery parameters
- urlstring
Response
Example request
GET /api /projects /:project_id /tasks /slack_thread_contextExample response
Status 200 Task, runs, and Temporal workflow handles for the Slack thread.
Status 400 Malformed Slack URL or unparseable thread identifiers.
Status 403 Endpoint is gated to PostHog-internal debugging.
Status 404 No SlackThreadTaskMapping exists for the parsed (channel, thread_ts).
Retrieve tasks slack thread context
PostHog-internal debug tool. Resolves a Slack permalink to the linked task, its runs, the task-processing and mention-dispatch Temporal workflow ids/URLs, and presigned log URLs.
Required API key scopes
task:readQuery parameters
- urlstring
Response
Example request
GET /api /projects /:project_id /tasks /slack_thread_contextExample response
Status 200 Task, runs, and Temporal workflow handles for the Slack thread.
Status 400 Malformed Slack URL or unparseable thread identifiers.
Status 403 Endpoint is gated to PostHog-internal debugging.
Status 404 No SlackThreadTaskMapping exists for the parsed (channel, thread_ts).
Create tasks summaries
Returns summary for the requested tasks: id, title, repository, created_at, updated_at, and the latest run's status and environment.
Required API key scopes
task:readQuery parameters
- limitinteger
- offsetinteger
Request parameters
- idsarray
Response
Example request
POST /api /projects /:project_id /tasks /summariesExample response
Status 200 Summary fields for the requested tasks
Create tasks summaries
Returns summary for the requested tasks: id, title, repository, created_at, updated_at, and the latest run's status and environment.
Required API key scopes
task:readQuery parameters
- limitinteger
- offsetinteger
Request parameters
- idsarray
Response
Example request
POST /api /projects /:project_id /tasks /summariesExample response
Status 200 Summary fields for the requested tasks
Create tasks warm
Warm a full idling Run for a Code-app cloud task while the user composes: boot a sandbox, clone the repo, check out the branch, and start the agent, then idle awaiting the first message. On submit the normal create+run path transparently reuses and activates this Run; abandoned warms are reaped by the Run's inactivity timeout. Best-effort: returns an empty body when the feature flag is off, the warm pool is full, or the GitHub integration doesn't belong to the team.
Required API key scopes
task:writeRequest parameters
- repositorystringnull
- repositoriesarray
- github_integrationintegernull
- branchstringnull
- runtime_adapter
- modelstringnull
- reasoning_effort
- sandbox_environment_idstringnull
- custom_image_idstringnull
Response
Example request
POST /api /projects /:project_id /tasks /warmExample response
Status 200 Warm Run provisioned (`task_id`/`run_id` to activate on submit), or an empty body when the feature is off, capped, or the integration didn't resolve.
Status 403 PostHog Desktop access is required
Status 429 Team is over its posthog_code usage limit
Create tasks warm
Warm a full idling Run for a Code-app cloud task while the user composes: boot a sandbox, clone the repo, check out the branch, and start the agent, then idle awaiting the first message. On submit the normal create+run path transparently reuses and activates this Run; abandoned warms are reaped by the Run's inactivity timeout. Best-effort: returns an empty body when the feature flag is off, the warm pool is full, or the GitHub integration doesn't belong to the team.
Required API key scopes
task:writeRequest parameters
- repositorystringnull
- repositoriesarray
- github_integrationintegernull
- branchstringnull
- runtime_adapter
- modelstringnull
- reasoning_effort
- sandbox_environment_idstringnull
- custom_image_idstringnull
Response
Example request
POST /api /projects /:project_id /tasks /warm