List calendars you can create events in
GET
/calendars/selectable
const url = 'https://calendar.work.optidata.cloud/api/calendars/selectable';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://calendar.work.optidata.cloud/api/calendars/selectable \ --header 'Authorization: Bearer <token>'The subset of GET /calendars the caller may
create events in — that is, the calendars where their role is manager,
admin or owner. Returned as id/label pairs, which is all a calendar
picker needs.
Authorizations
Section titled “Authorizations”Responses
Section titled “ Responses ”Calendars the caller can write events to.
Media typeapplication/json
object
calendars
required
Array<object>
object
id
required
Calendar id.
string
text
required
Display name.
string
Examples
Exampleselectable
{ "calendars": [ { "id": "10", "text": "Calendar" }, { "id": "454", "text": "Team planning" }, { "id": "1233", "text": "Meeting room" } ]}Missing, malformed or expired authentication key.
Media typeapplication/json
Authentication failures use an error key rather than message.
object
error
required
string
Examples
Examplemissing
No bearer token sent
{ "error": "JWT passport exception: Missing bearer token in request"}Rate limit exceeded. Retry after the window resets.
Media typeapplication/json
Generic error envelope used by policy, binding and framework failures.
object
message
required
Human-readable description of the failure.
string
Examples
Examplethrottled
{ "message": "Too Many Attempts."}