Skip to content

Register a webhook endpoint

POST
/v1/webhooks
curl --request POST \
--url https://api.pixonaut.app/v1/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "eventTypes": [ "design.committed", "order.status_changed" ], "url": "https://shop.acme.example/wp-json/pixonaut/v1/webhook" }'

Operation ID: webhookEndpoints.create

Media typeapplication/json
object
eventTypes
Array<string>
default:
url
required
string

Examples

Exampleexample

Example

{
"eventTypes": [
"design.committed",
"order.status_changed"
],
"url": "https://shop.acme.example/wp-json/pixonaut/v1/webhook"
}

The endpoint, and its signing secret, shown this once

Media typeapplication/json
object
endpointId
required
string
secret
required
string

Examples

Exampleexample

Example

{
"endpointId": "wh_5f2a9c1d7e3b4a6f8c0d2e4a",
"secret": "Qm9vdHN0cmFwLXNpZ25pbmctc2VjcmV0LWV4YW1wbGU"
}
X-Request-Id
required
string

Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.

Refused: invalid_url, invalid_event_type, invalid_input

Media typeapplication/json
object
error
required
string
type

Always sent with invalid_event_type.

string

Examples

invalid_event_type

{
"error": "invalid_event_type",
"type": "string"
}
X-Request-Id
required
string

Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.

Refused: unauthorized

Media typeapplication/json
object
error
required
string

Examples

Exampleunauthorized

unauthorized

{
"error": "unauthorized"
}
X-Request-Id
required
string

Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.

Refused: origin_forbidden, forbidden, feature_disabled

Media typeapplication/json
object
error
required
string
feature

The feature the tenant does not have. Always sent with feature_disabled.

string

Examples

feature_disabled

{
"error": "feature_disabled",
"feature": "api"
}
X-Request-Id
required
string

Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.

Refused: payload_too_large

Media typeapplication/json
object
bytes
number
error
required
string
maxBytes

Always sent with payload_too_large.

number

Examples

Examplepayload_too_large

payload_too_large

{
"error": "payload_too_large",
"maxBytes": 0
}
X-Request-Id
required
string

Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.

Refused: db_error. A request that failed unexpectedly answers as text instead.

object
error
required
string

Examples

Exampledb_error

db_error

{
"error": "db_error"
}
X-Request-Id
required
string

Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.

Questions? Write to [email protected].

Status · Terms of service · Privacy policy · Subprocessors