GET /api/v4/workspaces/calendars
List of the workspace calendars

Request headers

Only registered user can perform this action
  Authentication - string - required
    Example of Authentication header : "Bearer TOKEN_FETCHED_FROM_SERVER_DURING_REGISTRATION"

Success response body

[
  {
    "id": 1,
    "name": "Team Schedule",
    "url": "https://calendar.example.com/team.ics",
    "personal": false,
    "last_synced_at": null,
    "user_id": 42,
    "workspace_id": 7
  },
  ...
]

Error response body (403) — beta gate (GP-16587, temporary)

While CALENDARS_BETA_ENABLED=true only users granted `calendars_enabled`
may call this endpoint; open to everyone once the variable is off.
{
  "message": "This feature is not available for your account yet.",
  "code": "feature_not_available"
}

POST /api/v4/workspaces/calendars
Connect a workspace iCal (admins)

Request headers

Only registered user can perform this action
  Authentication - string - required
    Example of Authentication header : "Bearer TOKEN_FETCHED_FROM_SERVER_DURING_REGISTRATION"

Request body example

{
  "calendar": {
    "name": "Team Schedule",
    "url": "https://calendar.example.com/team.ics"
  }
}

Success response body

{
  "id": 1,
  "name": "Team Schedule",
  "url": "https://calendar.example.com/team.ics",
  "personal": false,
  "last_synced_at": null,
  "user_id": 42,
  "workspace_id": 7
}

Duplicate response body (422)

{
  "message": "This iCal is already connected",
  "email": "owner@example.com"
}

Error response body (403) — beta gate (GP-16587, temporary)

While CALENDARS_BETA_ENABLED=true only users granted `calendars_enabled`
may call this endpoint; open to everyone once the variable is off.
{
  "message": "This feature is not available for your account yet.",
  "code": "feature_not_available"
}

Params

Param name Description
calendar
required

Validations:

  • Must be a Hash

calendar[name]
required

Calendar name (max 100 characters)

Validations:

  • Must be a String

calendar[url]
required

iCal feed URL (webcal:// or https://)

Validations:

  • Must be a String


DELETE /api/v4/workspaces/calendars/:id
Disconnect a workspace calendar

Request headers

Only registered user can perform this action
  Authentication - string - required
    Example of Authentication header : "Bearer TOKEN_FETCHED_FROM_SERVER_DURING_REGISTRATION"

Success response body

{
  success: true
}

Error response body (403) — beta gate (GP-16587, temporary)

While CALENDARS_BETA_ENABLED=true only users granted `calendars_enabled`
may call this endpoint; open to everyone once the variable is off.
{
  "message": "This feature is not available for your account yet.",
  "code": "feature_not_available"
}

Params

Param name Description
id
required

ID of calendar

Validations:

  • Must be a Integer