Pular para o conteúdo principal
POST
Core - Create email notifier
Guia relacionado: guia de Notifiers. Consulte o guia de Notifiers para um passo a passo com exemplos.

Autorizações

Authorization
string
header
obrigatório

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Corpo

application/json

Create notifier request. project_id, display_name, and type are always required. The destination field required by type is captured in oneOf.

type
enum<string>
obrigatório

Required. Destination type. Use NOTIFIER_TYPE_EMAIL, NOTIFIER_TYPE_SLACK_WEBHOOK, or NOTIFIER_TYPE_WEBHOOK.

Opções disponíveis:
NOTIFIER_TYPE_EMAIL
Exemplo:

"NOTIFIER_TYPE_SLACK_WEBHOOK"

emails
string[]
obrigatório

Required when type is NOTIFIER_TYPE_EMAIL. Omit for other notifier types.

display_name
string
obrigatório

Required. Human-readable notifier name.

Exemplo:

"Deployment alerts"

project_id
string

Optional. Workspace-scoped callers may set this to create a project-scoped notifier, or omit it for a workspace-wide notifier. Project-scoped API keys create in the API key's project.

metadata
object

Optional. Custom JSON metadata stored with the notifier.

incoming_webhook_url
string

Required when type is NOTIFIER_TYPE_SLACK_WEBHOOK. Omit for other notifier types.

Exemplo:

"https://hooks.slack.com/services/T0000/B0000/example-token"

webhook_url
string

Required when type is NOTIFIER_TYPE_WEBHOOK. Omit for other notifier types.

headers
object

Optional generic webhook headers. Each value may be a string or { "secret": true, "value": "..." }.

Resposta

OK

notifier
Email notifier · object
obrigatório

Notifier resource. The destination field present on the resource depends on type and is captured in oneOf.