curl --request PUT \
--url https://api.checklyhq.com/v1/alert-channels/{id}/subscriptions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"activated": true,
"checkId": "0bbfc00c-44df-46a7-a4d9-ba38deca8bfd",
"groupId": "null"
}
'{
"activated": true,
"id": 1,
"checkId": "47ccf418-6224-429c-a096-637364249882",
"groupId": "null"
}Update the subscriptions of an alert channel. Use this to add a check to an alert channel so failure and recovery alerts are send out for that check. Note: when passing the subscription object, you can only specify a “checkId” or a “groupId, not both.
curl --request PUT \
--url https://api.checklyhq.com/v1/alert-channels/{id}/subscriptions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"activated": true,
"checkId": "0bbfc00c-44df-46a7-a4d9-ba38deca8bfd",
"groupId": "null"
}
'{
"activated": true,
"id": 1,
"checkId": "47ccf418-6224-429c-a096-637364249882",
"groupId": "null"
}The Checkly Public API uses API keys to authenticate requests. You can get the API Key here. Your API key is like a password: keep it secure!
Authentication to the API is performed using the Bearer auth method in the Authorization header and using the account ID.
For example, set Authorization header while using cURL: curl -H "Authorization: Bearer [apiKey]" "X-Checkly-Account: [accountId]"
Your Checkly account ID, you can find it at https://app.checklyhq.com/settings/account/general
Was this page helpful?