For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
API StatusPartner Portal
HomeGuidesAPI ExplorerSDKsGitHubSupport
HomeGuidesAPI ExplorerSDKsGitHubSupport
  • API Concepts
    • Overview
    • Environments and URLs
    • Authentication
    • API versioning
    • Rate limiting
    • HTTP headers
    • Pagination, sorting, and filtering
  • General
      • GETGet webhook subscriptions
      • POSTSubscribe to a webhook
      • GETGet a webhook subscription
      • DELDelete a webhook subscription
      • PATCHUpdate a webhook subscription
      • POSTDisable a webhook subscription
      • POSTEnable a webhook subscription
      • POSTRegenerate a webhook secret and return the new webhook subscription
  • Common
  • Accounts payable
  • Accounts receivable
  • E-invoicing
  • Payments
  • Accounting integration
  • Expense management
  • Utilities
LogoLogo
API StatusPartner Portal
GeneralWebhook subscriptions

Subscribe to a webhook

POST
/webhook_subscriptions
POST
/v1/webhook_subscriptions
$curl -X POST https://api.sandbox.monite.com/v1/webhook_subscriptions \
> -H "x-monite-version: 2024-05-25" \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "object_type": "entity",
> "url": "https://example.com/your-webhook-listener",
> "event_types": [
> "created",
> "onboarding_requirements.updated",
> "onboarding_requirements.status_updated"
> ]
>}'
1{
2 "id": "id",
3 "event_types": [
4 "created",
5 "onboarding_requirements.updated",
6 "onboarding_requirements.status_updated"
7 ],
8 "object_type": "account",
9 "secret": "whsec_Iw3mr...",
10 "status": "enabled",
11 "url": "https://example.com/your-webhook-listener"
12}
Related guide: [Webhooks](https://docs.monite.com/references/webhooks/index).
Was this page helpful?
Previous

Get a webhook subscription

Next
Built with

Related guide: Webhooks.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Headers

x-monite-versionstringRequired

Request

This endpoint expects an object.
object_typeenumRequired
The [object type](https://docs.monite.com/references/webhooks/index#events) to whose events you want to subscribe. To subscribe to events from multiple object types, create a separate subscription for each object type.
urlstringRequiredformat: "uri"1-2083 characters

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.

event_typeslist of stringsOptional
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`.

Response

Successful Response
idstringformat: "uuid"

A unique URL assigned to this webhook subscription. This ID is also included in the webhook data as the webhook_subscription_id field.

event_typeslist of strings

Events included in this webhook subscription. An empty array means the subscription includes all events triggered by the specified object_type.

object_typeenum
The object type associated with this webhook subscription.
secretstring

The webhook signing secret for this subscriptions. You can use it to verify webhook signatures.

statusenum
Allowed values:
urlstringformat: "uri"1-2083 characters
URL to which the webhooks are sent. The same URL can be used by multiple webhook subscriptions.

Errors

401
Post Webhook Subscriptions Request Unauthorized Error
422
Post Webhook Subscriptions Request Unprocessable Entity Error
429
Post Webhook Subscriptions Request Too Many Requests Error

The object type to whose events you want to subscribe.

To subscribe to events from multiple object types, create a separate subscription for each object type.

A list of events to subscribe to. If set to an empty array, the subscription includes all events triggered by the specified object_type.