---
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/freebusy"
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/freebusy`

## Request

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

## Query parameters

- `calendarInstanceId` string
- `userEmails` string[]
- `dateTimeStart` string, date-time
- `dateTimeEnd` string, date-time

## Headers

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

## Response `200`

OK

- UserBusy[]
  - `identificator` string: Gets or sets the unique identifier (email) associated with the object.
  - `busyPeriods` BusyPeriod[]: Gets or sets the collection of time periods during which the resource is considered busy.
    - `startTime` string, date-time, required: Gets or sets the start time of busy period.
    - `endTime` string, date-time, required: Gets or sets the end time of busy period.
  - `workingHour` WorkingHour: Represents a scheduled period of work, typically defined by a start and end time within a working day.
    - `startTime` string, time: Working start time.
    - `endTime` string, time: Working end time.

## 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)
