Notification targets

Create notification target

POST
/workspaces/{workspaceId}/notification-targets

Authorization

API key Alerts: write
AuthorizationBearer <token>

API key (sf_...) with any of the required scopes. Generate it in the Spotflow portal on the settings page.

In: header

Scope: Alerts: write

Path Parameters

workspaceId*string
Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

name*string
type*"Email"

Value in

  • "Email"
emailAddresses?null|array<string>

Response Body

application/json

application/problem+json

curl -X POST "https://example.com/workspaces/00000000-0000-0000-0000-000000000001/notification-targets" \  -H "Content-Type: application/json" \  -d '{    "name": "On-call e-mail",    "type": "Email",    "emailAddresses": [      "on-call@example.com",      "platform-team@example.com"    ]  }'

Created notification target.

{  "id": "n4Tg81vBz6Rw",  "name": "On-call e-mail",  "type": "Email",  "state": "Enabled",  "emailAddresses": [    "on-call@example.com",    "platform-team@example.com"  ],  "alertRuleCount": 0}