---
title: "Add a forwarding destination, optionally with its rule"
method: POST
path: "/v1/endpoints/{id}/destinations"
---

# Add a forwarding destination, optionally with its rule

`POST /v1/endpoints/{id}/destinations`

## Request

- Base URL: `https://webhook-studio.com`
- URL: `https://webhook-studio.com/v1/endpoints/{id}/destinations`
- Auth: HTTP bearer

## Request body

- object
  - `url` string, required
  - `name` string
  - `forward_all` boolean: Forward every future event.
  - `condition_tree` object: A condition group { op: "AND"|"OR", children: [...] } or a leaf { field, operator, value? }, nested arbitrarily. field is "body.<dot.path>", "header.<name>" or "meta.<key>". operator is equals|not_equals|contains|exists|regex; all but exists require value. An empty AND group matches every event.
  - `rule_name` string

## Response `201`

Created

## Other responses

- `400`: Error
- `401`: Error
- `404`: Error

---

[API](https://skmtc.dev/webhook-studio/apis/webhook-studio-api.md) · [All operations](https://skmtc.dev/webhook-studio/apis/webhook-studio-api/llms.txt) · [OpenAPI document](https://skmtc.dev/webhook-studio/apis/webhook-studio-api/revisions/99d81099e6d6?raw)
