Webhooks
Update a webhook endpoint
PATCH
/
v1
/
webhooks
/
{webhook_id}
Update a webhook endpoint
curl --request PATCH \
--url https://api.sempera.org/v1/webhooks/{webhook_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"description": "<string>",
"events": [
"<string>"
],
"enabled": true,
"secret": "<string>",
"expected_updated_at": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.sempera.org/v1/webhooks/{webhook_id}"
payload = {
"url": "<string>",
"description": "<string>",
"events": ["<string>"],
"enabled": True,
"secret": "<string>",
"expected_updated_at": "2023-11-07T05:31:56Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: '<string>',
description: '<string>',
events: ['<string>'],
enabled: true,
secret: '<string>',
expected_updated_at: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.sempera.org/v1/webhooks/{webhook_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"object": "webhook_endpoint",
"url": "<string>",
"events": [
"<string>"
],
"enabled": true,
"post_call_filter": {},
"description": "<unknown>",
"has_secret": true,
"workspace_id": "<unknown>",
"created_at": "<unknown>",
"updated_at": "<unknown>"
}{
"error": {
"code": "AGENT_ENV_UNPINNED",
"message": "<string>",
"request_id": "<string>",
"field": "<string>",
"scope": "<string>",
"reason": "<string>"
}
}{
"error": {
"code": "AGENT_ENV_UNPINNED",
"message": "<string>",
"request_id": "<string>",
"field": "<string>",
"scope": "<string>",
"reason": "<string>"
}
}{
"error": {
"code": "AGENT_ENV_UNPINNED",
"message": "<string>",
"request_id": "<string>",
"field": "<string>",
"scope": "<string>",
"reason": "<string>"
}
}{
"error": {
"code": "AGENT_ENV_UNPINNED",
"message": "<string>",
"request_id": "<string>",
"field": "<string>",
"scope": "<string>",
"reason": "<string>"
}
}{
"error": {
"code": "AGENT_ENV_UNPINNED",
"message": "<string>",
"request_id": "<string>",
"field": "<string>",
"scope": "<string>",
"reason": "<string>"
}
}{
"error": {
"code": "AGENT_ENV_UNPINNED",
"message": "<string>",
"request_id": "<string>",
"field": "<string>",
"scope": "<string>",
"reason": "<string>"
}
}Authorizations
A workspace API key, sent as Authorization: Bearer sempera_sk_... Each operation names the one scope it needs. Scopes, key kinds and roles are in the Authentication guide.
Path Parameters
Body
application/json
Optional. The updated_at you read, sent back unchanged (a time with a zone). The change, a rotated secret included, is saved only if the endpoint still has that updated_at; otherwise 409 conflict with reason stale_webhook and nothing is written.
⌘I
Update a webhook endpoint
curl --request PATCH \
--url https://api.sempera.org/v1/webhooks/{webhook_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"description": "<string>",
"events": [
"<string>"
],
"enabled": true,
"secret": "<string>",
"expected_updated_at": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.sempera.org/v1/webhooks/{webhook_id}"
payload = {
"url": "<string>",
"description": "<string>",
"events": ["<string>"],
"enabled": True,
"secret": "<string>",
"expected_updated_at": "2023-11-07T05:31:56Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: '<string>',
description: '<string>',
events: ['<string>'],
enabled: true,
secret: '<string>',
expected_updated_at: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.sempera.org/v1/webhooks/{webhook_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"object": "webhook_endpoint",
"url": "<string>",
"events": [
"<string>"
],
"enabled": true,
"post_call_filter": {},
"description": "<unknown>",
"has_secret": true,
"workspace_id": "<unknown>",
"created_at": "<unknown>",
"updated_at": "<unknown>"
}{
"error": {
"code": "AGENT_ENV_UNPINNED",
"message": "<string>",
"request_id": "<string>",
"field": "<string>",
"scope": "<string>",
"reason": "<string>"
}
}{
"error": {
"code": "AGENT_ENV_UNPINNED",
"message": "<string>",
"request_id": "<string>",
"field": "<string>",
"scope": "<string>",
"reason": "<string>"
}
}{
"error": {
"code": "AGENT_ENV_UNPINNED",
"message": "<string>",
"request_id": "<string>",
"field": "<string>",
"scope": "<string>",
"reason": "<string>"
}
}{
"error": {
"code": "AGENT_ENV_UNPINNED",
"message": "<string>",
"request_id": "<string>",
"field": "<string>",
"scope": "<string>",
"reason": "<string>"
}
}{
"error": {
"code": "AGENT_ENV_UNPINNED",
"message": "<string>",
"request_id": "<string>",
"field": "<string>",
"scope": "<string>",
"reason": "<string>"
}
}{
"error": {
"code": "AGENT_ENV_UNPINNED",
"message": "<string>",
"request_id": "<string>",
"field": "<string>",
"scope": "<string>",
"reason": "<string>"
}
}