Spoar
Alerts

Set one alert target

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

Creates or replaces the target named in the path.

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
name*string

The target's name within the project, used in its paths; defaults to the channel name.

Match^[a-z0-9][a-z0-9-]*$
Length1 <= length <= 40

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/string" \  -H "Content-Type: application/json" \  -d '{    "channel": "mail",    "to": [      "user@example.com"    ]  }'
{  "data": {    "created": [      "string"    ],    "updated": [      "string"    ],    "removed": [      "string"    ],    "secrets": {}  }}