Tasks

For instructions on how to authenticate to use this endpoint, see API overview.

Endpoints

GET
POST
GET
PATCH
DELETE
GET
GET
GET
POST

List all tasks

Get a list of tasks for the current project, with optional filtering by origin product, stage, organization, repository, and created_by.

Required API key scopes

task:read

Query parameters

  • all_team_tasks
    boolean
    Default: false
  • archived
    string
    One of: "true""false""all"
  • channel
    string
  • ci_status
    string
    One of: "passing""failing""pending""none"
  • commented_by
    integer
  • created_by
    integer
  • exclude_origin_product
    string
    One of: "onboarding""error_tracking""eval_clusters""user_created""slack""support_queue""session_summaries""posthog_ai""experiments""signal_report""signals_scout""support_reply""hogdesk""review_hog""image_builder""loop""mcp_analytics""signals_chat""task_analysis""workflow"
  • internal
    string
    One of: "true""false""all"
  • limit
    integer
    Default: 50
  • mentions
    integer
  • offset
    integer
    Default: 0
  • ordering
    string
    One of: "-created_at""-last_activity_at"
  • organization
    string
  • origin_product
    string
  • pinned
    boolean
  • pr_state
    string
    One of: "open""draft""merged""closed"
  • repository
    string
  • search
    string
  • stage
    string
  • status
    string
    One of: "not_started""queued""in_progress""completed""failed""cancelled"

Response


Example request

GET /api/projects/:project_id/tasks
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/tasks/

Example response

Status 200 List of tasks
RESPONSE
{
"count": 123,
"next": "http://api.example.org/accounts/?offset=400&limit=100",
"previous": "http://api.example.org/accounts/?offset=200&limit=100",
"results": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"task_number": 0,
"slug": "string",
"title": "string",
"title_manually_set": true,
"description": "string",
"origin_product": "string",
"runtime": "acp",
"repository": "string",
"repositories": [
"string"
],
"github_integration": 0,
"github_user_integration": "d46b8f4e-2e12-4354-88a4-723bb64114d3",
"signal_report": "f46cde2b-d4ed-4f8c-8d95-dad529d245b3",
"json_schema": {},
"internal": true,
"archived": true,
"archived_at": "2019-08-24T14:15:22Z",
"latest_run": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"task": "4879b8a6-fb3e-4a0d-aef8-b0ea469ac85c",
"stage": "string",
"branch": "string",
"status": "string",
"environment": "string",
"runtime_adapter": "claude",
"provider": "anthropic",
"model": "string",
"reasoning_effort": "off",
"log_url": "http://example.com",
"error_message": "string",
"output": {},
"state": {},
"artifacts": [
{
"id": "string",
"name": "string",
"type": "string",
"source": "string",
"size": 0,
"content_type": "string",
"metadata": {
"skill_name": "string",
"skill_source": "user",
"content_sha256": "string",
"bundle_format": "zip",
"schema_version": 1
},
"storage_path": "string",
"uploaded_at": "string",
"uploaded_by": "agent",
"uploaded_by_user_id": 0,
"dismissed_at": "string",
"url": "http://example.com"
}
],
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"completed_at": "2019-08-24T14:15:22Z"
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"last_activity_at": "2019-08-24T14:15:22Z",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "string",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "string"
},
"ci_prompt": "string",
"channel": "e03ac425-e659-44cf-b8d7-f4176416fcf2",
"slack_thread_references": [
{
"url": "string",
"channel": "string",
"created_at": "string"
}
]
}
]
}

List all tasks

Get a list of tasks for the current project, with optional filtering by origin product, stage, organization, repository, and created_by.

Required API key scopes

task:read

