Create a new webhook subscription
Register a new webhook subscription to receive events.
POST
/subscriptions
curl \
--request POST 'http://localhost:8080/subscriptions' \
--header "Content-Type: application/json" \
--data '{"secret":"mysecret","target_url":"https://webhook.site/your-url","event_types":"order.created,user.updated"}'
Request example
{
"secret": "mysecret",
"target_url": "https://webhook.site/your-url",
"event_types": "order.created,user.updated"
}
Response examples (201)
{
"id": "string"
}
Response examples (400)
{
"error": "string"
}
Response examples (500)
{
"error": "string"
}