Webhooks

Webhook endpoints receive events. Events are also available from the API for 30 days.

POST   /webhook_endpoints
GET    /webhook_endpoints
DELETE /webhook_endpoints/{webhook_endpoint_id}
GET    /events

The webhook endpoint object

FieldTypeDescription
idstring
objectstringAlways webhook_endpoint.
urluri
eventsarray of enumOne of application.created, application.requirements_updated, application.in_review, application.approved, application.declined, application.cancelled, application.expired, fee.paid, fee.refunded, guarantee.issued, guarantee.updated, guarantee.ended.
statusenumOne of enabled, disabled.
secretstringReturned only when the endpoint is created.
descriptionstring or null
created_atdate-time

The event object

FieldTypeDescription
idstring
objectstringAlways event.
typeenumOne of application.created, application.requirements_updated, application.in_review, application.approved, application.declined, application.cancelled, application.expired, fee.paid, fee.refunded, guarantee.issued, guarantee.updated, guarantee.ended.
livemodeboolean
created_atdate-time
dataobject
data.objectobjectThe application or guarantee as it was when the event happened, in the same shape the API returns.

Create a webhook endpoint

POST/webhook_endpoints

Creates a webhook endpoint.

Request body

FieldTypeDescription
urlrequireduriMust be HTTPS on port 443.
eventsarray of enumThe event types to deliver. Omit to receive all of them. One of application.created, application.requirements_updated, application.in_review, application.approved, application.declined, application.cancelled, application.expired, fee.paid, fee.refunded, guarantee.issued, guarantee.updated, guarantee.ended.
descriptionstring

Example request

curl https://api.thestudentguarantor.com/v1/webhook_endpoints \
  -X POST \
  -H "Authorization: Bearer $TSG_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "url": "https://api.example-platform.com/hooks/tsg",
  "events": [
    "application.requirements_updated",
    "application.approved",
    "application.declined",
    "guarantee.issued"
  ]
}'

Returns

Returns the webhook endpoint object with its secret. The secret isn't returned again.

Example response

{
  "id": "whk_2Bv5NmQ8wE1rT4yU",
  "object": "webhook_endpoint",
  "url": "https://api.example-platform.com/hooks/tsg",
  "events": [
    "application.requirements_updated",
    "application.approved",
    "application.declined",
    "guarantee.issued"
  ],
  "status": "enabled",
  "secret": "whsec_Jx4mP9qLs2Vt7RzKc8Bn1WdY",
  "created_at": "2026-11-19T08:02:11Z"
}

List webhook endpoints

GET/webhook_endpoints

Returns a list of your webhook endpoints.

Returns

Returns a list of webhook endpoint objects.

Delete a webhook endpoint

DELETE/webhook_endpoints/{webhook_endpoint_id}

Deletes a webhook endpoint.

Returns

Returns an empty response.

List events

GET/events

Returns a list of events from the last 30 days.

Parameters

NameInDescription
typequeryOne of application.created, application.requirements_updated, application.in_review, application.approved, application.declined, application.cancelled, application.expired, fee.paid, fee.refunded, guarantee.issued, guarantee.updated, guarantee.ended.
created_afterquery

Returns

Returns a list of event objects.