Query parameters

  • all_team_tasks
    boolean
    Default: false
  • archived
    string
    One of: "true""false""all"
  • channel
    string
  • ci_status
    string
    One of: "passing""failing""pending""none"
  • commented_by
    integer
  • created_by
    integer
  • exclude_origin_product
    string
    One of: "onboarding""error_tracking""eval_clusters""user_created""slack""support_queue""session_summaries""posthog_ai""experiments""signal_report""signals_scout""support_reply""hogdesk""review_hog""image_builder""loop""mcp_analytics""signals_chat""task_analysis""workflow"
  • internal
    string
    One of: "true""false""all"
  • limit
    integer
    Default: 50
  • mentions
    integer
  • offset
    integer
    Default: 0
  • ordering
    string
    One of: "-created_at""-last_activity_at"
  • organization
    string
  • origin_product
    string
  • pinned
    boolean
  • pr_state
    string
    One of: "open""draft""merged""closed"
  • repository
    string
  • search
    string
  • stage
    string
  • status
    string
    One of: "not_started""queued""in_progress""completed""failed""cancelled"

Response


Example request

GET /api/projects/:project_id/tasks
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/tasks/

Example response

Status 200 List of tasks
RESPONSE
{
"count": 123,
"next": "http://api.example.org/accounts/?offset=400&limit=100",
"previous": "http://api.example.org/accounts/?offset=200&limit=100",
"results": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"task_number": 0,
"slug": "string",
"title": "string",
"title_manually_set": true,
"description": "string",
"origin_product": "string",
"runtime": "acp",
"repository": "string",
"repositories": [
"string"
],
"github_integration": 0,
"github_user_integration": "d46b8f4e-2e12-4354-88a4-723bb64114d3",
"signal_report": "f46cde2b-d4ed-4f8c-8d95-dad529d245b3",
"json_schema": {},
"internal": true,
"archived": true,
"archived_at": "2019-08-24T14:15:22Z",
"latest_run": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"task": "4879b8a6-fb3e-4a0d-aef8-b0ea469ac85c",
"stage": "string",
"branch": "string",
"status": "string",
"environment": "string",
"runtime_adapter": "claude",
"provider": "anthropic",
"model": "string",
"reasoning_effort": "off",
"log_url": "http://example.com",
"error_message": "string",
"output": {},
"state": {},
"artifacts": [
{
"id": "string",
"name": "string",
"type": "string",
"source": "string",
"size": 0,
"content_type": "string",
"metadata": {
"skill_name": "string",
"skill_source": "user",
"content_sha256": "string",
"bundle_format": "zip",
"schema_version": 1
},
"storage_path": "string",
"uploaded_at": "string",
"uploaded_by": "agent",
"uploaded_by_user_id": 0,
"dismissed_at": "string",
"url": "http://example.com"
}
],
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"completed_at": "2019-08-24T14:15:22Z"
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"last_activity_at": "2019-08-24T14:15:22Z",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "string",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "string"
},
"ci_prompt": "string",
"channel": "e03ac425-e659-44cf-b8d7-f4176416fcf2",
"slack_thread_references": [
{
"url": "string",
"channel": "string",
"created_at": "string"
}
]
}
]
}

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:write

Request parameters

  • title
    string
  • title_manually_set
    boolean
  • description
    string
  • origin_product
  • repository
    stringnull
  • repositories
    array
  • github_integration
    integernull
  • github_user_integration
    stringnull
  • signal_report
    stringnull
  • signal_report_task_relationship
    string
  • json_schema
  • archived
    boolean
  • ci_prompt
    stringnull
  • branch
    stringnull
  • runtime_adapter
  • model
    stringnull
  • reasoning_effort
  • pending_user_message
    stringnull
  • pending_user_artifact_ids
    array
  • auto_publish
    booleannull
  • channel
    stringnull
  • naming_source
    string
  • sandbox_environment_id
    stringnull
  • custom_image_id
    stringnull
  • runtime

Response


Example request

POST /api/projects/:project_id/tasks
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl
-H 'Content-Type: application/json'\
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/tasks/\
-d title="string"

Example response

