Task

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

Endpoints

GET
POST
GET
POST
PATCH
DELETE

List all task channels

All live public channels plus the requester's personal #me channel (created on first list).

Required API key scopes

task:read

Query parameters

  • limit
    integer
  • offset
    integer

Response


Example request

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

Example response

Status 200 List of channels
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",
"name": "string",
"channel_type": "string",
"created_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"
}
}
]
}

Create task channels

Returns the existing public channel with the (normalized) name, creating it if needed.

Required API key scopes

task:write

Request parameters

  • name
    string

Response


Example request

POST /api/projects/:project_id/task_channels
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/task_channels/\
-d name="string"

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"channel_type": "string",
"created_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"
}
}

List all task channels feed

A channel's system announcements in chronological order.

Required API key scopes

task:read

Path parameters

  • channel_id
    string

Query parameters

  • limit
    integer
  • offset
    integer

Response


Example request

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

Example response

Status 200 Feed messages, chronological
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",
"channel": "e03ac425-e659-44cf-b8d7-f4176416fcf2",
"author": {
"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"
},
"author_kind": "string",
"event": "string",
"payload": {},
"content": "string",
"created_at": "2019-08-24T14:15:22Z"
}
]
}

Create task channels feed

API for a channel's system-announcement feed — durable "PostHog agent" rows (context created, CONTEXT.md being built) rendered alongside the channel's task cards. Read by any team member for a public channel; personal channels are owner-only.

Required API key scopes

task:write

Path parameters

  • channel_id
    string

Request parameters

  • event
  • payload
  • created_at
    string

Response


Example request

POST /api/projects/:project_id/task_channels/:channel_id/feed
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/task_channels/:channel_id/feed/\
-d event=undefined

Example response

Status 201
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"channel": "e03ac425-e659-44cf-b8d7-f4176416fcf2",
"author": {
"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"
},
"author_kind": "string",
"event": "string",
"payload": {},
"content": "string",
"created_at": "2019-08-24T14:15:22Z"
}

Update task channels

API for task channels — the shared feeds tasks are kicked off in. Listing lazily provisions the requester's personal "#me" channel; creation is resolve-or-create by normalized name so clients can map channel-like surfaces onto backend channels.

Required API key scopes

task:write

Path parameters

  • id
    string

Request parameters

  • name
    string

Response


Example request

PATCH /api/projects/:project_id/task_channels/: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/task_channels/:id/\
-d name="string"

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"channel_type": "string",
"created_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"
}
}

Delete task channels

API for task channels — the shared feeds tasks are kicked off in. Listing lazily provisions the requester's personal "#me" channel; creation is resolve-or-create by normalized name so clients can map channel-like surfaces onto backend channels.

Required API key scopes

task:write

Path parameters

  • id
    string

Example request

DELETE /api/projects/:project_id/task_channels/: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/task_channels/:id/

Example response

Status 204 No response body

Community questions