> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vartiq.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Webhook

### Body Parameters

**appId** `string`

The ID of the app to create the webhook for.\\

Required for webhooks in an app. Not required for global webhooks.

**projectId** `string`

The ID of the app to create the webhook for.\\

Required for global webhooks.

**url** `string` *required*

The URL where webhook events will be sent

**customHeaders** `array`

Array of custom headers to be sent with the webhook

**Custom Header Object**

**key** `string` *required*

Header key

**value** `string` *required*

Header value

**authMethod** `string`

Authentication method for the webhook. Must be one of: "basic", "hmac", or "apiKey"

**userName** `string`

Username for basic authentication (required if authMethod is "basic")

**password** `string`

Password for basic authentication (required if authMethod is "basic")

**apiKey** `string`

API key for apiKey authentication (required if authMethod is "apiKey")

**apiKeyHeader** `string`

Header name for the API key (required if authMethod is "apiKey")

**hmacHeader** `string`

Header name for the HMAC signature (required if authMethod is "hmac")

**hmacSecret** `string`

Secret for HMAC signature generation (required if authMethod is "hmac")

### Response

**success** `boolean`

Indicates if the request was successful

**message** `string`

A message describing the result of the operation

**data** `object`

The created webhook object

**Properties**

**id** `string`

Unique identifier for the webhook

**name** `string`

Name of the webhook

**url** `string`

URL where webhook events will be sent

**customHeaders** `array`

Array of custom headers

**Header Object**

**key** `string`

Header key

**value** `string`

Header value

**headers** `array`

Array of default headers

**Header Object**

**key** `string`

Header key

**value** `string`

Header value

**authMethod** `object`

Authentication method configuration

**Properties**

**method** `string`

Authentication method type (hmac, api\_key, or basic)

**hmacHeader** `string`

Custom header name for HMAC signature (if method is hmac)

**hmacSecret** `string`

Secret used for HMAC signature generation (if method is hmac)

**apiKey** `string`

API key value (if method is api\_key)

**apiKeyHeader** `string`

Custom header name for API key (if method is api\_key)

**userName** `string`

Username for basic authentication (if method is basic)

**password** `string`

Password for basic authentication (if method is basic)

**createdAt** `string`

Timestamp when the webhook was created

**updatedAt** `string`

Timestamp when the webhook was last updated

### Response Example

```json theme={null}
{
  "success": true,
  "message": "Webhook created successfully",
  "data": {
    "id": "wh_01JT39DVQGKA1RV4QNJ1VFRNW2",
    "name": "heelo",
    "url": "https://exp.com",
    "secret": "01JT39DVQJW3A49TR3XXFVM939",
    "customHeaders": [
      {
        "key": "x-app",
        "value": "x-value"
      }
    ],
    "headers": [
      {
        "key": "Content-Type",
        "value": "application/json"
      }
    ],
    "authMethod": {
      "hmacHeader": "x-Vartiq-signature",
      "hmacSecret": "uPvKnaxMwD1gHs1uFNJh-UEn3D5ha5WZcS3WTMVUExY",
      "method": "hmac"
    },
    "createdAt": "2025-04-30T12:06:00.703Z",
    "updatedAt": "2025-04-30T12:06:00.703Z"
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.