Webhooks Integration
Security Monitoring is now available Security Monitoring is now available

Webhooks Integration

Configure your Datadog-Webhooks integration directly through the Datadog API. For more information about the Datadog-Webhooks integration, see the integration page.

Create a custom variable

post https://api.datadoghq.comhttps://api.datadoghq.eu/api/v1/integration/webhooks/configuration/custom-variables

Overview

Creates an endpoint with the name <CUSTOM_VARIABLE_NAME>.

Request

Body Data (required)

Define a custom variable request body.

Expand All

Field

Type

Description

is_secret [required]

boolean

Make custom variable is secret or not. If the custom variable is secret, it returns null for the <CUSTOM_VARIABLE_VALUE> in the response payload.

name [required]

string

The name of the webhook. It corresponds with <CUSTOM_VARIABLE_NAME>.

value [required]

string

Value of the custom variable.

{
  "is_secret": true,
  "name": "CUSTOM_VARIABLE_NAME",
  "value": "CUSTOM_VARIABLE_VALUE"
}

Response

OK

Custom variable for Webhook integration.

Expand All

Field

Type

Description

is_secret [required]

boolean

Make custom variable is secret or not. If the custom variable is secret, it returns null for the <CUSTOM_VARIABLE_VALUE> in the response payload.

name [required]

string

The name of the webhook. It corresponds with <CUSTOM_VARIABLE_NAME>.

value [required]

string

Value of the custom variable.

{
  "is_secret": true,
  "name": "CUSTOM_VARIABLE_NAME",
  "value": "CUSTOM_VARIABLE_VALUE"
}

Bad Request

Error response object.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Authentication error

Error response object.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Code Example


                                        # Curl command
curl -X post https://api.datadoghq.comhttps://api.datadoghq.eu/api/v1/integration/webhooks/configuration/custom-variables \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_CLIENT_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_CLIENT_APP_KEY}" \
-d @- << EOF
{
  "is_secret": true,
  "name": "CUSTOM_VARIABLE_NAME",
  "value": "CUSTOM_VARIABLE_VALUE"
}
EOF

                                        

Create a webhooks integration

post https://api.datadoghq.comhttps://api.datadoghq.eu/api/v1/integration/webhooks/configuration/webhooks

Overview

Creates an endpoint with the name <WEBHOOK_NAME>.

Request

Body Data (required)

Create a webhooks integration request body.

Expand All

Field

Type

Description

custom_headers

object

If null, uses no header. If given a JSON payload, these will be headers attached to your webhook.

<any-key>

string

Additional properties for custom headers.

encode_as

enum

Encoding type. Can be given either json or form. Allowed enum values: json,form

name [required]

string

The name of the webhook. It corresponds with <WEBHOOK_NAME>. Learn more on how to use it in monitor notifications.

payload

object

If null, uses the default payload. If given a JSON payload, the webhook returns the payload specified by the given payload. Webhooks variable usage.

url [required]

string

URL of the webhook.

{
  "custom_headers": {
    "<any-key>": "string"
  },
  "encode_as": "string",
  "name": "WEBHOOK_NAME",
  "payload": {},
  "url": "https://example.com/webhook"
}

Response

OK

Datadog-Webhooks integration.

Expand All

Field

Type

Description

custom_headers

object

If null, uses no header. If given a JSON payload, these will be headers attached to your webhook.

<any-key>

string

Additional properties for custom headers.

encode_as

enum

Encoding type. Can be given either json or form. Allowed enum values: json,form

name [required]

string

The name of the webhook. It corresponds with <WEBHOOK_NAME>. Learn more on how to use it in monitor notifications.

payload

object

If null, uses the default payload. If given a JSON payload, the webhook returns the payload specified by the given payload. Webhooks variable usage.

url [required]

string

URL of the webhook.

{
  "custom_headers": {
    "<any-key>": "string"
  },
  "encode_as": "string",
  "name": "WEBHOOK_NAME",
  "payload": {},
  "url": "https://example.com/webhook"
}

Bad Request

Error response object.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Authentication error

Error response object.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Code Example


                                        # Curl command
curl -X post https://api.datadoghq.comhttps://api.datadoghq.eu/api/v1/integration/webhooks/configuration/webhooks \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_CLIENT_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_CLIENT_APP_KEY}" \
-d @- << EOF
{
  "name": "WEBHOOK_NAME",
  "url": "https://example.com/webhook"
}
EOF

                                        

Delete a custom variable

