Create Webhook Endpoint
Register an HTTPS endpoint to receive org events.
Register an HTTPS endpoint to receive org events.
The signing secret is returned once, on creation only. Each event is POSTed as
JSON with id, type, created_at, and data fields, and carries an
x-levain-signature header of the form t=<unix>,v1=<hex>, where v1 is the
HMAC-SHA256 of "{t}.{body}" under the secret — verify it before trusting a
payload.
Event types: run.succeeded, run.paused, run.failed, run.cancelled,
credential.revoked, workspace.cap_reached. A run that stops to ask a
question fires run.paused instead of run.succeeded; its data carries the
question under message, and replying on the run's session resumes the agent.
Failed deliveries are retried on a backoff schedule, from 1 minute up to 12
hours between attempts, then marked dead. An org can register up to 10 active
endpoints.
Authorization
HTTPBearer In: header
Header Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://api.levainlabs.com/api/v1/org/webhooks" \ -H "Content-Type: application/json" \ -d '{ "url": "stringstring" }'{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"url": "string",
"event_types": [
"string"
],
"is_active": true,
"secret": "string",
"created_at": "2019-08-24T14:15:22Z"
}