Changing either needs
webhooks:manage and a signed-in person. That
permission cannot be granted to an API key: a destination is somewhere every
future event is copied to.
Turn on email and Slack alerts
1
Open the settings
Settings → Notifications. Only administrators can change them.
2
Choose the email alerts
Select the events to mail (New critical or high findings on a scan,
A failed policy verdict, Findings past their SLA deadline) and the
members who receive them. Recipients
are members of the organization, and membership is checked again each time
a mail is sent, so somebody who has been removed stops receiving alerts.If email alerts cannot be turned on, this deployment has no mail configured.
See Send mail through your SMTP relay.
3
Add a Slack webhook
Paste a Slack incoming webhook URL and choose which of the two events
post to it. The URL must be
https. It is stored encrypted and never
shown again; the card reports only whether one is configured.slack_webhook_url out to keep the stored URL, or send "" to remove
it. Turning email on with no recipients, or naming someone who is not a
member, is a 400. Turning email on where the deployment has no mail is a
503 with mail_unavailable: true.
Register a notification destination
A destination receives a message already rendered for one tool. Ask the API what this deployment can deliver to before you start:What each channel needs
secret is the destination’s one credential. url is used only where you
name the host and the credential is separate. config holds the non-secret
settings, as strings.
Three rules catch most first attempts:
- For Slack and Teams the URL is the credential. Send it as
secretand omiturl, so it is stored encrypted. - A
configkey the channel does not use is a400, not an ignored field. siteandregionchoose from a fixed list; they are not hostnames.regionisusoreu.siteis one ofdatadoghq.com,us3.datadoghq.com,us5.datadoghq.com,datadoghq.eu,ap1.datadoghq.comorddog-gov.com.
Create it
The response returns the destination with
configured: true and never the
secret. A name already in use, or a twenty-first destination, is 409.
Confirm it delivers
202: it queues a sample message through the same worker and
the same outbound checks a real one takes. Read the outcome a few seconds
later:
email destination cannot be tested this way (400): its relay is
configured by whoever operates the deployment. A destination that is switched
off is refused the same way.
Change, pause or remove a destination
Replacing a credential takes effect immediately, with no overlap window, and
is never blocked by your plan: a leaked token has to be replaceable whatever
your billing state.
Which destinations close what they open
pagerduty, jira and servicenow create a record keyed to the finding and
close it when the finding is resolved. The other five send a message and
nothing follows it. Integrations overview
explains the difference.
See also
- Step-by-step recipes for Slack, Microsoft Teams, PagerDuty and Jira
- Webhooks: the signed envelope, when you want to write the receiver yourself.
- Verify a webhook signature