API
AgentSlack
Operations
Every route this entity exposes. Each route links to its own reference on this page.
| Method | Route | SDK operation | Returns |
|---|---|---|---|
POST |
/api/v1/organizations/{organization_id}/agents/{id}/spark/slack/app |
create |
Agent Slack settings |
POST |
/api/v1/organizations/{organization_id}/agents/{id}/spark/slack/as_you |
create |
The agent's As you Slack state |
Fields
| Field | Type | Required | Description |
|---|
create
POST /api/v1/organizations/{organization_id}/agents/{id}/spark/slack/app
Operation ID: spark_slack_app_api_v1_organization_persistent_agent.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes | |
id |
path |
string |
Yes |
Request body
application/json
| Property | Type | Required | Description |
|---|---|---|---|
action |
enum: prepare, connect, disconnect |
Yes | |
bot_token |
string |
No | |
expected_version |
integer |
No | |
signing_secret |
string |
No |
Responses
200: Agent Slack settings
application/json
| Property | Type | Required | Description |
|---|---|---|---|
message |
string |
Yes | |
slack |
object |
Yes | |
slack.account_connected |
boolean |
Yes | |
slack.app |
object |
Yes | |
slack.app.bot_name |
string,null |
Yes | The bot's name in Slack, as setup created it, once the app is configured |
slack.app.can_configure |
boolean |
Yes | |
slack.app.can_disconnect |
boolean |
Yes | |
slack.app.character_url |
string,null |
Yes | |
slack.app.configured |
boolean |
Yes | |
slack.app.connected |
boolean |
Yes | |
slack.app.event_url |
string,null |
Yes | |
slack.app.prepared |
boolean |
Yes | |
slack.app.settings_url |
string,null |
Yes | |
slack.app.setup_url |
string,null |
Yes | |
slack.app.version |
integer |
Yes | |
slack.as_you |
object |
Yes | The agent posting to Slack as its owner, with the owner's own Slack account through Composio. |
slack.as_you.account |
object,null |
Yes | |
slack.as_you.account.connection_id |
string |
Yes | |
slack.as_you.account.name |
string |
Yes | |
slack.as_you.account.status |
string |
Yes | |
slack.as_you.account.workspace |
string,null |
Yes | |
slack.as_you.available |
boolean |
Yes | |
slack.as_you.can_manage |
boolean |
Yes | Only the owner may connect, configure or disconnect it. |
slack.as_you.confirm_before_sending |
boolean |
Yes | |
slack.as_you.mode |
enum: bot, you, null |
Yes | Which way the agent posts once the owner connected: as the owner (you) or with its own bot (bot). While it is you, the bot's Slack tools are not used. Null before the owner connects. |
slack.as_you.owner_name |
string,null |
Yes | |
slack.as_you.posting |
boolean |
Yes | Whether the agent posts as the owner now: mode is you, the organization allows the account here, and it is still saved. The bot cannot send while this is true, even when the account needs reconnecting. |
slack.as_you.show_sent_using |
boolean |
Yes | |
slack.available |
boolean |
Yes | |
slack.can_change_reply_places |
boolean |
Yes | |
slack.can_edit_handle |
boolean |
Yes | |
slack.can_manage |
boolean |
Yes | |
slack.can_publish |
boolean |
Yes | |
slack.channel_setup_available |
boolean |
Yes | |
slack.channels |
array of object |
Yes | |
slack.channels[].allow_slack_connect |
boolean |
Yes | |
slack.channels[].enabled |
boolean |
Yes | |
slack.channels[].id |
string |
Yes | |
slack.channels[].name |
string,null |
Yes | The channel's name in Slack, without #; null when Slack cannot say. |
slack.connect_url |
string |
Yes | |
slack.disabled_reason |
string,null |
Yes | |
slack.display_name |
string |
Yes | |
slack.handle |
string |
Yes | |
slack.icon_emoji |
string |
Yes | |
slack.mention_id |
string,null |
Yes | |
slack.reply_place_choices |
array of enum: direct_messages, public_channels, private_channels, all_channels |
Yes | The reply places this agent's bot can offer; direct messages and all channels need its own bot. |
slack.reply_places |
array of enum: direct_messages, public_channels, private_channels, all_channels |
Yes | Where the bot replies; any mix may be on. all_channels replies in every channel of an allowed kind the bot is in, without publishing each one. |
slack.workspace_name |
string,null |
Yes |
401: Unauthorized
403: Agent manager and organization admin required
404: Not found
422: Invalid Slack settings
502: Bad gateway
503: Slack unavailable; retry the same operation
POST /api/v1/organizations/{organization_id}/agents/{id}/spark/slack/as_you
Operation ID: spark_slack_as_you_api_v1_organization_persistent_agent.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes | |
id |
path |
string |
Yes |
Request body
application/json
| Property | Type | Required | Description |
|---|---|---|---|
action |
enum: connect, disconnect |
No | |
callback |
enum: app |
No | Desktop sign-ins return to a page that needs no session. |
confirm_before_sending |
boolean |
No | |
mode |
enum: bot, you |
No | Sent on its own: post as the owner, or with the agent's bot while keeping the account. |
show_sent_using |
boolean |
No |
Responses
200: The agent's As you Slack state
application/json
| Property | Type | Required | Description |
|---|---|---|---|
as_you |
object |
Yes | The agent posting to Slack as its owner, with the owner's own Slack account through Composio. |
as_you.account |
object,null |
Yes | |
as_you.account.connection_id |
string |
Yes | |
as_you.account.name |
string |
Yes | |
as_you.account.status |
string |
Yes | |
as_you.account.workspace |
string,null |
Yes | |
as_you.available |
boolean |
Yes | |
as_you.can_manage |
boolean |
Yes | Only the owner may connect, configure or disconnect it. |
as_you.confirm_before_sending |
boolean |
Yes | |
as_you.mode |
enum: bot, you, null |
Yes | Which way the agent posts once the owner connected: as the owner (you) or with its own bot (bot). While it is you, the bot's Slack tools are not used. Null before the owner connects. |
as_you.owner_name |
string,null |
Yes | |
as_you.posting |
boolean |
Yes | Whether the agent posts as the owner now: mode is you, the organization allows the account here, and it is still saved. The bot cannot send while this is true, even when the account needs reconnecting. |
as_you.show_sent_using |
boolean |
Yes | |
redirect_url |
string,null |
No | Composio sign-in to open; null when an existing account was used |