delete https://api.datadoghq.comhttps://api.datadoghq.eu/api/v1/integration/webhooks/configuration/custom-variables/{custom_variable_name}

Overview

Deletes the endpoint with the name <CUSTOM_VARIABLE_NAME>.

Arguments

Path Parameters

Name

Type

Description

custom_variable_name [required]

string

The name of the custom variable.

Response

OK

Authentication error

Error response object.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Item Not Found

Error response object.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Code Example


                                        # Path parameters
export custom_variable_name="CHANGE_ME"
# Curl command curl -X delete https://api.datadoghq.comhttps://api.datadoghq.eu/api/v1/integration/webhooks/configuration/custom-variables/${custom_variable_name} \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_CLIENT_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_CLIENT_APP_KEY}"

Delete a webhook

delete https://api.datadoghq.comhttps://api.datadoghq.eu/api/v1/integration/webhooks/configuration/webhooks/{webhook_name}

Overview

Deletes the endpoint with the name <WEBHOOK NAME>.

Arguments

Path Parameters

Name

Type

Description

webhook_name [required]

string

The name of the webhook.

Response

OK

Authentication error

Error response object.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Item Not Found

Error response object.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Code Example


                                        # Path parameters
export webhook_name="CHANGE_ME"
# Curl command curl -X delete https://api.datadoghq.comhttps://api.datadoghq.eu/api/v1/integration/webhooks/configuration/webhooks/${webhook_name} \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_CLIENT_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_CLIENT_APP_KEY}"

Get a custom variable

get https://api.datadoghq.comhttps://api.datadoghq.eu/api/v1/integration/webhooks/configuration/custom-variables/{custom_variable_name}

Overview

Shows the content of the custom variable with the name <CUSTOM_VARIABLE_NAME>.

If the custom variable is secret, returns null for the <CUSTOM_VARIABLE_VALUE> in the response payload.

Arguments

Path Parameters

Name

Type

Description

custom_variable_name [required]

string

The name of the custom variable.

Response

OK

Custom variable for Webhook integration.

Expand All

Field

Type

Description

is_secret [required]

boolean

Make custom variable is secret or not. If the custom variable is secret, it returns null for the <CUSTOM_VARIABLE_VALUE> in the response payload.

name [required]

string

The name of the webhook. It corresponds with <CUSTOM_VARIABLE_NAME>.

value [required]

string

Value of the custom variable.

{
  "is_secret": true,
  "name": "CUSTOM_VARIABLE_NAME",
  "value": "CUSTOM_VARIABLE_VALUE"
}

Bad Request

Error response object.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Authentication error

Error response object.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Item Not Found

Error response object.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Code Example


                                        # Path parameters
export custom_variable_name="CHANGE_ME"
# Curl command curl -X get https://api.datadoghq.comhttps://api.datadoghq.eu/api/v1/integration/webhooks/configuration/custom-variables/${custom_variable_name} \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_CLIENT_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_CLIENT_APP_KEY}"

Get a webhook integration

get https://api.datadoghq.comhttps://api.datadoghq.eu/api/v1/integration/webhooks/configuration/webhooks/{webhook_name}

Overview

Gets the content of the webhook with the name <WEBHOOK_NAME>.

Arguments

Path Parameters

Name

Type

Description

webhook_name [required]

string

The name of the webhook.

Response

OK

Datadog-Webhooks integration.

Expand All

Field

Type

Description

custom_headers

object

If null, uses no header. If given a JSON payload, these will be headers attached to your webhook.

<any-key>

string

Additional properties for custom headers.

encode_as

enum

Encoding type. Can be given either json or form. Allowed enum values: json,form

name [required]

string

The name of the webhook. It corresponds with <WEBHOOK_NAME>. Learn more on how to use it in monitor notifications.

payload

object

If null, uses the default payload. If given a JSON payload, the webhook returns the payload specified by the given payload. Webhooks variable usage.

url [required]

string

URL of the webhook.

{
  "custom_headers": {
    "<any-key>": "string"
  },
  "encode_as": "string",
  "name": "WEBHOOK_NAME",
  "payload": {},
  "url": "https://example.com/webhook"
}

Bad Request

Error response object.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Authentication error

Error response object.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Item Not Found

Error response object.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Code Example


                                        # Path parameters
export webhook_name="CHANGE_ME"
# Curl command curl -X get https://api.datadoghq.comhttps://api.datadoghq.eu/api/v1/integration/webhooks/configuration/webhooks/${webhook_name} \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_CLIENT_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_CLIENT_APP_KEY}"

