---
title: "Subscribe to a webhook"
method: POST
path: "/webhook_subscriptions"
tags: ["Webhook subscriptions"]
---

# Subscribe to a webhook

`POST /webhook_subscriptions`

## Request

- Base URL: `https://api.sandbox.monite.com/v1`
- URL: `https://api.sandbox.monite.com/v1/webhook_subscriptions`
- Auth: HTTP bearer

Related guide: [Webhooks](https://docs.monite.com/references/webhooks/index).

## Headers

- `x-monite-version` string, required

## Request body

- object
  - `event_types` string[]: A list of [events](https://docs.monite.com/references/webhooks/index#events) to subscribe to. If set to an empty array, the subscription includes all events triggered by the specified `object_type`.
  - `object_type` 'account' | 'accounting_connection' | 'approval' | 'approval_request' | 'approval_policy' | 'approval_policy_process' | 'batch_payment' | 'comment' | 'counterpart' | 'counterpart_address' | 'counterpart_bank_account' | 'counterpart_contact_person' | 'counterpart_partner_metadata' | 'counterpart_tax_id' | 'entity' | 'entity_bank_account' | 'entity_settings' | 'entity_user' | 'export' | 'overdue_reminder' | 'partner_settings' | 'payable' | 'payables_credit_note' | 'payables_purchase_order' | 'payable.line_item' | 'payment' | 'payment_intent' | 'payment_link' | 'payment_reminder' | 'product' | 'project' | 'receivable' | 'recurrence' | 'role' | 'tag' | 'todo_task' | 'workflow' | 'workflow_pipeline' | 'ocr_task' | 'delivery_note' | 'receipt' | 'transaction', required
  - `url` string, uri, required: An HTTPS URL to which Monite will send webhooks. This URL must be accessible over the public Internet, accept POST requests, and respond with status code 200. It must be a direct URL (no redirects). The same URL can be used by multiple webhook subscriptions.

## Response `201`

Successful Response

- WebhookSubscriptionResourceWithSecret
  - `id` string, uuid, required: A unique URL assigned to this webhook subscription. This ID is also included in the webhook data as the `webhook_subscription_id` field.
  - `event_types` string[], required: [Events](https://docs.monite.com/references/webhooks/index#events) included in this webhook subscription. An empty array means the subscription includes all events triggered by the specified `object_type`.
  - `object_type` 'account' | 'accounting_connection' | 'approval' | 'approval_request' | 'approval_policy' | 'approval_policy_process' | 'batch_payment' | 'comment' | 'counterpart' | 'counterpart_address' | 'counterpart_bank_account' | 'counterpart_contact_person' | 'counterpart_partner_metadata' | 'counterpart_tax_id' | 'entity' | 'entity_bank_account' | 'entity_settings' | 'entity_user' | 'export' | 'overdue_reminder' | 'partner_settings' | 'payable' | 'payables_credit_note' | 'payables_purchase_order' | 'payable.line_item' | 'payment' | 'payment_intent' | 'payment_link' | 'payment_reminder' | 'product' | 'project' | 'receivable' | 'recurrence' | 'role' | 'tag' | 'todo_task' | 'workflow' | 'workflow_pipeline' | 'ocr_task' | 'delivery_note' | 'receipt' | 'transaction', required
  - `secret` string, required: The webhook signing secret for this subscriptions. You can use it to [verify webhook signatures](https://docs.monite.com/references/webhooks/signatures).
  - `status` 'enabled' | 'disabled', required
  - `url` string, uri, required: URL to which the webhooks are sent. The same URL can be used by multiple webhook subscriptions.

## Other responses

- `401`: The `Authorization` header is missing or contains an invalid or expired access token. See [Authentication](https://docs.monite.com/api/concepts/authentication) to learn how to authenticate API calls.
- `422`: Validation Error
- `429`: API rate limit has been exceeded. Check the response headers for the rate limit information.

---

[API](https://skmtc.dev/monite/apis/monite-2.md) - [All operations](https://skmtc.dev/monite/apis/monite-2/llms.txt) - [OpenAPI document](https://skmtc.dev/monite/apis/monite-2/revisions/4299ccf95edb?raw)
