---
title: "Create a custom variable"
method: POST
path: "/api/v1/integration/webhooks/configuration/custom-variables"
tags: ["Webhooks Integration"]
---

# Create a custom variable

`POST /api/v1/integration/webhooks/configuration/custom-variables`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v1/integration/webhooks/configuration/custom-variables`
- Auth: API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`

Creates an endpoint with the name `<CUSTOM_VARIABLE_NAME>`.

## Request body

- WebhooksIntegrationCustomVariable: Custom variable for Webhook integration.
  - `is_secret` boolean, required: Make custom variable is secret or not. If the custom variable is secret, the value is not returned in the response payload.
  - `name` string, required: The name of the variable. It corresponds with `<CUSTOM_VARIABLE_NAME>`.
  - `value` string, required: Value of the custom variable.

## Response `201`

OK

- WebhooksIntegrationCustomVariableResponse: Custom variable for Webhook integration.
  - `is_secret` boolean, required: Make custom variable is secret or not. If the custom variable is secret, the value is not returned in the response payload.
  - `name` string, required: The name of the variable. It corresponds with `<CUSTOM_VARIABLE_NAME>`. It must only contains upper-case characters, integers or underscores.
  - `value` string: Value of the custom variable. It won't be returned if the variable is secret.

## Other responses

- `400`: Bad Request
- `403`: Authentication error
- `429`: Too many requests

---

[API](https://skmtc.dev/datadog/apis/datadog-api-v1-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v1-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v1-collection/revisions/ca5871004d26?raw)
