List upcoming published event occurrences for an organisation.
Request
curl --request GET \
--url "https://api.24social.io/api/v3/YOUR_ORGANISATION_SLUG/event?status=published&limit=25&start=START_ISO_DATE&end=END_ISO_DATE" \
--header "Authorization: Bearer YOUR_API_TOKEN"const query = new URLSearchParams({
status: "published",
limit: "25",
start: "START_ISO_DATE",
end: "END_ISO_DATE"
});
const response = await fetch(
`https://api.24social.io/api/v3/YOUR_ORGANISATION_SLUG/event?${query}`,
{
headers: {
Authorization: "Bearer YOUR_API_TOKEN"
}
}
);
if (!response.ok) {
throw new Error(`24Social API returned ${response.status}`);
}
const events = await response.json();Use ISO-8601 timestamps for START_ISO_DATE and END_ISO_DATE. Event search uses offset pagination, returned as pagination.nextOffset.
Response
Each row is an event occurrence. Recurring events can therefore return more than one row with the same entry id and a different instanceId.
{
"data": [
{
"id": "EVENT_DOCUMENT_ID",
"instanceId": "EVENT_OCCURRENCE_ID",
"fields": {
"eventName": "Example event",
"slug": "example-event"
},
"sys": {
"status": "published"
}
}
],
"pagination": {
"nextOffset": 25
}
}