Skip to main content
Version: 1.0.0

Create webhook

Information

This API allow you to create a webhook.

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

POST/v1/config/webhook

Body parameters
labelstring - Required

interopDataobject - Required

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

201 CREATED

{
"webhookId": "My webhook configuration with client credentials auth",
"label": "My webhook configuration with client credentials auth",
"adapterCode": "standardAdapter",
"interopData": {
"endpoints": {
"status": {
"callbackUrl": "https://myenpoint.com/status"
},
"invoice": {
"callbackUrl": "https://myenpoint.com/invoice"
},
"authentication": {
"oauth2ClientCredentials": {
"callbackUrl": "https://myauthorizationServer.com/auth",
"clientId": "myClientId",
"clientSecret": "myClientSecret"
}
}
}
}
}