Create Webhook

To create a webhook on a given instance, the user must have the following permissions on the instance:

  • Admin
  • Owner
  • Developer

Body: raw JSON

namedescription
scopedResource[string] Required. Scoped Resource refers to the service in which to listen in on webhooks. Possible values are platform or the instance ZUID from where the webhook will listen.
parentResourceZUID[string] Refers to a specific parent resource's ZUID. Note: Required if scopedResource is platform`.
resource[string] Refers to the ZUID or the name of a resource. Note: Required if scopedResource is not platform`.
eventAction[string] Required. The action on the resource which will trigger the webhook.
method[string] Required. The HTTP request method that is made by the webhook.
URL[string] Required. Destination URL for the webhook to send payload to.
contentType[string] Required. The value used to set the HTTP header Content-type for the webhook request
authorization[string] The Bearer token value used to set the HTTP header Auhorization.
body[string] The payload body being sent to the destination URL.

Possible values for scopedResource are:

  • an instance ZUID
  • platform

If scopedResource is platform, value for parentResourceZUID is the instance ZUID the requester has the role to create webhooks:

If scopedResource is an instance ZUID, possible values for parentResourceZUID are:

  • content model ZUID

If scopedResource is an instance ZUID, possible values for resource are:

  • models
  • items
  • publishings
  • fields
  • headtags
  • views
  • stylesheets
  • scripts
  • redirects
  • langs
  • leads
  • or its corresponding ZUIDs

Possible values for eventAction:

  • Create: 1
  • Update: 2
  • Delete: 3
  • Publish: 4
  • Unpublish: 5
  • UndoDelete: 6
  • Alert: 7

Note: After a successful item publishing, if the item's unpublishAt (Go Offline) value was not set to never, meaning it has a date value in the future, both eventAction 4 and 5 will be triggered at the same time.

Possible values for method:

  • POST
  • GET

Possible values for contentType:

  • application/json
  • application/x-www-form-urlencoded
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

Webhook object to create

string
body
object
required
string
required
string
integer
required
string
required
string
string
required
string
required
string
required
Responses

Language
Credentials
Header
LoadingLoading…
Response
Choose an example:
application/json