Skip to main content
Version: Next

Create webhook

Information

This API allow you to create a webhook.

This endpoint is synchronous
The role admin is needed in order to use this endpoint
Endpoints

POST/v1/config/webhook

Body parameters
filterStreamDirectionenum - Optional

statusenum - Optional - Default value : ACTIVE

adapterCodestring - Optional - Default value : standardAdapter

labelstring - Optional




Request

POST /v1/config/webhook


curl -X 'POST'
'https://api.ppd.iopole.fr//v1/config/webhook'
-H 'accept: application/json'
-H 'Authorization: Bearer ${token}'
-H 'Content-Type: application/json'
-d '{
"label": "My simple webhook configuration",
"adapterCode": "standardAdapter",
"interopData": {
"endpoints": {
"status": {
"callbackUrl": "https://myenpoint.com/status"
},
"invoice": {
"callbackUrl": "https://myenpoint.com/invoice"
}
}
}
}'

Response

Status: 201 - application/json

Description: Returns created webhook id

Schema:

  • type: enum
    The type of the response object.
  • id: string
    The unique identifier for the created element.

Examples:

{
  "type": "WEBHOOK",
  "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}

Status: 401

Description: Unauthorized - Authentication is required and has failed or has not yet been provided.

Status: 403

Description: Forbidden - The server understood the request, but it refuses to authorize it. Note: This endpoint requires an admin account.

Status: 409

Description: Conflict - The request could not be completed. A webhook with the same direction already exists.