---
title: "Create a webhook endpoint"
method: POST
path: "/webhooks"
---

# Create a webhook endpoint

`POST /webhooks`

Subscribes to one or more events, the target url of the webhook must be unique for the account.

## Request body

- object
  - `name` string — A name that identifies this subscription. This name will be sent on the notification JSON payload.
  - `url` string — Target URL where notification JSON payloads will be POSTed.
  - `secret` string — A secret only know by the user and TravelPerk. This secret will be used to sign the payload and send it in the `Tk-Signature` header.
  - `events` string[] — A list of event names to which the user is subscribing to.

## Response `200`

200

- object
  - `id` string
  - `name` string
  - `url` string
  - `secret` string
  - `status` string
  - `events` string[]
  - `successfully_sent` integer
  - `failed_sent` integer
  - `error_rate` integer

## Other responses

- `400` — 400
- `409` — 409

---

[API](https://skmtc.net/perk/apis/travelperk-api-v1.md) · [All operations](https://skmtc.net/perk/apis/travelperk-api-v1/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/perk/travelperk-api-v1/versions/6aa8bfa82514/schema)
