Spoar
Alerts

Sync alert targets

PUT
/v2/projects/{project}/alerts/targets

Makes the project's targets match the list: adds what is missing, updates what changed and removes what is not listed, so sending it twice changes nothing. name defaults to the channel, on to every issue event and enabled to true. secrets holds the signing secret of each new webhook target, shown only here and after rotate. A channel the deployment does not enable answers VALIDATION_FAILED.

Authorization

AuthorizationBearer <token>

An API token from POST /v2/tokens (at_live_...), or a project's secret key (sk_...) for server-side ingest.

In: header

Path Parameters

project*string

The project id, as listed by GET /v2/projects.

Length1 <= length

Request Body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/v2/projects/string/alerts/targets" \  -H "Content-Type: application/json" \  -d '{    "targets": [      {        "channel": "mail",        "to": [          "user@example.com"        ]      }    ]  }'
{  "data": {    "created": [      "string"    ],    "updated": [      "string"    ],    "removed": [      "string"    ],    "secrets": {}  }}