Call it
curl https://api.peume.com/v1/call/connect-a-slack-channel \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"channelId": "your channelId",
"channelIds": []
}
}'const res = await fetch("https://api.peume.com/v1/call/connect-a-slack-channel", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"channelId": "your channelId",
"channelIds": []
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/connect-a-slack-channel",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"channelId": "your channelId",
"channelIds": []
}
},
)
print(res.json()["output"])Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: connect-a-slack-channel.
Parameters
channelIdstringSlack channel id, C... or G.... Send this or channelIds, not both.
channelIdsarraySeveral channels of the workspace to connect, each as its own account. With two or more distinct ids the response lists `accounts` and `failed` instead of `account`, and the request is refused with 400 on a reconnect. A single id behaves exactly like channelId.
redirect_urlstringchannelIds only: a URL to return in `redirect_url`, with `connected`, `profileId`, `accountId` and `accountIds` appended.
pendingDataTokenstringNonce from the OAuth redirect. Required unless accountId is sent.
accountIdstringExisting Slack account whose workspace token is reused. Required unless pendingDataToken is sent.
