How to disable legacy Slack integration

If you have the legacy Slack Integration enabled and would like to disable you can use the following API. Replacing {vcs} (github or bitbucket), {org}, and {project} where appropriate. This API 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.

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 if it indeed disabled your legacy Slack Integration 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?
1 out of 1 found this helpful

Comments

0 comments

Please sign in to leave a comment.