Skip to main content
POST
Create Hook

Authorizations

Authorization
string
header
required

Enter your API key as the username. Leave the password field blank. Example: curl -u YOUR_API_KEY: https://api.xplenty.com/...

Headers

Accept
string
default:application/vnd.xplenty+json; version=2
required

API version header — required on all requests

Body

application/json
type
string
required
name
string
required
settings
object
required

Hook-type-specific settings (e.g., URL for web hooks)

events
string[]
required

Events to subscribe to

active
boolean
default:true
filter_package_ids
integer[]

Optional list of package IDs to scope the hook to. Omit or send an empty array to fire for every package in the account. IDs must belong to the same account as the hook.

filter_workspace_ids
integer[]

Optional list of package group IDs to scope the hook to. Events from any package in these package groups trigger the hook. IDs must belong to the same account as the hook.

Response

201 - application/vnd.xplenty+json; version=2

Hook created

id
integer
type
string
name
string
active
boolean
settings
object
events
string[]
filters
object

Active scope for this hook. When both ID arrays are empty, the hook fires for every event in the account.

salt
string
created_at
string<date-time>
updated_at
string<date-time>
url
string<uri>