---
title: "Create a webhook for a sub-merchant"
method: POST
path: "/v2/accounts/{account_id}/webhooks"
tags: ["Partner Webhooks"]
---

# Create a webhook for a sub-merchant

`POST /v2/accounts/{account_id}/webhooks`

Create a webhook to receive events for a sub-merchant account. Maximum 30 webhooks per account. Authentication: OAuth access_token.

## Path parameters

- `account_id` string, required

## Request body

- object
  - `url` string, required
  - `alert_email` string
  - `secret` string
  - `active` boolean
  - `events` object, required

## Response `200`

Webhook created

- PartnerWebhook — A webhook configured for a sub-merchant account via the Partners API. Maximum 30 webhooks per account.
  - `id` string — Webhook ID, max 14 characters
  - `entity` 'webhook'
  - `owner_id` string
  - `owner_type` string
  - `url` string — HTTPS URL to receive webhook events
  - `alert_email` string
  - `secret` string — Shared secret for HMAC verification (write-only)
  - `secret_exists` boolean
  - `active` boolean
  - `events` object — Map of event names to boolean
  - `service` string
  - `context` string[]
  - `disabled_at` integer
  - `created_at` integer
  - `updated_at` integer

## Other responses

- `400` — Bad request. Invalid parameters or missing required fields.
- `401` — Authentication failed. Invalid or missing API key credentials.
- `429` — Rate limit exceeded. Implement exponential backoff with jitter before retrying.
- `500` — Internal server error.

---

[API](https://skmtc.net/curlec/apis/razorpay-api.md) · [All operations](https://skmtc.net/curlec/apis/razorpay-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/curlec/razorpay-api/versions/824ca9e6faef/schema)
