Update a webhook endpoint
import requests
url = "https://app.langwatch.ai/api/webhooks/v1/endpoints/{id}"
payload = {
"url": "<string>",
"sqs": {
"queue_url": "<string>",
"role_arn": "<string>",
"external_id": "<string>",
"access_key_id": "<string>",
"secret_access_key": "<string>"
},
"enabled_events": ["<string>"],
"max_batch_size": 123,
"max_batch_delay_ms": 123,
"max_in_flight": 123
}
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>',
sqs: {
queue_url: '<string>',
role_arn: '<string>',
external_id: '<string>',
access_key_id: '<string>',
secret_access_key: '<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 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"sqs": {
"queue_url": "<string>",
"role_arn": "<string>",
"external_id": "<string>",
"access_key_id": "<string>",
"secret_access_key": "<string>"
},
"enabled_events": [
"<string>"
],
"max_batch_size": 123,
"max_batch_delay_ms": 123,
"max_in_flight": 123
}
'{
"data": {
"destination_kind": "<string>",
"url": "<string>",
"sqs": null,
"id": "<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 address, event subscriptions, or status (active re-enables, disabled pauses; re-enabling does not re-send the gap, replay covers it). destination_kind cannot change: batches already planned against the old transport are in flight, so a move means a new endpoint alongside this one until it has drained.
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>",
"sqs": {
"queue_url": "<string>",
"role_arn": "<string>",
"external_id": "<string>",
"access_key_id": "<string>",
"secret_access_key": "<string>"
},
"enabled_events": ["<string>"],
"max_batch_size": 123,
"max_batch_delay_ms": 123,
"max_in_flight": 123
}
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>',
sqs: {
queue_url: '<string>',
role_arn: '<string>',
external_id: '<string>',
access_key_id: '<string>',
secret_access_key: '<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 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"sqs": {
"queue_url": "<string>",
"role_arn": "<string>",
"external_id": "<string>",
"access_key_id": "<string>",
"secret_access_key": "<string>"
},
"enabled_events": [
"<string>"
],
"max_batch_size": 123,
"max_batch_delay_ms": 123,
"max_in_flight": 123
}
'{
"data": {
"destination_kind": "<string>",
"url": "<string>",
"sqs": null,
"id": "<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
Admin API key for organization-level operations (managing projects, API keys). Create one in Settings > API Keys or via POST /api/api-keys. Format: sk-lw-{id}_{secret}.
Path Parameters
Body
application/json
Available options:
http, sqs Required string length:
1 - 2000Show child attributes
Show child attributes
Required array length:
1 - 100 elementsRequired string length:
1 - 200Available options:
active, disabled Response
The endpoint as it now stands
- Option 1
- Option 2
Show child attributes
Show child attributes
Was this page helpful?
⌘I