Skip to content
campaiDeveloper
campai.com

Booking · Events

GET/{organizationId}/{mandateId}/booking/events/{eventId}/previewTokenReads only

Get event preview token

Returns a preview token and its expiration time for the specified organization, mandate, and event. Add the token as the preview parameter to the public event link to show the event for seven days, even if it is unpublished. Booking remains unavailable.

Permissions

Send an API key of the organization in the path, using the X-API-Key header.

Who may call it

  • The caller must have organization access.
  • The caller needs mandate.read permission.
  • The caller needs event.read permission.

Request

Path parameters

  • organizationIdidrequired
  • mandateIdidrequired
  • eventIdidrequired
Request
curl --fail-with-body --silent --show-error --max-time 30 --globoff \
  --request GET 'https://cloud.campai.com/api/YOUR_ORGANIZATION_ID/YOUR_MANDATE_ID/booking/events/YOUR_EVENT_ID/previewToken' \
  --header 'X-API-Key: YOUR_API_KEY'

Response

200 Successful response

Content-Type: application/json

  • tokenstring
  • expiresAtstring · date-time
Response200
{
  "token": "string",
  "expiresAt": "2026-06-15T22:30:00Z"
}

Errors

Other errors

StatusErrorWhen
404The given event was not foundIf the event is not found, the endpoint returns HTTP 404 with key booking.event.eventNotFound.

Errors nearly every request can meet are listed under Errors.