Tasks
For instructions on how to authenticate to use this endpoint, see API overview.
Endpoints
GET | |
GET | |
GET | |
POST | |
GET | |
PATCH | |
DELETE | |
GET | |
GET | |
GET |
Retrieve code invites check access
Compatibility endpoint for released PostHog Desktop clients.
Response
Example request
GET /api /code /invites /check-accessExample response
Status 200
Status 503
Retrieve desktop access
Evaluate Desktop access for the selected project and organization.
Required API key scopes
llm_gateway:readResponse
Example request
GET /api /projects /:project_id /desktop /accessExample response
Status 200
Status 503
List all tasks
Get a list of tasks for the current project, with optional filtering by origin product, stage, organization, repository, created_by, and the workflow (hog_flow_id) that created the task. By default, each row includes description. Pass basic=true for a summary row that omits description and includes description_preview, its first 1000 characters. Use the search parameter to match description text server-side.
Required API key scopes
task:readQuery parameters
- all_team_tasksbooleanDefault:
false - archivedstringOne of:
"true""false""all" - basicbooleanDefault:
false - channelstring
- ci_statusstringOne of:
"passing""failing""pending""none" - client_provenancestringOne of:
"posthog_desktop" - commented_byinteger
- created_byinteger
- exclude_origin_productstringOne of:
"onboarding""error_tracking""eval_clusters""user_created""slack""support_queue""session_summaries""posthog_ai""experiments""signal_report""autoresearch""signals_scout""scout_suggestions""support_reply""hogdesk""review_hog""image_builder""loop""mcp_analytics""signals_chat""task_analysis""workflow""space_setup""business_knowledge" - hog_flow_idstring
- internalstringOne of:
"true""false""all" - limitintegerDefault:
50 - mentionsinteger
- offsetintegerDefault:
0 - orderingstringOne of:
"-created_at""-last_activity_at" - organizationstring
- origin_productstring
- pinnedboolean
- pr_statestringOne of:
"open""draft""merged""closed" - repositorystring
- searchstring
- stagestring
- statusstringOne of:
"not_started""queued""in_progress""completed""failed""cancelled"
Response
Example request
GET /api /projects /:project_id /tasksExample response
Status 200 List of full task rows by default, or basic rows with description_preview when basic=true.
List all tasks
Get a list of tasks for the current project, with optional filtering by origin product, stage, organization, repository, created_by, and the workflow (hog_flow_id) that created the task. By default, each row includes description. Pass basic=true for a summary row that omits description and includes description_preview, its first 1000 characters. Use the search parameter to match description text server-side.
Required API key scopes
task:readQuery parameters
- all_team_tasksbooleanDefault:
false - archivedstringOne of:
"true""false""all" - basicbooleanDefault:
false - channelstring
- ci_statusstringOne of:
"passing""failing""pending""none" - client_provenancestringOne of:
"posthog_desktop" - commented_byinteger
- created_byinteger
- exclude_origin_productstringOne of:
"onboarding""error_tracking""eval_clusters""user_created""slack""support_queue""session_summaries""posthog_ai""experiments""signal_report""autoresearch""signals_scout""scout_suggestions""support_reply""hogdesk""review_hog""image_builder""loop""mcp_analytics""signals_chat""task_analysis""workflow""space_setup""business_knowledge" - hog_flow_idstring
- internalstringOne of:
"true""false""all" - limitintegerDefault:
50 - mentionsinteger
- offsetintegerDefault:
0 - orderingstringOne of:
"-created_at""-last_activity_at" - organizationstring
- origin_productstring
- pinnedboolean
- pr_statestringOne of:
"open""draft""merged""closed" - repositorystring
- searchstring
- stagestring
- statusstringOne of:
"not_started""queued""in_progress""completed""failed""cancelled"
Response
Example request
GET /api /projects /:project_id /tasksExample response
Status 200 List of full task rows by default, or basic rows with description_preview when basic=true.
Create tasks
API for managing tasks within a project. Tasks represent units of work to be performed by an agent.
Required API key scopes
task:writeRequest parameters
- titlestring
- title_manually_setboolean
- descriptionstring
- origin_product
- repositorystring | null
- repositoriesarray
- github_integrationinteger | null
- github_user_integrationstring | null
- signal_reportstring | null
- signal_report_task_relationshipstring
- json_schema
- archivedboolean
- ci_promptstring | null
- branchstring | null
- runtime_adapter
- modelstring | null
- reasoning_effort
- initial_permission_mode
- pending_user_messagestring | null
- pending_user_artifact_idsarray
- auto_publishboolean | null
- channelstring | null
- scheduled_atstring | null
- start_runbooleanDefault:
false - signal_report_discussion_questionstring
- naming_sourcestring
- sandbox_environment_idstring | null
- custom_image_idstring | null
- runtime
Response
Example request
POST /api /projects /:project_id /tasksExample response
Status 201
Status 402 The organization is on a Self-driving free trial, so a report implementation opens no pull request (code `self_driving_free_trial`), or the organization reached its self-driving pull request limit
Status 403 Agent-started runs are limited to the internal project and cannot start from a sandbox token. Immediate runs also require PostHog Desktop access and an enabled Pi cloud runtime.
Status 429 Organization reached its PostHog Desktop usage limit, the signal report reached its task limit (code `signal_report_task_cap`), or the per-user creation rate limit fired
Status 503 PostHog Desktop access could not be verified, or warm run activation is unavailable (code `warm_run_activation_unavailable`). After confirmed nondelivery, a retry_token permits retrying the same run and message with X-PostHog-Warm-Retry. Web retries for up to 20 seconds.
Create tasks
API for managing tasks within a project. Tasks represent units of work to be performed by an agent.
Required API key scopes
task:writeRequest parameters
- titlestring
- title_manually_setboolean
- descriptionstring
- origin_product
- repositorystring | null
- repositoriesarray
- github_integrationinteger | null
- github_user_integrationstring | null
- signal_reportstring | null
- signal_report_task_relationshipstring
- json_schema
- archivedboolean
- ci_promptstring | null
- branchstring | null
- runtime_adapter
- modelstring | null
- reasoning_effort
- initial_permission_mode
- pending_user_messagestring | null
- pending_user_artifact_idsarray
- auto_publishboolean | null
- channelstring | null
- scheduled_atstring | null
- start_runbooleanDefault:
false - signal_report_discussion_questionstring
- naming_sourcestring
- sandbox_environment_idstring | null
- custom_image_idstring | null
- runtime
Response
Example request
POST /api /projects /:project_id /tasksExample response
Status 201
Status 402 The organization is on a Self-driving free trial, so a report implementation opens no pull request (code `self_driving_free_trial`), or the organization reached its self-driving pull request limit
Status 403 Agent-started runs are limited to the internal project and cannot start from a sandbox token. Immediate runs also require PostHog Desktop access and an enabled Pi cloud runtime.
Status 429 Organization reached its PostHog Desktop usage limit, the signal report reached its task limit (code `signal_report_task_cap`), or the per-user creation rate limit fired
Status 503 PostHog Desktop access could not be verified, or warm run activation is unavailable (code `warm_run_activation_unavailable`). After confirmed nondelivery, a retry_token permits retrying the same run and message with X-PostHog-Warm-Retry. Web retries for up to 20 seconds.
Retrieve tasks
Retrieve a single task by ID.
Required API key scopes
task:readPath parameters
- idstring
Response
Example request
GET /api /projects /:project_id /tasks /:idExample response
Status 200 Task
Retrieve tasks
Retrieve a single task by ID.
Required API key scopes
task:readPath parameters
- idstring
Response
Example request
GET /api /projects /:project_id /tasks /:idExample response
Status 200 Task
Update tasks
API for managing tasks within a project. Tasks represent units of work to be performed by an agent.
Required API key scopes
task:writePath parameters
- idstring
Request parameters
- titlestring
- title_manually_setboolean
- descriptionstring
- origin_product
- repositorystring | null
- repositoriesarray
- github_integrationinteger | null
- github_user_integrationstring | null
- signal_reportstring | null
- signal_report_task_relationshipstring
- json_schema
- archivedboolean
- ci_promptstring | null
- branchstring | null
- runtime_adapter
- modelstring | null
- reasoning_effort
- initial_permission_mode
- pending_user_messagestring | null
- pending_user_artifact_idsarray
- auto_publishboolean | null
- channelstring | null
Response
Example request
PATCH /api /projects /:project_id /tasks /:idExample response
Status 200
Update tasks
API for managing tasks within a project. Tasks represent units of work to be performed by an agent.
Required API key scopes
task:writePath parameters
- idstring
Request parameters
- titlestring
- title_manually_setboolean
- descriptionstring
- origin_product
- repositorystring | null
- repositoriesarray
- github_integrationinteger | null
- github_user_integrationstring | null
- signal_reportstring | null
- signal_report_task_relationshipstring
- json_schema
- archivedboolean
- ci_promptstring | null
- branchstring | null
- runtime_adapter
- modelstring | null
- reasoning_effort
- initial_permission_mode
- pending_user_messagestring | null
- pending_user_artifact_idsarray
- auto_publishboolean | null
- channelstring | null
Response
Example request
PATCH /api /projects /:project_id /tasks /:idExample response
Status 200
Delete tasks
API for managing tasks within a project. Tasks represent units of work to be performed by an agent.
Required API key scopes
task:writePath parameters
- idstring
Example request
DELETE /api /projects /:project_id /tasks /:idExample response
Status 204 No response body
Delete tasks
API for managing tasks within a project. Tasks represent units of work to be performed by an agent.
Required API key scopes
task:writePath parameters
- idstring
Example request
DELETE /api /projects /:project_id /tasks /:idExample response
Status 204 No response body
List all tasks artifacts
API for managing tasks within a project. Tasks represent units of work to be performed by an agent.
Required API key scopes
task:readPath parameters
- idstring
Response
Example request
GET /api /projects /:project_id /tasks /:id /artifactsExample response
Status 200
List all tasks artifacts
API for managing tasks within a project. Tasks represent units of work to be performed by an agent.
Required API key scopes
task:readPath parameters
- idstring
Response
Example request
GET /api /projects /:project_id /tasks /:id /artifactsExample response
Status 200
List all tasks comments
API for managing tasks within a project. Tasks represent units of work to be performed by an agent.
Required API key scopes
comment:readPath parameters
- idstring
Query parameters
- artifact_idstring
- cursorstring
- include_resolvedbooleanDefault:
false - limitintegerDefault:
50
Response
Example request
GET /api /projects /:project_id /tasks /:id /commentsExample response
Status 200
List all tasks comments
API for managing tasks within a project. Tasks represent units of work to be performed by an agent.
Required API key scopes
comment:readPath parameters
- idstring
Query parameters
- artifact_idstring
- cursorstring
- include_resolvedbooleanDefault:
false - limitintegerDefault:
50
Response
Example request
GET /api /projects /:project_id /tasks /:id /commentsExample response
Status 200
Retrieve tasks comments
API for managing tasks within a project. Tasks represent units of work to be performed by an agent.
Required API key scopes
comment:readPath parameters
- idstring
- root_comment_idstring
Query parameters
- comment_idstring
- content_offsetintegerDefault:
0 - cursorstring
- limitintegerDefault:
50
Response
Example request
GET /api /projects /:project_id /tasks /:id /comments /:root_comment_idExample response
Status 200
Retrieve tasks comments
API for managing tasks within a project. Tasks represent units of work to be performed by an agent.
Required API key scopes
comment:readPath parameters
- idstring
- root_comment_idstring
Query parameters
- comment_idstring
- content_offsetintegerDefault:
0 - cursorstring
- limitintegerDefault:
50
Response
Example request
GET /api /projects /:project_id /tasks /:id /comments /:root_comment_id