Roll an endpoint's signing secret
import requests
url = "https://app.langwatch.ai/api/webhooks/v1/endpoints/{id}/roll-secret"
headers = {"X-Auth-Token": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-Auth-Token': '<api-key>'}};
fetch('https://app.langwatch.ai/api/webhooks/v1/endpoints/{id}/roll-secret', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://app.langwatch.ai/api/webhooks/v1/endpoints/{id}/roll-secret \
--header 'X-Auth-Token: <api-key>'{
"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>",
"secret": "<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
Roll an endpoint's signing secret
Roll the endpoint’s signing secret. The new secret is returned ONCE; deliveries sign with it immediately.
POST
/
api
/
webhooks
/
v1
/
endpoints
/
{id}
/
roll-secret
Roll an endpoint's signing secret
import requests
url = "https://app.langwatch.ai/api/webhooks/v1/endpoints/{id}/roll-secret"
headers = {"X-Auth-Token": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-Auth-Token': '<api-key>'}};
fetch('https://app.langwatch.ai/api/webhooks/v1/endpoints/{id}/roll-secret', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://app.langwatch.ai/api/webhooks/v1/endpoints/{id}/roll-secret \
--header 'X-Auth-Token: <api-key>'{
"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>",
"secret": "<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
Response
The endpoint, with the new signing secret this body alone carries
Show child attributes
Show child attributes
Was this page helpful?
⌘I