Status 201
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"task_number": 0,
"slug": "string",
"title": "string",
"title_manually_set": true,
"description": "string",
"origin_product": "string",
"runtime": "acp",
"repository": "string",
"repositories": [
"string"
],
"github_integration": 0,
"github_user_integration": "d46b8f4e-2e12-4354-88a4-723bb64114d3",
"signal_report": "f46cde2b-d4ed-4f8c-8d95-dad529d245b3",
"json_schema": {},
"internal": true,
"archived": true,
"archived_at": "2019-08-24T14:15:22Z",
"latest_run": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"task": "4879b8a6-fb3e-4a0d-aef8-b0ea469ac85c",
"stage": "string",
"branch": "string",
"status": "string",
"environment": "string",
"runtime_adapter": "claude",
"provider": "anthropic",
"model": "string",
"reasoning_effort": "off",
"log_url": "http://example.com",
"error_message": "string",
"output": {},
"state": {},
"artifacts": [
{
"id": "string",
"name": "string",
"type": "string",
"source": "string",
"size": 0,
"content_type": "string",
"metadata": {
"skill_name": "string",
"skill_source": "user",
"content_sha256": "string",
"bundle_format": "zip",
"schema_version": 1
},
"storage_path": "string",
"uploaded_at": "string",
"uploaded_by": "agent",
"uploaded_by_user_id": 0,
"dismissed_at": "string",
"url": "http://example.com"
}
],
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"completed_at": "2019-08-24T14:15:22Z"
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"last_activity_at": "2019-08-24T14:15:22Z",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "string",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "string"
},
"ci_prompt": "string",
"channel": "e03ac425-e659-44cf-b8d7-f4176416fcf2",
"slack_thread_references": [
{
"url": "string",
"channel": "string",
"created_at": "string"
}
]
}
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
RESPONSE
{
"detail": "string",
"error": "string",
"type": "string",
"code": "string",
"attr": "string",
"missing_artifact_ids": [
"string"
],
"limit_type": "burst",
"reset_at": "string",
"is_pro": 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:write

Request parameters

  • title
    string
  • title_manually_set
    boolean
  • description
    string
  • origin_product
  • repository
    stringnull
  • repositories
    array
  • github_integration
    integernull
  • github_user_integration
    stringnull
  • signal_report
    stringnull
  • signal_report_task_relationship
    string
  • json_schema
  • archived
    boolean
  • ci_prompt
    stringnull
  • branch
    stringnull
  • runtime_adapter
  • model
    stringnull
  • reasoning_effort
  • pending_user_message
    stringnull
  • pending_user_artifact_ids
    array
  • auto_publish
    booleannull
  • channel
    stringnull
  • naming_source
    string
  • sandbox_environment_id
    stringnull
  • custom_image_id
    stringnull
  • runtime

Response


Example request

POST /api/projects/:project_id/tasks
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl
-H 'Content-Type: application/json'\
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/tasks/\
-d title="string"

Example response

Status 201
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"task_number": 0,
"slug": "string",
"title": "string",
"title_manually_set": true,
"description": "string",
"origin_product": "string",
"runtime": "acp",
"repository": "string",
"repositories": [
"string"
],
"github_integration": 0,
"github_user_integration": "d46b8f4e-2e12-4354-88a4-723bb64114d3",
"signal_report": "f46cde2b-d4ed-4f8c-8d95-dad529d245b3",
"json_schema": {},
"internal": true,
"archived": true,
"archived_at": "2019-08-24T14:15:22Z",
"latest_run": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"task": "4879b8a6-fb3e-4a0d-aef8-b0ea469ac85c",
"stage": "string",
"branch": "string",
"status": "string",
"environment": "string",
"runtime_adapter": "claude",
"provider": "anthropic",
"model": "string",
"reasoning_effort": "off",
"log_url": "http://example.com",
"error_message": "string",
"output": {},
"state": {},
"artifacts": [
{
"id": "string",
"name": "string",
"type": "string",
"source": "string",
"size": 0,
"content_type": "string",
"metadata": {
"skill_name": "string",
"skill_source": "user",
"content_sha256": "string",
"bundle_format": "zip",
"schema_version": 1
},
"storage_path": "string",
"uploaded_at": "string",
"uploaded_by": "agent",
"uploaded_by_user_id": 0,
"dismissed_at": "string",
"url": "http://example.com"
}
],
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"completed_at": "2019-08-24T14:15:22Z"
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"last_activity_at": "2019-08-24T14:15:22Z",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "string",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "string"
},
"ci_prompt": "string",
"channel": "e03ac425-e659-44cf-b8d7-f4176416fcf2",
"slack_thread_references": [
{
"url": "string",
"channel": "string",
"created_at": "string"
}
]
}
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
RESPONSE
{
"detail": "string",
"error": "string",
"type": "string",
"code": "string",
"attr": "string",
"missing_artifact_ids": [
"string"
],
"limit_type": "burst",
"reset_at": "string",
"is_pro": true
}

