GET
/
webhook
/
:event
/
last
curl --request GET \
--url 'https://YOURSITE.konstant.ly/openapi/v1/webhook/user.created/last' \
--header 'X-API-KEY: 1qaz2wsx3edc4rfv1qaz2wsx3edc4rfv'
{
    "occuredAt": 1673531200,
    "type": "User/Created",
    "body": {
    "user": {
    "id": "user123",
    "name": "John Smith",
    "email": "john@example.com",
    "language": "en",
    "timezone": "Europe/London",
    "role": {
    "alias": "learner"
},
    "fromApi": true,
    "userAttributes": [
{
    "apiId": "department",
    "name": "Department",
    "type": 1,
    "value": "Sales"
}
    ]
}
}
}

Retrieve the most recent occurrence of a specified webhook event type. This endpoint is useful for testing webhook integrations and verifying event data structures.

Request Headers

X-API-KEY
string
required

API Key. Go to your Konstantly site > Settings > API and copy the value from there.

Query Parameters

event
string
required

Type of webhook event to retrieve Example: user.created

Response

Returns the full webhook event data structure for the most recent event of the specified type.

Error Responses

404
object

Not Found error response

Usage Notes

  1. Event Types:
  • Use dot notation for event types (e.g., user.created, course.published)
  • Case sensitive matching
  • Only returns events from the last 30 days
  1. Common Uses:
  • Testing webhook handlers
  • Debugging integration issues
  • Verifying event structures
  • Recreating missed events
  1. Best Practices:
  • Cache responses when appropriate
  • Handle “no events” cases gracefully
  • Use for testing, not production monitoring
  • Verify event data matches expectations
curl --request GET \
--url 'https://YOURSITE.konstant.ly/openapi/v1/webhook/user.created/last' \
--header 'X-API-KEY: 1qaz2wsx3edc4rfv1qaz2wsx3edc4rfv'
{
    "occuredAt": 1673531200,
    "type": "User/Created",
    "body": {
    "user": {
    "id": "user123",
    "name": "John Smith",
    "email": "john@example.com",
    "language": "en",
    "timezone": "Europe/London",
    "role": {
    "alias": "learner"
},
    "fromApi": true,
    "userAttributes": [
{
    "apiId": "department",
    "name": "Department",
    "type": 1,
    "value": "Sales"
}
    ]
}
}
}