Update Webhook
PATCH/v1/webhooks/:webhookId
This endpoint updates a Webhook identified by the webhookId
parameter with a collection of JSON Patch operations.
The advantage of using JSON Patch is that you can describe individual update operations on a resource without touching attributes that you don't want to change.
For example: We have the following resource.
{
"webhookId": 6,
"url": "https://example.com/hook",
"httpMethod": "post",
"content": "null",
"webHookHeaders": []
}
If we send an update request body as below (it changes the content
field and adds a new HTTP header):
[
{
"op": "replace",
"path": "/content",
"value": "Some webhook content."
},
{
"op": "add",
"path": "/webHookHeaders/-",
"value": {
"key": "X-Custom-Header",
"value": "Custom header value"
}
}
]
Only the content
and webHookHeaders
are updated and all the other attributes remain unchanged.
So we get a response like this:
{
"webhookId": 6,
"url": "https://example.com/hook",
"httpMethod": "post",
"content": "Some webhook content.",
"webHookHeaders": [
{
"key": "X-Custom-Header",
"value": "Custom header value",
"isSecure": false
}
]
}
Request
Path Parameters
The identifier of the Webhook.
- application/json
- text/json
- application/*+json
Body
required
Array [
]
Possible values: [unknown
, add
, remove
, replace
, move
, copy
, test
]
Possible values: non-empty
The source path.
The target path.
The discrete value.
Body
required
Array [
]
Possible values: [unknown
, add
, remove
, replace
, move
, copy
, test
]
Possible values: non-empty
The source path.
The target path.
The discrete value.
Body
required
Array [
]
Possible values: [unknown
, add
, remove
, replace
, move
, copy
, test
]
Possible values: non-empty
The source path.
The target path.
The discrete value.
Responses
- 200
- 400
- 404
- 429
When the update was successful.
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
The identifier of the Webhook.
The URL of the Webhook.
Possible values: [get
, post
]
The HTTP body content.
webHookHeaders
object[]
nullable
List of HTTP headers that the Webhook must send.
Possible values: non-empty
and <= 255 characters
The HTTP header key.
Possible values: non-empty
and <= 1000 characters
The HTTP header value.
Indicates whether the header value is sensitive.
config
object
The Config where the applied changes will invoke the Webhook.
The Config's name.
The Config's identifier.
environment
object
The Environment where the applied changes will invoke the Webhook.
The Environment's name.
The Environment's identifier.
{
"webhookId": 0,
"url": "string",
"httpMethod": "get",
"content": "string",
"webHookHeaders": [
{
"key": "string",
"value": "string",
"isSecure": true
}
],
"config": {
"name": "string",
"configId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
},
"environment": {
"name": "string",
"environmentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}
Bad request.
Not found.
Too many requests. In case of the request rate exceeds the rate limits.