Context graph

Associate Slack channels with CRM accounts

Link a Slack channel to a CRM account and optionally a deal through the REST API.

#Use case

If your automation creates a Slack channel for each customer or deal, you can use this endpoint to associate the channel with the correct CRM account in Bigmind. Invite the Bigmind bot to the channel first, then call the API with the Slack channel ID and CRM account ID. A deal association is optional, so channels created for deals can still be linked only to their accounts.

The endpoint schedules the channel's messages for sync. Set agentEnabled: true to also enable threaded replies when team members mention @Bigmind. It supports both public and private channels.

#Prerequisites and authentication

Connect Slack and your CRM in the same Bigmind workspace. Slack must have channel sync permissions, and the Bigmind bot must already be a member of the channel. The account and optional deal must have synced from your CRM into Bigmind.

Use a secret API key from that workspace: Authorization: Bearer sk_your_api_key. Send Content-Type: application/json. Public write keys and channel keys cannot call this endpoint. The API key determines the workspace; do not send a workspace or Slack connection ID.

#Endpoint

PUT https://api.bigmind.ai/v1/slack/channels/{channelId}/association

channelId is the Slack channel ID, such as C0123456789, rather than the channel name.

Body fieldRequiredDescription
accountIdYesCRM account ID as a string: a Salesforce Account ID or HubSpot company ID.
dealIdNoCRM deal ID as a string: a Salesforce Opportunity ID or HubSpot deal ID. The deal must belong to the selected account. Omit it or send null for an account-only association.
agentEnabledNoBoolean. Set true for both channel sync and agent replies, or false for sync only. Defaults to false when omitted.

#Associate with an account

curl --request PUT \
  'https://api.bigmind.ai/v1/slack/channels/C0123456789/association' \
  --header 'Authorization: Bearer sk_your_api_key' \
  --header 'Content-Type: application/json' \
  --data '{"accountId":"001XXXXXXXXXXXXXXX"}'

#Optionally associate with a deal

Use the same endpoint with this body:

{
  "accountId": "001XXXXXXXXXXXXXXX",
  "dealId": "006XXXXXXXXXXXXXXX"
}

#Enable both sync and agent replies

Use the same endpoint with this body:

{
  "accountId": "001XXXXXXXXXXXXXXX",
  "agentEnabled": true
}

Agent replies require channel-agent permissions and an internal Slack channel. Slack Connect, external sharing, and guests are not supported. Only the person invoking Bigmind must have an active account in the connected Bigmind organization, with matching Slack and Bigmind email addresses. Other internal teammates do not need Bigmind accounts. Agent replies are visible to everyone in the channel. These checks run before the association is changed and are checked again when the agent handles messages.

Channel sync continues alongside agent replies. Set agentEnabled: false to disable replies while retaining sync and the CRM association. The API call itself posts no message. Inviting the bot may independently trigger Slack's existing Bigmind setup prompt.

#Response and updates

A successful request returns 200 OK:

{
  "success": true,
  "data": {
    "channelId": "C0123456789",
    "accountId": "001XXXXXXXXXXXXXXX",
    "dealId": null,
    "agentEnabled": false
  }
}

Calling the endpoint again replaces the channel's account and deal association and applies the requested agent setting. Omitting dealId or sending null clears an existing deal association. Omitting agentEnabled disables agent replies. Repeating the same request is safe and does not create duplicate associations. Multiple channels can be associated with the same account.

Success means the association and agent setting have been saved and message sync scheduled. Message import runs asynchronously. The response reports the applied agentEnabled setting.

#Errors and retries

Errors use this response format:

{"success":false,"error":"Invite the Bigmind bot to this channel first."}
StatusMeaning
400Invalid JSON, channel ID, or body; archived channel; or a deal that does not belong to the account.
401Missing or invalid secret API key.
403A public write key was used.
404The channel is not visible to the connected Slack bot, or the account or deal is not available in the workspace's synced CRM data.
409Slack or CRM is not connected, channel sync permissions are missing, the bot has not joined the channel, or agent replies were requested for a channel that does not meet the permissions and internal-channel requirements.
429Workspace API rate limit exceeded.
500 / 502Configuration or Slack verification failed. Retry the same request.

Use backoff when retrying rate limits and temporary failures. A failed request can occur after the association was saved; repeating the same request completes any remaining setup. If an account or deal was just created in your CRM, wait for it to sync to Bigmind before retrying a 404.

Updated 10/8/2026