# Create webhook Registers a new webhook for event notifications. Endpoint: POST /webhooks Version: 1.0 ## Header parameters: - `x-api-key` (string, required) Api key provided on integrations tab in Easyflow platform. - `x-api-secret` (string, required) Api Secret provided on integrations tab in Easyflow platform. ## Request fields (application/json): - `externalAccountId` (string) - `dispatchers` (array) - `dispatchers.type` (string) Enum: "http" - `dispatchers.headers` (object) - `dispatchers.method` (string) Enum: "POST", "PUT", "PATCH" - `dispatchers.url` (string) - `events` (array) List of events to subscribe to. Enum: "order.chargeback", "order.updated", "order.canceled", "order.created", "order.paid", "order.partiallyPaid", "order.refunded", "subscription.created", "subscription.updated", "subscription.activated", "subscription.canceled", "subscription.deactivated", "subscription.expired", "subscription.inactivated", "subscriptionRecurrence.canceled", "subscriptionRecurrence.delayed", "subscriptionRecurrence.failed", "subscriptionRecurrence.paid" - `name` (string) - `notifyOnFail` (object) - `notifyOnFail.email` (string) ## Response 200 fields (application/json): - `statusCode` (integer) Example: 200 - `data` (object) - `data.id` (string) - `data.account` (string) - `data.queue` (string) - `data.name` (string) - `data.status` (string) Enum: "active", "inactive" - `data.events` (array) - `data.events.referer` (string) - `data.dispatchers` (array) - `data.dispatchers.createdAt` (string) - `data.dispatchers.updatedAt` (string) - `data.dispatchers.type` (string) Enum: "http" - `data.dispatchers.method` (string) Enum: "POST", "PUT", "PATCH" - `data.dispatchers.url` (string) - `data.dispatchers.headers` (object) - `data.notifyOnFail` (object) - `data.notifyOnFail.email` (string) ## Response 400 fields (application/json): - `message` (string) Invalid param: [] Example: "Invalid param: []" - `error` (string) Bad Request Example: "Bad Request" - `statusCode` (integer) 400 Example: 400 ## Response 401 fields (application/json): - `message` (string) Invalid field Example: "Unauthorized" - `error` (string) Unauthorized Example: "Unauthorized" - `statusCode` (integer) 401 Example: 401 ## Response 403 fields (application/json): - `message` (string) Forbidden resource Example: "Forbidden resource" - `error` (string) Forbidden Example: "Forbidden" - `statusCode` (integer) 403 Example: 403 ## Response 500 fields (application/json): - `message` (string) Internal server error Example: "Internal server error" - `error` (string) Internal Server Error Example: "Internal Server Error" - `statusCode` (integer) 500 Example: 500