Skip to main content
PUT
/
api
/
v1
/
slack
/
config
Update Slack configuration
curl --request PUT \
  --url http://localhost:3001/api/v1/slack/config \
  --header 'Content-Type: application/json' \
  --cookie nut-session= \
  --data '
{
  "enabled": true,
  "botToken": "xoxb-...",
  "signingSecret": "<string>",
  "channelId": "C0123456789",
  "channelName": "#coconut-notifications",
  "siteUrl": "https://my-coconut.example.com",
  "notifications": {
    "proposals": {
      "created": true,
      "statusChange": true
    },
    "jobs": {
      "completed": true,
      "failed": true
    },
    "git": {
      "push": true,
      "merge": true
    }
  }
}
'
{
  "success": true,
  "data": {
    "enabled": true,
    "channelId": "C0123456789",
    "channelName": "#coconut-notifications",
    "siteUrl": "https://my-coconut.example.com",
    "notifications": {
      "proposals": {
        "created": true,
        "statusChange": true
      },
      "jobs": {
        "completed": true,
        "failed": true
      },
      "git": {
        "push": true,
        "merge": true
      }
    },
    "hasBotToken": true,
    "hasSigningSecret": true
  }
}

Authorizations

nut-session
string
cookie
required

Session cookie authentication

Body

application/json

Partial update to Slack configuration. Only provided fields are updated.

enabled
boolean

Enable or disable Slack notifications

botToken
string

Bot User OAuth Token (starts with xoxb-)

Example:

"xoxb-..."

signingSecret
string

Slack app signing secret

channelId
string

Slack channel ID to post notifications to

Example:

"C0123456789"

channelName
string

Slack channel display name

Example:

"#coconut-notifications"

siteUrl
string

Site URL for notification links

Example:

"https://my-coconut.example.com"

notifications
object

Per-type notification enable/disable settings

Response

Updated Slack configuration

success
boolean
required
data
object

Slack configuration with tokens masked for display