How to disable legacy Slack integration

If you have the legacy Slack Integration enabled and would like to disable it, you can use the following API request to remove the Slack webook URL from your project settings.

This API call will disable your legacy Slack integration. You will need to create and pass the Personal API Token in "Circle Token" header in order to authenticate the API call:
Note: Replace {vcs} (github or bitbucket), {org}, and {project} with the appropriate values.

curl -X PUT 'https://circleci.com/api/v1.1/project/{vcs}/{org}/{project}/settings" \
-H 'Content-Type: application/json' \
-H "Circle-Token: $CIRCLE_TOKEN" \
--data-binary '{"slack_webhook_url":""}'

You can check that the legacy Slack Integration is indeed disabled with following:

curl -X GET -H "Circle-Token: $CIRCLE_TOKEN" 'https://circleci.com/api/v1.1/project/{vcs}/{org}/{project}/settings' | jq '.slack_webhook_url'

It will return a blank string if the legacy Slack Integration has been disabled successfully.

Was this article helpful?
8 out of 13 found this helpful

Comments

0 comments

Please sign in to leave a comment.