Skip to main content

events_transports_create

POST 

/api/v3//events/transports/

NotificationTransport Viewset

Request

Bodyrequired

    namestringrequired

    Possible values: non-empty

    modeNotificationTransportModeEnum (string)

    Possible values: [local, webhook, webhook_slack, email]

    webhook_urluri
    webhook_mapping_bodyuuidnullable

    Customize the body of the request. Mapping should return data that is JSON-serializable.

    webhook_mapping_headersuuidnullable

    Configure additional headers to be sent. Mapping should return a dictionary of key-value pairs

    send_onceboolean

    Only send notification once, for example when sending a webhook into a chat channel.

Responses

Schema
    pkuuidrequired
    namestringrequired
    modeNotificationTransportModeEnum (string)

    Possible values: [local, webhook, webhook_slack, email]

    mode_verbosestringrequired

    Return selected mode with a UI Label

    webhook_urluri
    webhook_mapping_bodyuuidnullable

    Customize the body of the request. Mapping should return data that is JSON-serializable.

    webhook_mapping_headersuuidnullable

    Configure additional headers to be sent. Mapping should return a dictionary of key-value pairs

    send_onceboolean

    Only send notification once, for example when sending a webhook into a chat channel.

Authorization: http

name: authentiktype: httpscheme: bearer
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "/api/v3/events/transports/");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var content = new StringContent("{\n \"name\": \"string\",\n \"mode\": \"local\",\n \"webhook_url\": \"string\",\n \"webhook_mapping_body\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"webhook_mapping_headers\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"send_once\": true\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Request Collapse all
Base URL
/api/v3
Auth
Body required
{
  "name": "string",
  "mode": "local",
  "webhook_url": "string",
  "webhook_mapping_body": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "webhook_mapping_headers": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "send_once": true
}