Skip to Content

Webhooks

Register HTTP endpoints that receive event notifications from LearnHouse.

List available webhook event types

GET/api/v1/orgs/{org_id}/webhooks/events
User session only — API tokens not accepted

Returns the catalogue of webhook event types supported by LearnHouse along with their descriptions.

Request
Response
{}

List webhook endpoints

GET/api/v1/orgs/{org_id}/webhooks
User session only — API tokens not accepted

Returns all webhook endpoints configured for the given organization.

Path parameters

org_idintegerrequired

Returns

WebhookEndpointRead[] — List of webhook endpoints

idintegerrequired
webhook_uuidstringrequired
org_idintegerrequired
urlstringrequired
descriptionstring | null
eventsstring[]required
is_activebooleanrequired
has_secretboolean
sourcestring
zap_namestring | null
zap_idstring | null
created_by_user_idintegerrequired
creation_datestringrequired
update_datestringrequired
Error responses
  • 401 Authentication required
  • 403 User lacks permission to view webhooks for this organization
  • 404 Organization not found
  • 422 Validation ErrorHTTPValidationError
Request
Response
[
  {
    "id": 1,
    "webhook_uuid": "string",
    "org_id": 1,
    "url": "https://example.com",
    "description": "An example description",
    "events": [
      "string"
    ],
    "is_active": false,
    "has_secret": true,
    "source": "manual",
    "zap_name": "Example name",
    "zap_id": "string",
    "created_by_user_id": 1,
    "creation_date": "string",
    "update_date": "string"
  }
]

Create a webhook endpoint

POST/api/v1/orgs/{org_id}/webhooks
User session only — API tokens not accepted

Creates a new webhook endpoint for the organization. The signing secret is only returned once upon creation and cannot be retrieved later; store it securely.

Path parameters

org_idintegerrequired

Request bodyapplication/jsonrequired

urlstringrequired
descriptionstring | null
eventsstring[]required

Returns

WebhookEndpointCreatedResponse — Webhook endpoint created; signing secret included

webhook_uuidstringrequired
urlstringrequired
descriptionstring | null
eventsstring[]required
is_activebooleanrequired
secretstringrequired
created_by_user_idintegerrequired
creation_datestringrequired
Error responses
  • 401 Authentication required
  • 403 User lacks permission to manage webhooks for this organization
  • 404 Organization not found
  • 422 Validation ErrorHTTPValidationError
Request
Response
{
  "webhook_uuid": "string",
  "url": "https://example.com",
  "description": "An example description",
  "events": [
    "string"
  ],
  "is_active": false,
  "secret": "string",
  "created_by_user_id": 1,
  "creation_date": "string"
}

Get a webhook endpoint

GET/api/v1/orgs/{org_id}/webhooks/{webhook_uuid}
User session only — API tokens not accepted

Returns details of a specific webhook endpoint by its UUID.

Path parameters

org_idintegerrequired
webhook_uuidstringrequired

Returns

WebhookEndpointRead — Webhook endpoint details

idintegerrequired
webhook_uuidstringrequired
org_idintegerrequired
urlstringrequired
descriptionstring | null
eventsstring[]required
is_activebooleanrequired
has_secretboolean
sourcestring
zap_namestring | null
zap_idstring | null
created_by_user_idintegerrequired
creation_datestringrequired
update_datestringrequired
Error responses
  • 401 Authentication required
  • 403 User lacks permission to view this webhook
  • 404 Webhook endpoint not found
  • 422 Validation ErrorHTTPValidationError
Request
Response
{
  "id": 1,
  "webhook_uuid": "string",
  "org_id": 1,
  "url": "https://example.com",
  "description": "An example description",
  "events": [
    "string"
  ],
  "is_active": false,
  "has_secret": true,
  "source": "manual",
  "zap_name": "Example name",
  "zap_id": "string",
  "created_by_user_id": 1,
  "creation_date": "string",
  "update_date": "string"
}

Update a webhook endpoint

PUT/api/v1/orgs/{org_id}/webhooks/{webhook_uuid}
User session only — API tokens not accepted

Updates mutable fields of a webhook endpoint (URL, subscribed events, active flag).

Path parameters

org_idintegerrequired
webhook_uuidstringrequired

Request bodyapplication/jsonrequired

urlstring | null
descriptionstring | null
eventsstring[] | null
is_activeboolean | null

