---
title: "Создать событие"
method: POST
path: "/api/v1/calendar/events"
tags: ["Calendar"]
---

# Создать событие

`POST /api/v1/calendar/events`

## Request

- Base URL: `https://erp.akeda.ru`
- URL: `https://erp.akeda.ru/api/v1/calendar/events`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-Api-Key`
  - OAuth 2 (authorization code, authorization URL `https://erp.akeda.ru/oauth2/authorize`, token URL `https://erp.akeda.ru/oauth2/token`, scopes: `akeda:delegate`)
  - HTTP bearer

Создаёт событие календаря.

## Headers

- `X-Tenant` string, required

## Request body

- CalendarEventCreate
  - `owner` integer
  - `title` string, required
  - `description` string
  - `location` string
  - `starts_at` string, required
  - `ends_at` string, required
  - `timezone` string
  - `all_day` boolean
  - `important` boolean
  - `visibility` 'private' | 'public'
  - `busy_status` 'busy' | 'free'
  - `recurrence_freq` 'none' | 'daily' | 'weekly' | 'monthly' | 'yearly'
  - `recurrence_interval` integer
  - `recurrence_days` integer[]
  - `recurrence_month_day` integer
  - `recurrence_until` string
  - `recurrence_count` integer
  - `status` 'confirmed' | 'cancelled' | 'tentative'
  - `participants` CalendarParticipantInput[]
    - `user` integer
    - `external_name` string
    - `external_email` string, email
    - `role` 'required' | 'optional' | 'organizer'
    - `response_status` 'needs_action' | 'accepted' | 'declined' | 'tentative'
  - `payload` object
  - `export_target` string: local либо `<UUID подключения>/<календарь>`: календарь — его адрес (url) или id из selected_calendars подключения (GET /api/v1/calendar/connectors), можно с кодированием, как в форме, или коротким последним сегментом адреса (UUID коллекции iCloud). Сервер хранит каноничную запись формы. Подключение должно выгружать события (direction both или export), календарь — быть включён и доступен для записи; иначе 400 calendar.export_target_unavailable, нераспознанная запись — 400 calendar.export_target_format.
  - `calendar_source` string
  - `conference_url` string: Ссылка на видеовстречу: пусто либо абсолютный https:// без пробелов. Если поля видеовстречи не переданы, сервер применяет личную настройку «Для новых встреч»: новая комната Яндекс Телемоста или постоянная ссылка.
  - `conference_provider` '' | 'telemost' | 'personal' | 'link': Источник ссылки. telemost без ссылки — сервер заводит комнату Яндекс Телемоста от имени человека; Телемост должен быть подключён в настройках календаря. Пусто при непустой ссылке означает link.
  - `conference_id` string: Идентификатор конференции Телемоста; для других источников сбрасывается.

## Response `201`

Созданное событие

- CalendarEventEnvelope
  - `ok` true, required
  - `item` CalendarEvent, required
    - `id` string, uuid, required
    - `owner` integer, nullable, required
    - `owner_user_id` integer, nullable
    - `owner_name` string, required
    - `title` string, required
    - `description` string, required
    - `location` string, required
    - `starts_at` string, required
    - `ends_at` string, required
    - `timezone` string, required
    - `all_day` boolean, required
    - `important` boolean, required
    - `visibility` 'private' | 'public', required
    - `busy_status` 'busy' | 'free', required
    - `recurrence_freq` 'none' | 'daily' | 'weekly' | 'monthly' | 'yearly', required
    - `recurrence_interval` integer, required
    - `recurrence_days` integer[], required
    - `recurrence_month_day` integer, nullable
    - `recurrence_until` string, nullable
    - `recurrence_count` integer, nullable
    - `status` 'confirmed' | 'cancelled' | 'tentative', required
    - `source` string, required
    - `export_target` string, required
    - `payload` object
    - `booking` string, uuid
    - `booking_id` string, uuid
    - `participants` CalendarParticipant[], required
      - `id` string, uuid, required
      - `user` integer, nullable, required
      - `user_name` string, required
      - `external_name` string, required
      - `external_email` string, email, required
      - `role` 'required' | 'optional' | 'organizer', required
      - `response_status` 'needs_action' | 'accepted' | 'declined' | 'tentative', required
    - `occurrence_id` string
    - `is_occurrence` boolean, required
    - `master_event` string, uuid
    - `created_at` string, required
    - `updated_at` string, required
    - `conference_url` string: Ссылка на видеовстречу (https). Поля нет, если видеовстречи нет.
    - `conference_provider` 'telemost' | 'personal' | 'link': Откуда ссылка: telemost — комната Яндекс Телемоста, personal — постоянная ссылка человека, link — вставлена вручную.
    - `conference_id` string: Идентификатор конференции Яндекс Телемоста; только при conference_provider=telemost.
  - `id` string, uuid, required
  - `title` string, required
  - `starts_at` string, required
  - `ends_at` string, required

## Other responses

- `400`: Некорректный запрос или нарушение бизнес-правила
- `401`: Сессия, ключ или кабинет не подтверждены
- `403`: Текущая роль не имеет требуемого права
- `500`: Внутренняя ошибка без раскрытия server-only деталей

---

[API](https://skmtc.dev/akeda/apis/akeda-erp-client-api.md) · [All operations](https://skmtc.dev/akeda/apis/akeda-erp-client-api/llms.txt) · [OpenAPI document](https://skmtc.dev/akeda/apis/akeda-erp-client-api/revisions/3c60ded179f2?raw)
