http
POST /projects/{project_reference}/channelsConnect a Slack agent. Requires project.channels.write.
Parameters
| Name | In | Required | Description |
|---|---|---|---|
project_reference | path | Yes | Project slug, UUID, or domain that identifies the project. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
platform | string | Yes | Messaging platform: slack |
agent_id | string | Yes | Agent ID from listChannelAgents (MCP: list_channel_agents) for the same runtime target |
name | string | Display name, 1-255 characters | |
respond_to | string | Which Slack messages to answer: mentions, direct_messages or all | |
allowed_slack_channel_ids | array | Slack channel IDs. Overlap with another channel in the same workspace is rejected with resource-already-exists. IDs come from listSlackChannels (MCP: list_slack_channels); empty means every Slack channel the bot is in. A preview_branch target needs at least one. | |
welcome_message | string,null | Welcome message; null clears | |
error_message | string,null | Message shown when the agent fails; null clears | |
max_response_tokens | integer,null | Maximum response tokens, 1-65536; null clears | |
runtime_target_kind | string | Runtime target: main_branch, environment or preview_branch | |
target_environment_id | string,null | Environment ID; required when runtime_target_kind is environment | |
target_branch_id | string,null | Branch ID; required when runtime_target_kind is preview_branch |
Responses
| Status | Description |
|---|---|
| 201 | Created channel |
| 400 | Bad request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not found |
| 409 | Conflict |
| 500 | Server error |
| 502 | Bad gateway |