Create a new webhook configuration
POST/config
Create a new webhook configuration
Request
- application/json
Body
required
- MailConfigDTO
- RestConfigDTO
The unique identifier of the webhook
123e4567-e89b-12d3-a456-426614174000The name of the webhook configuration
Order Created WebhookThe ID of the owner (organization)
org_12345List of events the webhook is subscribed to
Possible values: [ORDER_EVENT, PARCEL_EVENT, UNKNOWN]
["ORDER_CREATED","ORDER_SHIPPED"]dispatchConfig
object
required
oneOf
The type of dispatcher configuration
Possible values: [mailConfig]
mailConfigThe email address to send notifications to
user@example.comThe type of dispatcher configuration
Possible values: [restConfig]
restConfigThe REST API endpoint URL
https://api.example.com/webhookThe status of the webhook
Possible values: [ACTIVE, INACTIVE]
ACTIVEResponses
- 200
- 500
Webhook configuration created successfully
- application/json
- Schema
- Example (from schema)
Schema
- MailConfigDTO
- RestConfigDTO
The unique identifier of the webhook
123e4567-e89b-12d3-a456-426614174000The name of the webhook configuration
Order Created WebhookThe ID of the owner (organization)
org_12345List of events the webhook is subscribed to
Possible values: [ORDER_EVENT, PARCEL_EVENT, UNKNOWN]
["ORDER_CREATED","ORDER_SHIPPED"]dispatchConfig
object
required
oneOf
The type of dispatcher configuration
Possible values: [mailConfig]
mailConfigThe email address to send notifications to
user@example.comThe type of dispatcher configuration
Possible values: [restConfig]
restConfigThe REST API endpoint URL
https://api.example.com/webhookThe status of the webhook
Possible values: [ACTIVE, INACTIVE]
ACTIVE{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Order Created Webhook",
"ownerId": "org_12345",
"subscribedEvents": [
"ORDER_CREATED",
"ORDER_SHIPPED"
],
"dispatchConfig": {},
"status": "ACTIVE"
}
Internal server error