Skip to main content
POST
/
hooks
Create Hook
curl --request POST \
  --url https://api.xplenty.com/{account_id}/api/hooks \
  --header 'Accept: <accept>' \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "type": "<string>",
  "name": "<string>",
  "settings": {},
  "events": [
    "<string>"
  ],
  "active": true
}
'
{
  "id": 123,
  "type": "<string>",
  "name": "<string>",
  "active": true,
  "settings": {},
  "events": [
    "<string>"
  ],
  "salt": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "url": "<string>"
}

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

Response

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

Hook created

id
integer
type
string
name
string
active
boolean
settings
object
events
string[]
salt
string
created_at
string<date-time>
updated_at
string<date-time>
url
string<uri>
Last modified on April 20, 2026