Destinations

Create a destination

Changed on

Creates an HTTP destination for organization event notifications. You can create up to 50 destinations for an organization. The response includes the signing secret. Save it when you create the destination; later responses do not include it.

post/v1/notifications/destinations

Request

  • Base URL
    https://global.api.konghq.com
  • Auth
    • HTTP bearer
    • or HTTP bearer
    • or HTTP bearer
    • or HTTP bearer

Request body

DestinationCreatePayload required
name, string required

Destination name. The name must contain 1 to 255 characters after leading and trailing spaces are removed.

type, 'http' required
url, string required

Full URL of the endpoint that receives notifications. Must be a publicly resolvable address.

custom_headers, object

Custom headers to include in notification requests. You can set up to 10 headers. The Standard Webhooks headers and the transport headers are reserved.

Example request

{
  "name": "Production webhooks",
  "type": "http",
  "url": "https://example.com/webhooks",
  "custom_headers": {
    "X-Environment": "production"
  }
}

Response

A single http destination with its new signing secret.

DestinationWithSecret required

An HTTP destination with its new plaintext signing secret. The signing secret is returned only when a destination is created.

id, string required

UUID v7 identifier of the destination.

name, string required

Name of the destination.

type, 'http' required
state, 'pending_verification' | 'enabled' | 'disabled' | 'disabled_system' required

Destination status. pending_verification means the destination is waiting for verification; enabled means it can receive notifications; disabled means it is paused; disabled_system means it was disabled automatically.

url, string

Endpoint URL of the destination.

url_host, string

Host part of the target URL.

custom_header_names, string[]

Names of the configured custom headers. Header values are not returned.

last_success_at, string date-time

Time of the most recent successful notification delivery, if any.

last_failure_at, string date-time

Time of the most recent failed notification delivery, if any.

last_failure_reason, string

Reason for the most recent failed notification delivery, if any.

created_at, string date-time required

An ISO-8601 timestamp representation of entity creation date.

updated_at, string date-time required

An ISO-8601 timestamp representation of entity update date.

signing_algo, 'hmac-sha256' | 'ed25519'

Signing algorithm of the signing key.

verified_at, string date-time

Time when the destination was verified, if verification is complete.

signing_secret, string

Secret used to verify that an HTTP notification was sent by Kong.

Example response

{
  "created_at": "2022-11-04T20:10:06.927Z",
  "updated_at": "2022-11-04T20:10:06.927Z"
}

Changes