Retrieve tasks

Retrieve a single task by ID.

Required API key scopes

task:read

Path parameters

  • id
    string

Response


Example request

GET /api/projects/:project_id/tasks/:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/tasks/:id/

Example response

Status 200 Task
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"task_number": 0,
"slug": "string",
"title": "string",
"title_manually_set": true,
"description": "string",
"origin_product": "string",
"runtime": "acp",
"repository": "string",
"repositories": [
"string"
],
"github_integration": 0,
"github_user_integration": "d46b8f4e-2e12-4354-88a4-723bb64114d3",
"signal_report": "f46cde2b-d4ed-4f8c-8d95-dad529d245b3",
"json_schema": {},
"internal": true,
"archived": true,
"archived_at": "2019-08-24T14:15:22Z",
"latest_run": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"task": "4879b8a6-fb3e-4a0d-aef8-b0ea469ac85c",
"stage": "string",
"branch": "string",
"status": "string",
"environment": "string",
"runtime_adapter": "claude",
"provider": "anthropic",
"model": "string",
"reasoning_effort": "off",
"log_url": "http://example.com",
"error_message": "string",
"output": {},
"state": {},
"artifacts": [
{
"id": "string",
"name": "string",
"type": "string",
"source": "string",
"size": 0,
"content_type": "string",
"metadata": {
"skill_name": "string",
"skill_source": "user",
"content_sha256": "string",
"bundle_format": "zip",
"schema_version": 1
},
"storage_path": "string",
"uploaded_at": "string",
"uploaded_by": "agent",
"uploaded_by_user_id": 0,
"dismissed_at": "string",
"url": "http://example.com"
}
],
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"completed_at": "2019-08-24T14:15:22Z"
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"last_activity_at": "2019-08-24T14:15:22Z",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "string",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "string"
},
"ci_prompt": "string",
"channel": "e03ac425-e659-44cf-b8d7-f4176416fcf2",
"slack_thread_references": [
{
"url": "string",
"channel": "string",
"created_at": "string"
}
]
}

Retrieve tasks

Retrieve a single task by ID.

Required API key scopes

task:read

Path parameters

  • id
    string

Response


Example request

GET /api/projects/:project_id/tasks/:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/tasks/:id/

Example response

