---
title: "Import a calendar"
method: POST
path: "/icalendar-api/imported-calendars"
tags: ["Calendar Sync (iCal import)"]
---

# Import a calendar

`POST /icalendar-api/imported-calendars`

To import external calendar events into Guesty Calendar via the iCalendar link,
      you must first create an imported-calendar entity. 
      This entity stores the import settings, such as the URL, calendar name, state, and events adjustment. 
      Once the entity is created, the import sync process will be initiated.

## Request body

- object
  - `name` string, required
  - `url` string, required
  - `listingId` string, required
  - `adjustmentValueStart` -2 | -1 | 0 | 1 | 2, required
  - `adjustmentValueEnd` -2 | -1 | 0 | 1 | 2, required

## Response `200`

Imported calendar created successfully

- object
  - `id` string, required — Id of an imported calendar
  - `listingId` string, required — Related listing id
  - `accountId` string, required — Related account id
  - `createdAt` string, required — Time of creation of an imported calendar
  - `updatedAt` string, required — Time of last update of an imported calendar properties
  - `status` 'active' | 'paused' | 'warning' | 'suspended', required — Status of an imported calendar
  - `url` string, required — URL of an imported calendar
  - `name` string, required — Name of an imported calendar
  - `lastSyncedAt` string — Timestamp of last successful sync of an imported calendar
  - `adjustmentValueStart` number, required — Defines offset for start date of imported calendar events
  - `adjustmentValueEnd` number, required — Defines offset for end date of imported calendar events

## Other responses

- `201`
- `404` — Listing not found

---

[API](https://skmtc.net/guesty/apis/guesty-open-api.md) · [All operations](https://skmtc.net/guesty/apis/guesty-open-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/guesty/guesty-open-api/versions/7c62644070f2/schema)
