---
title: "Register a new webhook endpoint"
method: POST
path: "/v2/otp/webhooks"
tags: ["otp-webhooks-v2"]
---

# Register a new webhook endpoint

`POST /v2/otp/webhooks`

## Request

- Base URL: `https://api.tracklysms.com/api`
- URL: `https://api.tracklysms.com/api/v2/otp/webhooks`
- Auth: API key in header `X-Api-Key`

## Request body

- OTPWebhookCreate
  - `events` string[]: Event types to subscribe to (defaults to all)
  - `url` string, required: HTTPS URL to receive webhook events

## Response `201`

Webhook created

- OTPWebhookCreateResponse
  - `autoPaused` boolean: Whether auto-paused due to failures
  - `consecutiveFailures` integer: Current consecutive failure streak
  - `createdAt` string: ISO 8601 creation timestamp
  - `events` string[]: Subscribed event types
  - `failureCount` integer: Total delivery failures
  - `hasSecret` boolean: Whether a signing secret is configured
  - `id` string: Webhook endpoint ID
  - `status` string: active, paused, or failed
  - `url` string: Registered URL
  - `secret` string: HMAC signing secret (shown only on creation)

---

[API](https://skmtc.dev/tracklysms/apis/trackly-sms-api.md) · [All operations](https://skmtc.dev/tracklysms/apis/trackly-sms-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tracklysms/apis/trackly-sms-api/revisions/ac1ad22cb2a9?raw)
