Skip to main content
POST
Create calendar

Restrictions

Usage

  • An account can hold at most 20 calendars: once it has 20, a create call by any member returns InvalidParameter.
  • cal_name must be unique within the account, timezone must be a valid IANA name, and a nonzero team_id must be a team of the account; otherwise the call returns InvalidParameter.
  • 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

Create calendar request. cal_name is required.

cal_name
string
required

Calendar display name; must be unique within the account.

Required string length: 1 - 39
description
string

Calendar description.

Maximum string length: 499
timezone
string
default:Asia/Shanghai

IANA timezone, e.g. America/New_York. Defaults to Asia/Shanghai when empty; an invalid name returns InvalidParameter.

team_id
integer<uint64>

Owning team ID; 0 or omitted means no team. A nonzero ID must be a team of the account.

workdays
integer[]

Weekly working days, 0 = Sunday … 6 = Saturday. Days not listed are non-working days. When empty, no weekday is treated as non-working.

Required range: 0 <= x <= 6
extra_cal_ids
string[]

Additional public calendar IDs to inherit events from — region.official.holiday IDs such as zh-cn.china.official, plus at most one exchange.holiday calendar. Linking an exchange calendar sets this calendar's timezone to the exchange's, overriding the value you send; linking two of them returns InvalidParameter.

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

Create calendar response.