Returns

WebhookEndpointRead — Webhook endpoint updated

idintegerrequired
webhook_uuidstringrequired
org_idintegerrequired
urlstringrequired
descriptionstring | null
eventsstring[]required
is_activebooleanrequired
has_secretboolean
sourcestring
zap_namestring | null
zap_idstring | null
created_by_user_idintegerrequired
creation_datestringrequired
update_datestringrequired
Error responses
  • 401 Authentication required
  • 403 User lacks permission to modify this webhook
  • 404 Webhook endpoint not found
  • 422 Validation ErrorHTTPValidationError
Request
Response
{
  "id": 1,
  "webhook_uuid": "string",
  "org_id": 1,
  "url": "https://example.com",
  "description": "An example description",
  "events": [
    "string"
  ],
  "is_active": false,
  "has_secret": true,
  "source": "manual",
  "zap_name": "Example name",
  "zap_id": "string",
  "created_by_user_id": 1,
  "creation_date": "string",
  "update_date": "string"
}

Delete a webhook endpoint

DELETE/api/v1/orgs/{org_id}/webhooks/{webhook_uuid}
User session only — API tokens not accepted

Deletes a webhook endpoint along with all of its delivery logs.

Path parameters

org_idintegerrequired
webhook_uuidstringrequired
Error responses
  • 401 Authentication required
  • 403 User lacks permission to delete this webhook
  • 404 Webhook endpoint not found
  • 422 Validation ErrorHTTPValidationError
Request
Response
{}

Regenerate a webhook signing secret

POST/api/v1/orgs/{org_id}/webhooks/{webhook_uuid}/regenerate-secret
User session only — API tokens not accepted

Regenerates the signing secret for a webhook endpoint. The new secret is only returned once and must be stored securely.

Path parameters

org_idintegerrequired
webhook_uuidstringrequired

Returns

WebhookEndpointCreatedResponse — Webhook signing secret regenerated

webhook_uuidstringrequired
urlstringrequired
descriptionstring | null
eventsstring[]required
is_activebooleanrequired
secretstringrequired
created_by_user_idintegerrequired
creation_datestringrequired
Error responses
  • 401 Authentication required
  • 403 User lacks permission to manage this webhook
  • 404 Webhook endpoint not found
  • 422 Validation ErrorHTTPValidationError
Request
Response
{
  "webhook_uuid": "string",
  "url": "https://example.com",
  "description": "An example description",
  "events": [
    "string"
  ],
  "is_active": false,
  "secret": "string",
  "created_by_user_id": 1,
  "creation_date": "string"
}

Send a test webhook event

POST/api/v1/orgs/{org_id}/webhooks/{webhook_uuid}/test
User session only — API tokens not accepted

Sends a synthetic 'ping' event to the webhook endpoint to verify it is reachable and correctly configured.

Path parameters

org_idintegerrequired
webhook_uuidstringrequired
Error responses
  • 401 Authentication required
  • 403 User lacks permission to manage this webhook
  • 404 Webhook endpoint not found
  • 422 Validation ErrorHTTPValidationError
Request
Response
{}

List webhook delivery logs

GET/api/v1/orgs/{org_id}/webhooks/{webhook_uuid}/deliveries
User session only — API tokens not accepted

Returns recent webhook delivery attempts and their outcomes for the specified endpoint, up to the requested limit.

Path parameters

org_idintegerrequired
webhook_uuidstringrequired

Query parameters

limitinteger

Returns

WebhookDeliveryLogRead[] — List of webhook delivery log entries

idintegerrequired
webhook_idintegerrequired
event_namestringrequired
delivery_uuidstringrequired
request_payloadRequest Payload | null
response_statusinteger | null
response_bodystring | null
successbooleanrequired
attemptintegerrequired
error_messagestring | null
created_atstringrequired
Error responses
  • 401 Authentication required
  • 403 User lacks permission to view this webhook
  • 404 Webhook endpoint not found
  • 422 Validation ErrorHTTPValidationError
Request
Response
[
  {
    "id": 1,
    "webhook_id": 1,
    "event_name": "Example name",
    "delivery_uuid": "string",
    "request_payload": {},
    "response_status": 0,
    "response_body": "string",
    "success": false,
    "attempt": 0,
    "error_message": "string",
    "created_at": "string"
  }
]