Slack App Workspace

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

Endpoints

GET
GET
POST
POST

Retrieve slack app workspace setup

Required API key scopes

integration:read

Path parameters

  • id
    string

Query parameters

  • entry
    string
    Default: other
    One of: "slack_page""other"

Response


Example request

GET /api/projects/:project_id/slack_app_workspace_setup/: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/slack_app_workspace_setup/:id/

Example response

Status 200
RESPONSE
{
"integration_id": 0,
"slack_workspace_name": "string",
"open_slack_url": "http://example.com",
"steps": [
"ai_consent"
],
"project_options": [
{
"integration_id": 0,
"project_name": "string",
"organization_name": "string"
}
],
"can_post_channel_welcome": true
}

Retrieve slack app workspace setup channels

Required API key scopes

integration:read

Path parameters

  • id
    string

Response


Example request

GET /api/projects/:project_id/slack_app_workspace_setup/:id/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/slack_app_workspace_setup/:id/channels/

Example response

Status 200
RESPONSE
{
"channels": [
{
"id": "string",
"name": "string",
"is_member": true
}
]
}
Status 429 Slack's channel list for this workspace is loading in another request, or it was loaded too often recently.

Create slack app workspace setup default project

Required API key scopes

integration:write

Path parameters

  • id
    string

Request parameters

  • integration_id
    integer

Response


Example request

POST /api/projects/:project_id/slack_app_workspace_setup/:id/default_project
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/slack_app_workspace_setup/:id/default_project/\
-d integration_id="integer"

Example response

Status 200
RESPONSE
{
"integration_id": 0,
"slack_workspace_name": "string",
"open_slack_url": "http://example.com",
"steps": [
"ai_consent"
],
"project_options": [
{
"integration_id": 0,
"project_name": "string",
"organization_name": "string"
}
],
"can_post_channel_welcome": true
}

Create slack app workspace setup join channels

Required API key scopes

integration:write

Path parameters

  • id
    string

Request parameters

  • channel_ids
    array
  • post_welcome
    boolean
    Default: true

Response


Example request

POST /api/projects/:project_id/slack_app_workspace_setup/:id/join_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/slack_app_workspace_setup/:id/join_channels/\
-d channel_ids="array"

Example response

Status 200
RESPONSE
{
"results": [
{
"channel_id": "string",
"error": "string"
}
]
}
Status 429 Slack's channel list for this workspace is loading in another request, or it was loaded too often recently.