Webhooks

Create webhook consumer

Use the Create webhook consumer endpoint to create a new webhook consumer that will listen to messages we send you.

Webhook consumer is an HTTP endpoint that you configure to subscribe to specific events. See our documentation for more details on Codat's webhook service.

Tips and traps

  • The number of webhook consumers you can create is limited to 50. If you have reached the maximum number of consumers, use the Delete webhook consumer endpoint to delete an unused consumer first.
post/webhooks

Request body

WebhookConsumerPrototype required— unresolved $ref

Response

OK

idstring uuid

Unique identifier for the webhook consumer.

urlstring uri

The URL that will consume webhook events dispatched by Codat.

disabledboolean nullable

Flag that enables or disables the endpoint from receiving events. Disabled when set to true.

eventTypesstring[]

An array of event types the webhook consumer subscribes to.

companyIdstring uuid nullable

Unique identifier of the company to indicate company-specific events. The associated webhook consumer will receive events only for the specified ID.

Example response

{
  "id": "8a210b68-6988-11ed-a1eb-0242ac120002",
  "companyId": "8a210b68-6988-11ed-a1eb-0242ac120002"
}

Changes