Read the workspace's event feed
const url = 'https://app.surveyrock.com/api/v1/events?limit=50&type=response.completed';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://app.surveyrock.com/api/v1/events?limit=50&type=response.completed' \ --header 'Authorization: Bearer <token>'The workspace’s response.completed events after a cursor, oldest first, in the same envelope a webhook delivers (id, type, timestamp, data) plus a cursor. Pass pagination.cursor_next as cursor to continue: an empty page returns the cursor you sent, so polling is always safe to repeat. pagination.hasMore is true when the page was full, so ask again straight away; when it is false, wait before polling.
Events appear in the feed a few seconds after they happen, never out of order. Only events recorded while some subscription (a webhook, or an event feed with no URL) was listening exist, and they are kept for 30 days.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”pagination.cursor_next from the previous page. Omit to start from the oldest event kept
Responses
Section titled “Responses”A page of events, possibly empty
The plan does not include webhooks (feature_locked), or the token lacks events:read
validation_failed: a cursor this endpoint did not issue, or an unknown type