Tasks
For instructions on how to authenticate to use this endpoint, see API overview.
Endpoints
GET | |
POST | |
POST | |
POST | |
GET | |
GET | |
POST | |
POST | |
GET | |
GET | |
POST | |
GET | |
POST | |
GET | |
PATCH |
List all tasks me config
Retrieve your per-project default AI run preferences, plus the resolved defaults a new run will use when no explicit runtime selection is sent (your preference over the project default).
Required API key scopes
task:readResponse
Example request
GET /api /projects /:project_id /tasks /@me /configExample response
Status 200
Create tasks me config
Set your per-project default AI run preferences; they override the project default wholesale. Send all fields as null to clear and inherit the project default.
Required API key scopes
task:writeRequest parameters
- runtime
- runtime_adapter
- modelstring | null
- reasoning_effort
Response
Example request
POST /api /projects /:project_id /tasks /@me /configExample response
Status 200
Create tasks me config agent instructions
Set your personal instructions, which PostHog cloud agents load in Tasks runs you start, after the project instructions. Autonomous runs never get them. Anyone who continues a task you started can see them, so leave out anything private. Send an empty string to clear.
Required API key scopes
task:writeRequest parameters
- agent_instructionsstring
Response
Example request
POST /api /projects /:project_id /tasks /@me /config /agent_instructionsExample response
Status 200
Create tasks me config task defaults
Update your per-project defaults for new tasks. Fields you leave out keep their stored value.
Required API key scopes
task:writeRequest parameters
- start_in_plan_modeboolean
- auto_publish_cloud_runsboolean
- default_cloud_targetstring | null
Response
Example request
POST /api /projects /:project_id /tasks /@me /config /task_defaultsExample response
Status 200
Retrieve tasks active wizard run
Returns the most recent onboarding wizard cloud run for the current project when it is still running (or completed within the last day), so the setup-progress FAB can rehydrate after a drop-flow signup that started the run server-side. Returns 204 when there is none.
Required API key scopes
task:readResponse
Example request
GET /api /projects /:project_id /tasks /active_wizard_runExample response
Status 200 The team's active onboarding wizard cloud run.
Status 204 No active onboarding wizard cloud run for this project.
Retrieve tasks active wizard run
Returns the most recent onboarding wizard cloud run for the current project when it is still running (or completed within the last day), so the setup-progress FAB can rehydrate after a drop-flow signup that started the run server-side. Returns 204 when there is none.
Required API key scopes
task:readResponse
Example request
GET /api /projects /:project_id /tasks /active_wizard_runExample response
Status 200 The team's active onboarding wizard cloud run.
Status 204 No active onboarding wizard cloud run for this project.
List all tasks config
Retrieve the project-wide default AI run preferences for task runs.
Required API key scopes
task:readQuery parameters
- limitinteger
- offsetinteger
Response
Example request
GET /api /projects /:project_id /tasks /configExample response
Status 200
Create tasks config
Set the project-wide default AI run preferences applied to task runs created without an explicit runtime selection. Send all fields as null to clear.
Required API key scopes
task:writeRequest parameters
- runtime
- runtime_adapter
- modelstring | null
- reasoning_effort
Response
Example request
POST /api /projects /:project_id /tasks /configExample response
Status 200
Create tasks config agent instructions
Set the project instructions that PostHog cloud agents load as their user-level AGENTS.md in every eligible Tasks run, including autonomous runs. Send an empty string to clear.
Required API key scopes
task:writeRequest parameters
- agent_instructionsstring
Response
Example request
POST /api /projects /:project_id /tasks /config /agent_instructionsExample response
Status 200
Retrieve tasks models
Return the models a task run may use, with the reasoning efforts each one supports. Derived from the live LLM gateway catalogue, so a newly released model appears without a client change. An empty list means the gateway is unreachable — clients should fall back to their own default rather than treating it as 'no models exist'.
Required API key scopes
task:readResponse
Example request
GET /api /projects /:project_id /tasks /modelsExample response
Status 200
Retrieve tasks models
Return the models a task run may use, with the reasoning efforts each one supports. Derived from the live LLM gateway catalogue, so a newly released model appears without a client change. An empty list means the gateway is unreachable — clients should fall back to their own default rather than treating it as 'no models exist'.
Required API key scopes
task:readResponse
Example request
GET /api /projects /:project_id /tasks /modelsExample response
Status 200
Retrieve tasks pinned
Return the visible tasks pinned by the requester in the current project.
Required API key scopes
task:readResponse
Example request
GET /api /projects /:project_id /tasks /pinnedExample response
Status 200
Retrieve tasks pinned
Return the visible tasks pinned by the requester in the current project.
Required API key scopes
task:readResponse
Example request
GET /api /projects /:project_id /tasks /pinnedExample response
Status 200
Create tasks pull request titles
Returns the GitHub titles of the pull requests that the latest run of each task opened.
Required API key scopes
task:readRequest parameters
- idsarray
Response
Example request
POST /api /projects /:project_id /tasks /pull_request_titlesExample response
Status 200
Create tasks pull request titles
Returns the GitHub titles of the pull requests that the latest run of each task opened.
Required API key scopes
task:readRequest parameters
- idsarray
Response
Example request
POST /api /projects /:project_id /tasks /pull_request_titlesExample response
Status 200
List all tasks repo routing rules
Team routing rules that steer agent repo selection (RepoRoutingRule).
The same rows the Slack /posthog rules commands manage; the repo selection agent
reads them ordered by priority when picking a repository for a task. Rules whose
repository is not connected to the project are ignored at selection time, so a
stale rule is inert rather than harmful — which is why writes here don't check the
connected-repository list (the UI constrains the picker to connected repos anyway).
Required API key scopes
task:readExample request
GET /api /projects /:project_id /tasks /repo_routing_rulesExample response
Status 200
Create tasks repo routing rules
Team routing rules that steer agent repo selection (RepoRoutingRule).
The same rows the Slack /posthog rules commands manage; the repo selection agent
reads them ordered by priority when picking a repository for a task. Rules whose
repository is not connected to the project are ignored at selection time, so a
stale rule is inert rather than harmful — which is why writes here don't check the
connected-repository list (the UI constrains the picker to connected repos anyway).
Required API key scopes
task:writeRequest parameters
- rule_textstring
- repositorystring
Response
Example request
POST /api /projects /:project_id /tasks /repo_routing_rulesExample response
Status 201
Retrieve tasks repo routing rules
Team routing rules that steer agent repo selection (RepoRoutingRule).
The same rows the Slack /posthog rules commands manage; the repo selection agent
reads them ordered by priority when picking a repository for a task. Rules whose
repository is not connected to the project are ignored at selection time, so a
stale rule is inert rather than harmful — which is why writes here don't check the
connected-repository list (the UI constrains the picker to connected repos anyway).
Required API key scopes
task:readPath parameters
- idstring
Response
Example request
GET /api /projects /:project_id /tasks /repo_routing_rules /:idExample response
Status 200
Update tasks repo routing rules
Team routing rules that steer agent repo selection (RepoRoutingRule).
The same rows the Slack /posthog rules commands manage; the repo selection agent
reads them ordered by priority when picking a repository for a task. Rules whose
repository is not connected to the project are ignored at selection time, so a
stale rule is inert rather than harmful — which is why writes here don't check the
connected-repository list (the UI constrains the picker to connected repos anyway).
Required API key scopes
task:writePath parameters
- idstring
Request parameters
- rule_textstring
- repositorystring
Response
Example request
PATCH /api /projects /:project_id /tasks /repo_routing_rules /:id