Status 200 Task
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"task_number": 0,
"slug": "string",
"title": "string",
"title_manually_set": true,
"description": "string",
"origin_product": "string",
"runtime": "acp",
"repository": "string",
"repositories": [
"string"
],
"github_integration": 0,
"github_user_integration": "d46b8f4e-2e12-4354-88a4-723bb64114d3",
"signal_report": "f46cde2b-d4ed-4f8c-8d95-dad529d245b3",
"json_schema": {},
"internal": true,
"archived": true,
"archived_at": "2019-08-24T14:15:22Z",
"latest_run": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"task": "4879b8a6-fb3e-4a0d-aef8-b0ea469ac85c",
"stage": "string",
"branch": "string",
"status": "string",
"environment": "string",
"runtime_adapter": "claude",
"provider": "anthropic",
"model": "string",
"reasoning_effort": "off",
"log_url": "http://example.com",
"error_message": "string",
"output": {},
"state": {},
"artifacts": [
{
"id": "string",
"name": "string",
"type": "string",
"source": "string",
"size": 0,
"content_type": "string",
"metadata": {
"skill_name": "string",
"skill_source": "user",
"content_sha256": "string",
"bundle_format": "zip",
"schema_version": 1
},
"storage_path": "string",
"uploaded_at": "string",
"uploaded_by": "agent",
"uploaded_by_user_id": 0,
"dismissed_at": "string",
"url": "http://example.com"
}
],
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"completed_at": "2019-08-24T14:15:22Z"
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"last_activity_at": "2019-08-24T14:15:22Z",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "string",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "string"
},
"ci_prompt": "string",
"channel": "e03ac425-e659-44cf-b8d7-f4176416fcf2",
"slack_thread_references": [
{
"url": "string",
"channel": "string",
"created_at": "string"
}
]
}

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:write

Path parameters

  • id
    string

Request parameters

  • title
    string
  • title_manually_set
    boolean
  • description
    string
  • origin_product
  • repository
    stringnull
  • repositories
    array
  • github_integration
    integernull
  • github_user_integration
    stringnull
  • signal_report
    stringnull
  • signal_report_task_relationship
    string
  • json_schema
  • archived
    boolean
  • ci_prompt
    stringnull
  • branch
    stringnull
  • runtime_adapter
  • model
    stringnull
  • reasoning_effort
  • pending_user_message
    stringnull
  • pending_user_artifact_ids
    array
  • auto_publish
    booleannull
  • channel
    stringnull

Response


Example request

PATCH /api/projects/:project_id/tasks/:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X PATCH \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/tasks/:id/\
-d title="string"

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"task_number": 0,
"slug": "string",
"title": "string",
"title_manually_set": true,
"description": "string",
"origin_product": "string",
"runtime": "acp",
"repository": "string",
"repositories": [
"string"
],
"github_integration": 0,
"github_user_integration": "d46b8f4e-2e12-4354-88a4-723bb64114d3",
"signal_report": "f46cde2b-d4ed-4f8c-8d95-dad529d245b3",
"json_schema": {},
"internal": true,
"archived": true,
"archived_at": "2019-08-24T14:15:22Z",
"latest_run": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"task": "4879b8a6-fb3e-4a0d-aef8-b0ea469ac85c",
"stage": "string",
"branch": "string",
"status": "string",
"environment": "string",
"runtime_adapter": "claude",
"provider": "anthropic",
"model": "string",
"reasoning_effort": "off",
"log_url": "http://example.com",
"error_message": "string",
"output": {},
"state": {},
"artifacts": [
{
"id": "string",
"name": "string",
"type": "string",
"source": "string",
"size": 0,
"content_type": "string",
"metadata": {
"skill_name": "string",
"skill_source": "user",
"content_sha256": "string",
"bundle_format": "zip",
"schema_version": 1
},
"storage_path": "string",
"uploaded_at": "string",
"uploaded_by": "agent",
"uploaded_by_user_id": 0,
"dismissed_at": "string",
"url": "http://example.com"
}
],
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"completed_at": "2019-08-24T14:15:22Z"
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"last_activity_at": "2019-08-24T14:15:22Z",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "string",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "string"
},
"ci_prompt": "string",
"channel": "e03ac425-e659-44cf-b8d7-f4176416fcf2",
"slack_thread_references": [
{
"url": "string",
"channel": "string",
"created_at": "string"
}
]
}

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:write

Path parameters

  • id
    string

