Skip to main content
POST
Upsert calendar event

Restrictions

Usage

  • The event covers the days [start_at, end_at), dates in YYYY-MM-DD; end_at must be later than start_at.
  • Omit event_id to create an event; a given event_id must be an existing event of this calendar.
  • The write clears the calendar’s other own events off the same days: an event fully inside the range is deleted, one partly inside is shortened, and one spanning the range is split in two, so the latest write decides those days.
  • Only personal calendars can be changed, and only by the account owner, an administrator, the calendar creator, or a member of the calendar’s team; other callers get AccessDenied.
  • Every call is recorded in the account audit log.

Authorizations

app_key
string
query
required

APP Key created in the Flashduty console under My → APP Key. Send it as the app_key query parameter or in the Fd-App-Key request header. Its effective access is the intersection of the key's permission scope and the creator's current role permissions. Keep it secret.

Body

application/json

Calendar event upsert request. Provide event_id to update an existing event; omit it to create a new one.

cal_id
string
required

Calendar ID; obtain it from POST /calendar/list.

start_at
string
required

Event start date in YYYY-MM-DD.

end_at
string
required

Event end date in YYYY-MM-DD (exclusive).

is_off
boolean
required

Whether the event marks a non-working day. true = day off, false = working day override.

event_id
string

Event ID. Omit when creating.

Maximum string length: 63
summary
string

Event summary. Optional.

Maximum string length: 39
description
string

Event description.

Maximum string length: 499

Response

Success

Success response envelope. On every 2xx response, request_id identifies the call (also mirrored in the Flashcat-Request-Id header) and data holds the endpoint-specific payload. Failure responses use a different shape — see ErrorResponse.

request_id
string
required

Unique ID for this request. Mirrored in the Flashcat-Request-Id response header. Include it when reporting issues.

Example:

"01HK8XQE3Z7JM2NTFQ5YJ8P9R4"

data
object

Response returned by /calendar/event/upsert.