Update a webhook endpoint
import requests
url = "https://app.langwatch.ai/api/webhooks/v1/endpoints/{id}"
payload = {
"url": "<string>",
"enabled_events": ["<string>"],
"max_batch_size": 123,
"max_batch_delay_ms": 123,
"max_in_flight": 123
}
headers = {
"X-Auth-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-Auth-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: '<string>',
enabled_events: ['<string>'],
max_batch_size: 123,
max_batch_delay_ms: 123,
max_in_flight: 123
})
};
fetch('https://app.langwatch.ai/api/webhooks/v1/endpoints/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://app.langwatch.ai/api/webhooks/v1/endpoints/{id} \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '
{
"url": "<string>",
"enabled_events": [
"<string>"
],
"max_batch_size": 123,
"max_batch_delay_ms": 123,
"max_in_flight": 123
}
'{
"data": {
"id": "<string>",
"url": "<string>",
"enabled_events": [
"<string>"
],
"disabled_reason": "<string>",
"disabled_at": "<string>",
"failing_since": "<string>",
"last_success_at": "<string>",
"last_failure_at": "<string>",
"max_batch_size": 123,
"max_batch_delay_ms": 123,
"max_in_flight": 123,
"created_at": "<string>",
"updated_at": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"meta": {},
"trace_id": "<string>",
"span_id": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"meta": {},
"trace_id": "<string>",
"span_id": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"meta": {},
"trace_id": "<string>",
"span_id": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"meta": {},
"trace_id": "<string>",
"span_id": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"meta": {},
"trace_id": "<string>",
"span_id": "<string>"
}
}Webhooks
Update a webhook endpoint
Update a webhook endpoint’s url, event subscriptions, or status (active re-enables, disabled pauses; re-enabling does not re-send the gap, replay covers it)
PATCH
/
api
/
webhooks
/
v1
/
endpoints
/
{id}
Update a webhook endpoint
import requests
url = "https://app.langwatch.ai/api/webhooks/v1/endpoints/{id}"
payload = {
"url": "<string>",
"enabled_events": ["<string>"],
"max_batch_size": 123,
"max_batch_delay_ms": 123,
"max_in_flight": 123
}
headers = {
"X-Auth-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-Auth-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: '<string>',
enabled_events: ['<string>'],
max_batch_size: 123,
max_batch_delay_ms: 123,
max_in_flight: 123
})
};
fetch('https://app.langwatch.ai/api/webhooks/v1/endpoints/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://app.langwatch.ai/api/webhooks/v1/endpoints/{id} \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '
{
"url": "<string>",
"enabled_events": [
"<string>"
],
"max_batch_size": 123,
"max_batch_delay_ms": 123,
"max_in_flight": 123
}
'{
"data": {
"id": "<string>",
"url": "<string>",
"enabled_events": [
"<string>"
],
"disabled_reason": "<string>",
"disabled_at": "<string>",
"failing_since": "<string>",
"last_success_at": "<string>",
"last_failure_at": "<string>",
"max_batch_size": 123,
"max_batch_delay_ms": 123,
"max_in_flight": 123,
"created_at": "<string>",
"updated_at": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"meta": {},
"trace_id": "<string>",
"span_id": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"meta": {},
"trace_id": "<string>",
"span_id": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"meta": {},
"trace_id": "<string>",
"span_id": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"meta": {},
"trace_id": "<string>",
"span_id": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"meta": {},
"trace_id": "<string>",
"span_id": "<string>"
}
}Authorizations
Project API key for sending traces and accessing project-scoped resources. Format: sk-lw-... (no underscore). Obtain one by creating a project via the Admin API or the LangWatch UI.
Path Parameters
Body
application/json
Response
The endpoint as it now stands
Show child attributes
Show child attributes
Was this page helpful?
⌘I