Request parameters

  • title
    string
  • title_manually_set
    boolean
  • description
    string
  • origin_product
  • repository
    stringnull
  • repositories
    array
  • github_integration
    integernull
  • github_user_integration
    stringnull
  • signal_report
    stringnull
  • signal_report_task_relationship
    string
  • json_schema
  • archived
    boolean
  • ci_prompt
    stringnull
  • branch
    stringnull
  • runtime_adapter
  • model
    stringnull
  • reasoning_effort
  • pending_user_message
    stringnull
  • pending_user_artifact_ids
    array
  • auto_publish
    booleannull
  • channel
    stringnull

Response


Example request

PATCH /api/projects/:project_id/tasks/:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X PATCH \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/tasks/:id/\
-d title="string"

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"task_number": 0,
"slug": "string",
"title": "string",
"title_manually_set": true,
"description": "string",
"origin_product": "string",
"runtime": "acp",
"repository": "string",
"repositories": [
"string"
],
"github_integration": 0,
"github_user_integration": "d46b8f4e-2e12-4354-88a4-723bb64114d3",
"signal_report": "f46cde2b-d4ed-4f8c-8d95-dad529d245b3",
"json_schema": {},
"internal": true,
"archived": true,
"archived_at": "2019-08-24T14:15:22Z",
"latest_run": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"task": "4879b8a6-fb3e-4a0d-aef8-b0ea469ac85c",
"stage": "string",
"branch": "string",
"status": "string",
"environment": "string",
"runtime_adapter": "claude",
"provider": "anthropic",
"model": "string",
"reasoning_effort": "off",
"log_url": "http://example.com",
"error_message": "string",
"output": {},
"state": {},
"artifacts": [
{
"id": "string",
"name": "string",
"type": "string",
"source": "string",
"size": 0,
"content_type": "string",
"metadata": {
"skill_name": "string",
"skill_source": "user",
"content_sha256": "string",
"bundle_format": "zip",
"schema_version": 1
},
"storage_path": "string",
"uploaded_at": "string",
"uploaded_by": "agent",
"uploaded_by_user_id": 0,
"dismissed_at": "string",
"url": "http://example.com"
}
],
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"completed_at": "2019-08-24T14:15:22Z"
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"last_activity_at": "2019-08-24T14:15:22Z",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "string",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "string"
},
"ci_prompt": "string",
"channel": "e03ac425-e659-44cf-b8d7-f4176416fcf2",
"slack_thread_references": [
{
"url": "string",
"channel": "string",
"created_at": "string"
}
]
}

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:write

Path parameters

  • id
    string

Example request

DELETE /api/projects/:project_id/tasks/:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X DELETE \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/tasks/:id/

Example 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:write

Path parameters

  • id
    string

Example request

DELETE /api/projects/:project_id/tasks/:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X DELETE \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/tasks/:id/

Example 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:read

Path parameters

  • id
    string

Response


Example request

GET /api/projects/:project_id/tasks/:id/artifacts
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/tasks/:id/artifacts/

Example response

Status 200
RESPONSE
{
"artifacts": [
{
"id": "string",
"type": "string",
"name": "string"
}
]
}

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:read

Path parameters

  • id
    string

Response


Example request

GET /api/projects/:project_id/tasks/:id/artifacts
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/tasks/:id/artifacts/

Example response

Status 200
RESPONSE
{
"artifacts": [
{
"id": "string",
"type": "string",
"name": "string"
}
]
}

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:read

Path parameters

  • id
    string

Query parameters

  • artifact_id
    string
  • cursor
    string
  • include_resolved
    boolean
    Default: false
  • limit
    integer
    Default: 50

Response


Example request

GET /api/projects/:project_id/tasks/:id/comments
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/tasks/:id/comments/

Example response

Status 200
RESPONSE
{
"comments": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"target": {
"id": "string",
"type": "string",
"name": "string"
},
"content": "string",
"content_truncated": true,
"selected_text": "string",
"created_at": "2019-08-24T14:15:22Z",
"reply_count": 0,
"resolved": true
}
],
"next": "string"
}

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:read

