Update User Webhook
PATCH/api/v2/public/webhooks/user/:webhookId
Updates an existing user webhook. This endpoint allows you to modify the URL, events, or other settings of an already registered user webhook.
Request
Path Parameters
Webhook id
- application/json
Body
required
The URL that will be called when an event is triggered.
Possible values: [all
, facility.user-connection.accepted
, facility.user-connection.rejected
, facility.creation.accepted
, facility.creation.rejected
]
The events that this webhook will listen to.
The secrets that will be used to verify the authenticity of the webhook.
If no value is provided it will auto generate a secret.
Secrets are used to sign and validate the payload of the webhook.
It will accept 2 secrets to allow a rotation strategy without service downtime.
Responses
- 201
- 400
- 401
- 403
- 404
- application/json
- Schema
- Example (from schema)
Schema
data object
If of the Webhook
Url of the Webhook
Possible values: [all
, facility.user-connection.accepted
, facility.user-connection.rejected
, facility.creation.accepted
, facility.creation.rejected
]
List of events that this webhook will listen to
List of webhook secrets
{
"data": {
"id": "fb656bc5-8ed0-40ee-ae42-66dd8549a2bb",
"url": "https://exemple.com/webhook",
"events": [
"facility.creation.accepted",
"facility.user-connection.accepted"
],
"clientId": "string",
"secrets": [
"sDV1aKqitCLClI12m7UPFbAAvZfZquJw",
"mryefgHPBVHJwux0o3BYW7hPM0BZlcCa"
]
}
}
Bad request
- application/json
- Schema
- Example (from schema)
- Request Validation
Schema
Error description
The type of error
Status code of the error
{
"message": [
"Property must be a string"
],
"error": "Bad Request",
"statusCode": 400
}
Request Validation Error
{
"message": [
"should be a secure URL with HTTPS",
"url must be a string",
"events must contain at least 1 elements",
"events must be an array",
"each value in events must be one of the following values: all, facility.user-connection.accepted, facility.user-connection.rejected, facility.creation.accepted, facility.creation.rejected",
"secrets must contain no more than 2 elements",
"secrets must be an array"
],
"error": "Bad Request",
"statusCode": 400
}
Unauthorized
- application/json
- Schema
- Example (from schema)
Schema
Error description
Status code of the error
{
"message": "Unauthorized",
"statusCode": 401
}
Forbidden
- application/json
- Schema
- Example (from schema)
Schema
Error description
The type of error
Status code of the error
{
"message": "Forbidden Resource",
"error": "Forbidden",
"statusCode": 403
}
Not Found
- application/json
- Schema
- Example (from schema)
- Not Found
Schema
Error description
The type of error
Status code of the error
{
"message": "Not Found",
"error": "Not Found",
"statusCode": 404
}
Webhook was not found
{
"message": "Webhook not found",
"error": "Not Found",
"statusCode": 404
}