---
title: "Get appointment sorted by date time (agenda view). Include self context in contextList by adding \"me\". This also works with allTeamContexts option. Leaving contextList and allTeamContexts empty will fetch own context."
method: PUT
path: "/api/v1/calendar/list"
tags: ["Calendar"]
---

# Get appointment sorted by date time (agenda view). Include self context in contextList by adding "me". This also works with allTeamContexts option. Leaving contextList and allTeamContexts empty will fetch own context.

`PUT /api/v1/calendar/list`

## Request

- Base URL: `https://api.intheloop.io`
- URL: `https://api.intheloop.io/api/v1/calendar/list`
- Auth: API key in header `Authorization`

## Query parameters

- `dateTimeStart` string, date-time
- `dateTimeEnd` string, date-time

## Headers

- `Authorization` string
- `X-Impersonate-User` string

## Request body

- CalendarEventsRequest[]
  - `calendarInstanceId` string: calendar instance id
  - `historyId` string: history id

## Response `200`

OK

- CalendarEventsResponse[]
  - `calendarInstanceId` string: calendar instance id
  - `events` ListOfResourcesOfAppointmentEvent: List of resources
    - `resources` AppointmentEvent[]: List of resources
      - `appointment` Appointment: Appointment class
        - `id` string: Id of appointment
        - `instanceType` 'SingleInstance' | 'SeriesMaster' | 'Occurrence', required: Appointment instance type
        - `providerType` 'GoogleCalendar' | 'MicrosoftCalendar' | 'ExchangeCalendar', required: Appointment provider type
        - `subject` string: Appointment subject
        - `description` string: Appointment description
        - `descriptionContentType` string: Appointment description content type
        - `attendees` ListOfResourcesOfAttendee: List of resources
          - `resources` Attendee[]: List of resources
            - `id` string: Resource id
            - `name` string: Resource name or title
            - `revision` string: Resource revision
            - `clientId` string: Resource client id
            - `$type` string, required
            - `tags` ListOfTags: List of tags resource
              - …
            - `weight` number: Usage weight.
            - `created` string, date-time: Date time of contact creation
            - `modified` string, date-time: Date time of last time contact was modified
            - `userIdentificator` string: User's Identificator for EmailUser is email for phone is telephone, ....
            - `userType` 'EmailUser' | 'ViberUser' | 'MessengerUser' | 'WhatsappUser' | 'PhoneUser', required: User types
            - `email` string: User's email address
            - `firstName` string: User's first name
            - `lastName` string: User's last name
            - `onlineStatus` string: Online status (possible values can be seen at enums/UserStatus)
            - `lastActivityAt` string, date-time: Date time of the user's last activity
            - `displayName` string: User's display name, set only for senders and should be displayed per comment, mostly nullable
            - `changableDisplayName` boolean: ChangableDisplayName indicates that user has changable name (example github notification user)
            - `availabilityStatus` AvailabilityUserStatus: Subscription availability status for user
              - …
            - `statusUpdatedAt` string, date-time: Attendee status was last updated at time
            - `isOptional` boolean, required: Attendee is optional flag - if it isn't optional, it's required
            - `status` string: Attendee response status (defined in enums/ResponseTypeModel). Can be either Accept, Tentative, Decline, Organizer or NeedsAction
          - `size` integer, required: Page size
          - `offset` integer, required: Page offset
          - `offsetHistoryId` string: Offset history id
          - `totalSize` integer, required: Total size (if total size is at least one bigger than size, then there are more resources). Total size does not necessarily mean the actual total size
        - `location` string: Appointment location
        - `startTime` string, date-time: Appointment start time (is set to midnight if it is all day)
        - `endTime` string, date-time: Appointment end time (is set to midnight if it is all day)
        - `timezone` string: Appointment timezone
        - `startTimezone` string: Appointment start timezone (IANA) - falls back to Timezone
        - `stopTimezone` string: Appointment end timezone (IANA) - falls back to StartTimezone, then Timezone
        - `isAllDay` boolean: Flag indicating whether the appointment is all day
        - `isCancelled` boolean: Flag indicating whether the appointment was canceled
        - `masterId` string: Reference to appointment recurring master if is one instance of recurring appointment
        - `response` AppointmentResponse: Appointment response resource
          - `id` string: Resource id
          - `name` string: Resource name or title
          - `revision` string: Resource revision
          - `clientId` string: Resource client id
          - `$type` string, required
          - `status` string: Status of attendee for authorized user
        - `recurringMasterResponse` AppointmentResponse: Appointment response resource
          - `id` string: Resource id
          - `name` string: Resource name or title
          - `revision` string: Resource revision
          - `clientId` string: Resource client id
          - `$type` string, required
          - `status` string: Status of attendee for authorized user
        - `remindersInMinutes` ListOfResourcesOfInteger: List of resources
          - `resources` integer[]: List of resources
          - `size` integer, required: Page size
          - `offset` integer, required: Page offset
          - `offsetHistoryId` string: Offset history id
          - `totalSize` integer, required: Total size (if total size is at least one bigger than size, then there are more resources). Total size does not necessarily mean the actual total size
        - `sharedContext` Group: Group contact resource.
          - `id` string: Resource id
          - `name` string: Resource name or title
          - `revision` string: Resource revision
          - `clientId` string: Resource client id
          - `$type` string, required
          - `tags` ListOfTags: List of tags resource
            - `id` string: Resource id
            - `name` string: Resource name or title
            - `revision` string: Resource revision
            - `clientId` string: Resource client id
            - `$type` string, required
            - `tags` ListOfResourcesOfTag: List of resources
              - …
            - `parent` ResourceBase: Resource base
              - …
          - `weight` number: Usage weight.
          - `created` string, date-time: Date time of contact creation
          - `modified` string, date-time: Date time of last time contact was modified
          - `admins` ListOfResourcesOfUser: List of resources
            - `resources` User[]: List of resources
              - …
            - `size` integer, required: Page size
            - `offset` integer, required: Page offset
            - `offsetHistoryId` string: Offset history id
            - `totalSize` integer, required: Total size (if total size is at least one bigger than size, then there are more resources). Total size does not necessarily mean the actual total size
          - `members` ListOfResourcesOfUser: List of resources
            - `resources` User[]: List of resources
              - …
            - `size` integer, required: Page size
            - `offset` integer, required: Page offset
            - `offsetHistoryId` string: Offset history id
            - `totalSize` integer, required: Total size (if total size is at least one bigger than size, then there are more resources). Total size does not necessarily mean the actual total size
          - `description` string: Group description
          - `availableSharedTags` ListOfResourcesOfSharedTagBase: List of resources
            - `resources` SharedTagBase[]: List of resources
              - …
            - `size` integer, required: Page size
            - `offset` integer, required: Page offset
            - `offsetHistoryId` string: Offset history id
            - `totalSize` integer, required: Total size (if total size is at least one bigger than size, then there are more resources). Total size does not necessarily mean the actual total size
          - `sendMailDisabled` boolean: Flag indicating whether or not sending notification emails on group is disabled
          - `allowedImpersonatedSenders` ListOfResourcesOfUser: List of resources
            - `resources` User[]: List of resources
              - …
            - `size` integer, required: Page size
            - `offset` integer, required: Page offset
            - `offsetHistoryId` string: Offset history id
            - `totalSize` integer, required: Total size (if total size is at least one bigger than size, then there are more resources). Total size does not necessarily mean the actual total size
          - `groupType` string: Group type -> possible values are defined in GroupType
          - `groupSubType` string: Group sub type -> possible values are defined in GroupSubType
          - `syncingAccount` User: User contact resource.
            - `id` string: Resource id
            - `name` string: Resource name or title
            - `revision` string: Resource revision
            - `clientId` string: Resource client id
            - `$type` string, required
            - `tags` ListOfTags: List of tags resource
              - …
            - `weight` number: Usage weight.
            - `created` string, date-time: Date time of contact creation
            - `modified` string, date-time: Date time of last time contact was modified
            - `userIdentificator` string: User's Identificator for EmailUser is email for phone is telephone, ....
            - `userType` 'EmailUser' | 'ViberUser' | 'MessengerUser' | 'WhatsappUser' | 'PhoneUser', required: User types
            - `email` string: User's email address
            - `firstName` string: User's first name
            - `lastName` string: User's last name
            - `onlineStatus` string: Online status (possible values can be seen at enums/UserStatus)
            - `lastActivityAt` string, date-time: Date time of the user's last activity
            - `displayName` string: User's display name, set only for senders and should be displayed per comment, mostly nullable
            - `changableDisplayName` boolean: ChangableDisplayName indicates that user has changable name (example github notification user)
            - `availabilityStatus` AvailabilityUserStatus: Subscription availability status for user
              - …
          - `syncingAliasAccount` User: User contact resource.
            - `id` string: Resource id
            - `name` string: Resource name or title
            - `revision` string: Resource revision
            - `clientId` string: Resource client id
            - `$type` string, required
            - `tags` ListOfTags: List of tags resource
              - …
            - `weight` number: Usage weight.
            - `created` string, date-time: Date time of contact creation
            - `modified` string, date-time: Date time of last time contact was modified
            - `userIdentificator` string: User's Identificator for EmailUser is email for phone is telephone, ....
            - `userType` 'EmailUser' | 'ViberUser' | 'MessengerUser' | 'WhatsappUser' | 'PhoneUser', required: User types
            - `email` string: User's email address
            - `firstName` string: User's first name
            - `lastName` string: User's last name
            - `onlineStatus` string: Online status (possible values can be seen at enums/UserStatus)
            - `lastActivityAt` string, date-time: Date time of the user's last activity
            - `displayName` string: User's display name, set only for senders and should be displayed per comment, mostly nullable
            - `changableDisplayName` boolean: ChangableDisplayName indicates that user has changable name (example github notification user)
            - `availabilityStatus` AvailabilityUserStatus: Subscription availability status for user
              - …
          - `syncingComplete` boolean: For Shared Group type flag to know is shared synching complete
          - `syncingEnabled` boolean: For Shared Group type flag to know is shared synching enabled
          - `nudgeText` string: Group nudge text string.
          - `subscribed` boolean: Flag subscribed indicate that you are subscribe to see posts in this group in inbox
          - `threadingMode` 'Recipient' | 'Standard': Threading mode for syncing
          - `archived` boolean, required: For Shared Group type flag for archived mode
          - `colour` string: Flag subscribed indicate that you are subscribe to see posts in this group in inbox
          - `channelType` string: Group channel type.
          - `showTotalCountBadge` boolean: Flag ShowBadgeCount indicate that for this group is total count visible
          - `workspaceId` string: Workspace id for group
        - `onlineMeeting` OnlineMeeting: Online meeting information (hangouts, meets, teams, zoom)
          - `provider` string: Provider string (Returned by GET /appointment/list/options)
          - `joinUrl` string: Conference/online-meeting url
          - `joinPhoneNumbers` string[]: Conference/online-meeting phone numbers
          - `meetingId` string: Conference/online-meeting ID. Can be zoom room ID, google meets ID, ... Leave empty when creating new.
          - `password` string: Password or pin for the meeting
          - `name` string: Provider name or meeting name
          - `iconUrl` string: Provider icon or meeting specific icon
        - `hasAttachment` boolean, required: Has attachments
        - `attachments` AppointmentAttachment[]: Attachments
          - `fileName` string: file name of attachment
          - `fileUrl` string: location of file
          - `isInline` boolean, required: is inline
          - `mimeType` string: mime type
          - `mimeContentId` string: mime contentId
        - `recurrence` ListOfResourcesOfRecurrenceDetail: List of resources
          - `resources` RecurrenceDetail[]: List of resources
            - `frequency` string: Recurrence frequency -> possible values are defined in RecurrenceFrequency
            - `interval` integer, required: Recurrence interval
            - `dayOfWeek` string: Day of week to repeat recurrence -> only valid for weekly recurrence, possible values are defined in DayOfWeek
            - `dayOfMonth` integer: Day of month to repeat recurrence -> only valid for monthly recurrence
            - `month` string: Month to repeat recurrence in -> only valid for yearly recurrence, possible values defined in Month
            - `weekIndex` string: Week index, possible values defined in WeekIndex
            - `stop` string, date-time: Datetime when the recurrence should stop
          - `size` integer, required: Page size
          - `offset` integer, required: Page offset
          - `offsetHistoryId` string: Offset history id
          - `totalSize` integer, required: Total size (if total size is at least one bigger than size, then there are more resources). Total size does not necessarily mean the actual total size
      - `eventType` 'Updated' | 'Deleted', required: Appointment event type
    - `size` integer, required: Page size
    - `offset` integer, required: Page offset
    - `offsetHistoryId` string: Offset history id
    - `totalSize` integer, required: Total size (if total size is at least one bigger than size, then there are more resources). Total size does not necessarily mean the actual total size
  - `errorMessage` string: If error occours ErrorMessage is set
  - `historyId` string: history id

## Other responses

- `400`: Bad request. Check fields message and error code from response body for additional information.
- `401`: Unauthorized request. Check fields message and error code from response body for additional information.
- `429`: Too many requests. Check response header Retry-After indicating how long to wait before making a new request.
- `451`: Unavailable because account is not verified.

---

[API](https://skmtc.dev/intheloop/apis/loop-api.md) - [All operations](https://skmtc.dev/intheloop/apis/loop-api/llms.txt) - [OpenAPI document](https://skmtc.dev/intheloop/apis/loop-api/revisions/0892c5ba0787?raw)