Path parameters

  • id
    string

Query parameters

  • artifact_id
    string
  • cursor
    string
  • include_resolved
    boolean
    Default: false
  • limit
    integer
    Default: 50

Response


Example request

GET /api/projects/:project_id/tasks/:id/comments
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/tasks/:id/comments/

Example response

Status 200
RESPONSE
{
"comments": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"target": {
"id": "string",
"type": "string",
"name": "string"
},
"content": "string",
"content_truncated": true,
"selected_text": "string",
"created_at": "2019-08-24T14:15:22Z",
"reply_count": 0,
"resolved": true
}
],
"next": "string"
}

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:read

Path parameters

  • id
    string
  • root_comment_id
    string

Query parameters

  • comment_id
    string
  • content_offset
    integer
    Default: 0
  • cursor
    string
  • limit
    integer
    Default: 50

Response


Example request

GET /api/projects/:project_id/tasks/:id/comments/:root_comment_id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/tasks/:id/comments/:root_comment_id/

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"target": {
"id": "string",
"type": "string",
"name": "string"
},
"resolved": true,
"comments": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"content": "string",
"content_truncated": true,
"content_next_offset": 0,
"author": "string",
"created_at": "2019-08-24T14:15:22Z",
"anchor": {
"kind": "string",
"quote": "string",
"prefix": "string",
"suffix": "string",
"start": 0,
"end": 1,
"x": 1,
"y": 1,
"width": 1,
"height": 1
},
"canvas_version_id": "string"
}
],
"next": "string"
}

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:read

Path parameters

  • id
    string
  • root_comment_id
    string

Query parameters

  • comment_id
    string
  • content_offset
    integer
    Default: 0
  • cursor
    string
  • limit
    integer
    Default: 50

Response


Example request

GET /api/projects/:project_id/tasks/:id/comments/:root_comment_id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/tasks/:id/comments/:root_comment_id/

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"target": {
"id": "string",
"type": "string",
"name": "string"
},
"resolved": true,
"comments": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"content": "string",
"content_truncated": true,
"content_next_offset": 0,
"author": "string",
"created_at": "2019-08-24T14:15:22Z",
"anchor": {
"kind": "string",
"quote": "string",
"prefix": "string",
"suffix": "string",
"start": 0,
"end": 1,
"x": 1,
"y": 1,
"width": 1,
"height": 1
},
"canvas_version_id": "string"
}
],
"next": "string"
}

Create tasks handoff

Transfer ownership of a task to another member of the project: they take over driving it (steering, archiving, running), and future runs resolve GitHub authorship and notification recipients from them. Only the task's current owner can hand it off. Every run must be finished or canceled, and every sandbox must be shut down first. A task in a private space moves into the recipient's private space; a task in a shared space stays there.

Required API key scopes

task:write

Path parameters

  • id
    string

Request parameters

  • user
    integer

Response


Example request

