Skip to content

The publish events of the last 7 days, oldest first

GET
/events
curl --request GET \
--url 'http://localhost:3000/api/v1/events?limit=500'

For a site that missed a webhook. Each event carries the cache tags to invalidate. See docs/events.md.

after
string format: uuid

The id of the last event that the site handled. Without it, the list starts 7 days ago.

limit
integer
default: 500 >= 1 <= 500

The events after the cursor.

Media typeapplication/json
object
events
required
Array<object>
object
id
required

The same id as the webhook-id header.

string format: uuid
type
required
string
Allowed values: document.published document.unpublished document.deleted document.slug_changed media.updated media.deleted
at
required
string format: date-time
collection
required
string | null
documentId
required
string | null
slug
required
string | null
path
required
string | null
previous
required
object
slug
string
path
string
versionId
required
string | null
tags
required
Array<string>
hasMore
required
boolean

Example

{
"events": [
{
"type": "document.published"
}
]
}
Cache-Control
Allowed value: no-store

A query parameter is not valid.

Media typeapplication/json
object
error
required
string
Allowed values: bad_request invalid_token not_found method_not_allowed rate_limited internal moved unavailable cursor_expired
message
required
string

Example

{
"error": "bad_request"
}

The cursor is unknown or older than 7 days. Invalidate the tag genga, then read again without after.

Media typeapplication/json
object
error
required
string
Allowed values: bad_request invalid_token not_found method_not_allowed rate_limited internal moved unavailable cursor_expired
message
required
string

Example

{
"error": "bad_request"
}

Too many requests from this address.

Media typeapplication/json
object
error
required
string
Allowed values: bad_request invalid_token not_found method_not_allowed rate_limited internal moved unavailable cursor_expired
message
required
string

Example

{
"error": "bad_request"
}
Retry-After
integer