Update a custom variable

put https://api.datadoghq.comhttps://api.datadoghq.eu/api/v1/integration/webhooks/configuration/custom-variables/{custom_variable_name}

Overview

Updates the endpoint with the name <CUSTOM_VARIABLE_NAME>.

Arguments

Path Parameters

Name

Type

Description

custom_variable_name [required]

string

The name of the custom variable.

Request

Body Data (required)

Update an existing custom variable request body.

Expand All

Field

Type

Description

is_secret

boolean

Make custom variable is secret or not. If the custom variable is secret, it returns null for the <CUSTOM_VARIABLE_VALUE> in the response payload.

name

string

The name of the webhook. It corresponds with <CUSTOM_VARIABLE_NAME>.

value

string

Value of the custom variable.

{
  "is_secret": false,
  "name": "CUSTOM_VARIABLE_NAME",
  "value": "CUSTOM_VARIABLE_VALUE"
}

Response

OK

Custom variable for Webhook integration.

Expand All

Field

Type

Description

is_secret [required]

boolean

Make custom variable is secret or not. If the custom variable is secret, it returns null for the <CUSTOM_VARIABLE_VALUE> in the response payload.

name [required]

string

The name of the webhook. It corresponds with <CUSTOM_VARIABLE_NAME>.

value [required]

string

Value of the custom variable.

{
  "is_secret": true,
  "name": "CUSTOM_VARIABLE_NAME",
  "value": "CUSTOM_VARIABLE_VALUE"
}

Bad Request

Error response object.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Authentication error

Error response object.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Item Not Found

Error response object.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Code Example


                                        # Path parameters
export custom_variable_name="CHANGE_ME"
# Curl command curl -X put https://api.datadoghq.comhttps://api.datadoghq.eu/api/v1/integration/webhooks/configuration/custom-variables/${custom_variable_name} \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_CLIENT_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_CLIENT_APP_KEY}" \ -d @- << EOF {} EOF

Update a webhook

put https://api.datadoghq.comhttps://api.datadoghq.eu/api/v1/integration/webhooks/configuration/webhooks/{webhook_name}

Overview

Updates the endpoint with the name <WEBHOOK_NAME>.

Arguments

Path Parameters

Name

Type

Description

webhook_name [required]

string

The name of the webhook.

Request

Body Data (required)

Update an existing Datadog-Webhooks integration.

Expand All

Field

Type

Description

custom_headers

object

If null, uses no header. If given a JSON payload, these will be headers attached to your webhook.

<any-key>

string

Additional properties for custom headers.

encode_as

enum

Encoding type. Can be given either json or form. Allowed enum values: json,form

name

string

The name of the webhook. It corresponds with <WEBHOOK_NAME>. Learn more on how to use it in monitor notifications.

payload

object

If null, uses the default payload. If given a JSON payload, the webhook returns the payload specified by the given payload. Webhooks variable usage.

url

string

URL of the webhook.

{
  "custom_headers": {
    "<any-key>": "string"
  },
  "encode_as": "string",
  "name": "WEBHOOK_NAME",
  "payload": {},
  "url": "https://example.com/webhook"
}

Response

OK

Datadog-Webhooks integration.

Expand All

Field

Type

Description

custom_headers

object

If null, uses no header. If given a JSON payload, these will be headers attached to your webhook.

<any-key>

string

Additional properties for custom headers.

encode_as

enum

Encoding type. Can be given either json or form. Allowed enum values: json,form

name [required]

string

The name of the webhook. It corresponds with <WEBHOOK_NAME>. Learn more on how to use it in monitor notifications.

payload

object

If null, uses the default payload. If given a JSON payload, the webhook returns the payload specified by the given payload. Webhooks variable usage.

url [required]

string

URL of the webhook.

{
  "custom_headers": {
    "<any-key>": "string"
  },
  "encode_as": "string",
  "name": "WEBHOOK_NAME",
  "payload": {},
  "url": "https://example.com/webhook"
}

Bad Request

Error response object.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Authentication error

Error response object.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Item Not Found

Error response object.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Code Example


                                        # Path parameters
export webhook_name="CHANGE_ME"
# Curl command curl -X put https://api.datadoghq.comhttps://api.datadoghq.eu/api/v1/integration/webhooks/configuration/webhooks/${webhook_name} \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_CLIENT_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_CLIENT_APP_KEY}" \ -d @- << EOF {} EOF