POST /api/projects/:project_id/tasks/:id/handoff
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl
-H 'Content-Type: application/json'\
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/tasks/:id/handoff/\
-d user="integer"

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"task_number": 0,
"slug": "string",
"title": "string",
"title_manually_set": true,
"description": "string",
"origin_product": "string",
"runtime": "acp",
"repository": "string",
"repositories": [
"string"
],
"github_integration": 0,
"github_user_integration": "d46b8f4e-2e12-4354-88a4-723bb64114d3",
"signal_report": "f46cde2b-d4ed-4f8c-8d95-dad529d245b3",
"json_schema": {},
"internal": true,
"archived": true,
"archived_at": "2019-08-24T14:15:22Z",
"latest_run": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"task": "4879b8a6-fb3e-4a0d-aef8-b0ea469ac85c",
"stage": "string",
"branch": "string",
"status": "string",
"environment": "string",
"runtime_adapter": "claude",
"provider": "anthropic",
"model": "string",
"reasoning_effort": "off",
"log_url": "http://example.com",
"error_message": "string",
"output": {},
"state": {},
"artifacts": [
{
"id": "string",
"name": "string",
"type": "string",
"source": "string",
"size": 0,
"content_type": "string",
"metadata": {
"skill_name": "string",
"skill_source": "user",
"content_sha256": "string",
"bundle_format": "zip",
"schema_version": 1
},
"storage_path": "string",
"uploaded_at": "string",
"uploaded_by": "agent",
"uploaded_by_user_id": 0,
"dismissed_at": "string",
"url": "http://example.com"
}
],
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"completed_at": "2019-08-24T14:15:22Z"
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"last_activity_at": "2019-08-24T14:15:22Z",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "string",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "string"
},
"ci_prompt": "string",
"channel": "e03ac425-e659-44cf-b8d7-f4176416fcf2",
"slack_thread_references": [
{
"url": "string",
"channel": "string",
"created_at": "string"
}
]
}
Status 403 Only a user may hand off a task.
RESPONSE
{
"detail": "string",
"error": "string",
"type": "string",
"code": "string",
"attr": "string",
"missing_artifact_ids": [
"string"
],
"limit_type": "burst",
"reset_at": "string",
"is_pro": true
}

Create tasks handoff

Transfer ownership of a task to another member of the project: they take over driving it (steering, archiving, running), and future runs resolve GitHub authorship and notification recipients from them. Only the task's current owner can hand it off. Every run must be finished or canceled, and every sandbox must be shut down first. A task in a private space moves into the recipient's private space; a task in a shared space stays there.

Required API key scopes

task:write

Path parameters

  • id
    string

Request parameters

  • user
    integer

Response


Example request

POST /api/projects/:project_id/tasks/:id/handoff
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl
-H 'Content-Type: application/json'\
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/tasks/:id/handoff/\
-d user="integer"

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"task_number": 0,
"slug": "string",
"title": "string",
"title_manually_set": true,
"description": "string",
"origin_product": "string",
"runtime": "acp",
"repository": "string",
"repositories": [
"string"
],
"github_integration": 0,
"github_user_integration": "d46b8f4e-2e12-4354-88a4-723bb64114d3",
"signal_report": "f46cde2b-d4ed-4f8c-8d95-dad529d245b3",
"json_schema": {},
"internal": true,
"archived": true,
"archived_at": "2019-08-24T14:15:22Z",
"latest_run": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"task": "4879b8a6-fb3e-4a0d-aef8-b0ea469ac85c",
"stage": "string",
"branch": "string",
"status": "string",
"environment": "string",
"runtime_adapter": "claude",
"provider": "anthropic",
"model": "string",
"reasoning_effort": "off",
"log_url": "http://example.com",
"error_message": "string",
"output": {},
"state": {},
"artifacts": [
{
"id": "string",
"name": "string",
"type": "string",
"source": "string",
"size": 0,
"content_type": "string",
"metadata": {
"skill_name": "string",
"skill_source": "user",
"content_sha256": "string",
"bundle_format": "zip",
"schema_version": 1
},
"storage_path": "string",
"uploaded_at": "string",
"uploaded_by": "agent",
"uploaded_by_user_id": 0,
"dismissed_at": "string",
"url": "http://example.com"
}
],
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"completed_at": "2019-08-24T14:15:22Z"
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"last_activity_at": "2019-08-24T14:15:22Z",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "string",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "string"
},
"ci_prompt": "string",
"channel": "e03ac425-e659-44cf-b8d7-f4176416fcf2",
"slack_thread_references": [
{
"url": "string",
"channel": "string",
"created_at": "string"
}
]
}
Status 403 Only a user may hand off a task.
RESPONSE
{
"detail": "string",
"error": "string",
"type": "string",
"code": "string",
"attr": "string",
"missing_artifact_ids": [
"string"
],
"limit_type": "burst",
"reset_at": "string",
"is_pro": true
}