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

# Create Advanced Webhook Endpoint

Use this API to create a new webhook delivery endpoint for a workspace.

<Info>
  This endpoint uses **API-key-level auth**: pass `x-velt-api-key` and `x-velt-auth-token` as headers. You can obtain these from the [Get Auth Tokens](/api-reference/rest-apis/v2/workspace/authtokens-get) endpoint.
</Info>

<Note>
  Advanced webhooks must be enabled for the workspace first via [Update Advanced Webhook Config](/api-reference/rest-apis/v2/workspace/advancedwebhookconfig-update) with `{ "isEnabled": true }`. Otherwise this endpoint returns a `FAILED_PRECONDITION` error.
</Note>

<Note>
  **Signing secret.** The endpoint's signing secret is always generated server-side — it is never accepted from the request. Retrieve it after creation via [Get Advanced Webhook Endpoint Secret](/api-reference/rest-apis/v2/workspace/advancedwebhook-endpoints-secret-get) and use it to verify webhook payload signatures.
</Note>

# Endpoint

`POST https://api.velt.dev/v2/workspace/advancedwebhook/endpoints/create`

# Headers

<ParamField header="x-velt-api-key" type="string" required>
  Your API key.
</ParamField>

<ParamField header="x-velt-auth-token" type="string" required>
  Your [Auth Token](/security/auth-tokens).
</ParamField>

# Body

#### Params

<ParamField body="data" type="object" required>
  <Expandable title="properties">
    <ParamField body="url" type="string" required>
      The URL that will receive webhook events. Must be a valid `http(s)` URL.
    </ParamField>

    <ParamField body="description" type="string">
      Human-readable description of the endpoint.
    </ParamField>

    <ParamField body="filterTypes" type="string[]">
      Event types this endpoint subscribes to (e.g. `["comment.add", "comment.update"]`). If omitted, the endpoint receives all event types. Must be a non-empty array when provided. See [Webhooks](/webhooks/advanced) for the full list of event types.
    </ParamField>

    <ParamField body="channels" type="string[]">
      Channels this endpoint listens to. If omitted, the endpoint receives events from all channels. Must be a non-empty array when provided.
    </ParamField>

    <ParamField body="disabled" type="boolean">
      Whether the endpoint is created in a disabled state. Defaults to `false`.
    </ParamField>

    <ParamField body="rateLimit" type="number">
      Maximum deliveries per second for this endpoint. Positive integer.
    </ParamField>

    <ParamField body="uid" type="string">
      Optional unique identifier you can assign to the endpoint.
    </ParamField>

    <ParamField body="metadata" type="object">
      Key-value pairs (string values) attached to the endpoint.
    </ParamField>
  </Expandable>
</ParamField>

# Example Request

```JSON theme={null}
{
  "data": {
    "url": "https://example.com/webhooks/velt",
    "description": "Primary endpoint",
    "filterTypes": ["comment.add", "comment.update"]
  }
}
```

# Example Response

#### Success Response

```JSON theme={null}
{
  "result": {
    "status": "success",
    "message": "Advanced webhook endpoint created successfully.",
    "data": {
      "id": "ep_2vK9mPzGqLxYwBnRtCdHsJfAeUo",
      "url": "https://example.com/webhooks/velt",
      "description": "Primary endpoint",
      "filterTypes": ["comment.add", "comment.update"],
      "channels": null,
      "disabled": false,
      "rateLimit": null,
      "uid": null,
      "createdAt": "2026-06-01T10:15:30.000Z",
      "updatedAt": "2026-06-01T10:15:30.000Z"
    }
  }
}
```

#### Failure Response

```JSON theme={null}
{
  "error": {
    "status": "INVALID_ARGUMENT",
    "message": "url must be a valid http(s) URL."
  }
}
```

#### Failure Response (advanced webhooks disabled)

```JSON theme={null}
{
  "error": {
    "status": "FAILED_PRECONDITION",
    "message": "Advanced webhooks are disabled for this workspace. Enable them via POST /v2/workspace/advancedwebhookconfig/update with { \"isEnabled\": true }."
  }
}
```

<ResponseExample>
  ```js theme={null}
  {
    "result": {
      "status": "success",
      "message": "Advanced webhook endpoint created successfully.",
      "data": {
        "id": "ep_2vK9mPzGqLxYwBnRtCdHsJfAeUo",
        "url": "https://example.com/webhooks/velt",
        "description": "Primary endpoint",
        "filterTypes": ["comment.add", "comment.update"],
        "channels": null,
        "disabled": false,
        "rateLimit": null,
        "uid": null,
        "createdAt": "2026-06-01T10:15:30.000Z",
        "updatedAt": "2026-06-01T10:15:30.000Z"
      }
    }
  }
  ```
</ResponseExample>
