Skip to content

Read a calendar

GET
/calendars/{calendarId}
curl --request GET \
--url https://calendar.work.optidata.cloud/api/calendars/454 \
--header 'Authorization: Bearer <token>'

The full record of one calendar, including the permissions list — who it is shared with and at which role.

calendarId
required
string

Id of the calendar. Read it from GET /calendars.

The calendar.

Media typeapplication/json
object
calendar
required

A calendar the caller owns or has been given access to.

object
id
required

Id of the calendar, as digits.

string | null
sharedId

For a calendar shared with the caller, its {ownerZid}:{calendarId} identifier. null for a calendar the caller owns.

string | null
uuid
string | null
name
required
string | null
color

Hex colour used to render the calendar.

string | null
exportUrl

Populated only when a subscription feed has been generated.

string | null
folderPath
string | null
parentFolderId
string | null
parentFolderUuid
string | null
linkedCalendarId

For a shared calendar, its id in the owner’s account.

string | null
linkedCalendarUuid
string | null
ownerZid
string | null
ownerEmail
string | null
ownerName
string | null
userRole
One of:

What a member may do with a calendar. viewer reads it, manager also creates and edits events and may answer invitations on the owner’s behalf, admin additionally manages sharing, and owner is the person the calendar belongs to.

string
Allowed values: viewer manager admin owner
isHomeCalendar
required

true for the user’s primary calendar, which cannot be renamed or deleted.

boolean
isDeletable
required
boolean
isShared
required

true when the calendar belongs to somebody else.

boolean
isBroken
required

true when a shared calendar can no longer be resolved — usually because the owner revoked access or deleted it.

boolean
permissions
required

Who the calendar is shared with, and at which role.

Array<object>

One person’s access to a calendar.

object
role

What a member may do with a calendar. viewer reads it, manager also creates and edits events and may answer invitations on the owner’s behalf, admin additionally manages sharing, and owner is the person the calendar belongs to.

string
Allowed values: viewer manager admin owner
memberType

user is somebody with an Optiwork account in the tenant, group a user group, and guest an address outside it.

string
Allowed values: user guest group
memberZid

Mailbox identifier of the member.

string | null
memberEmail

Address of the member.

string | null
memberName
string | null
memberAvatarUrl
string | null
memberOptiworkIdentifier

Optiwork identifier of the member — the value to send back as optiworkIdentifier.

string | null
Examples
Examplecalendar
{
"calendar": {
"id": "454",
"sharedId": null,
"uuid": "2ca985db-cc36-4627-aef2-3ee45fdf0fdd",
"name": "Team planning",
"color": "#EBBC00",
"folderPath": "/Team planning",
"parentFolderId": "1",
"userRole": "owner",
"isHomeCalendar": false,
"isDeletable": true,
"isShared": false,
"isBroken": false,
"permissions": [
{
"role": "viewer",
"memberType": "user",
"memberZid": "2ed19d21-38bd-4ff1-bbc0-a30fc832e4e6",
"memberEmail": "john.smith@acme.example",
"memberName": "John Smith",
"memberAvatarUrl": null,
"memberOptiworkIdentifier": "9ef34ce3-3b69-4762-b5e8-045499390ce6"
}
]
}
}

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"
}

The calendar could not be read — it does not exist, or is no longer reachable.

Media typeapplication/json

Failures raised by the calendar layer itself — a permission refusal, or a calendar or event that cannot be read. help is a hint for the end user and is often empty.

object
error
required

What went wrong.

string
status
required

Repeats the HTTP status code.

integer
help
required

Suggested next step, or an empty string.

string
Examples
Examplemissing
{
"error": "Cannot get calendar folder: no such folder id: 99999999",
"status": 422,
"help": ""
}

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."
}