Topolo Docs Topolo Platform
Open workspace

Create external calendar — Calendar

Register an ICS/manual calendar without importing busy time yet.

Register an ICS/manual calendar without importing busy time yet.

Action: app_topolo_calendar.external_calendars.create · POST /api/admin/external-calendars

Declared permission: app_topolo_calendar.availability:write. For authorized Calendar users; permissions and resource access still apply.

Before you start

  • Use the current credential to confirm the production organization and inspect this exact action before preparing a call.
  • Declared permission: app_topolo_calendar.availability:write. Permission discovery is not a grant.
  • Discover the authorized Calendar workspace and pass it as resourceType=workspace/resourceId separately from this action input. Calendar records and IDs are scoped to the selected host/workspace.
  • Validate and plan the exact payload, obtain effect-specific authorization, then execute unchanged only in a separately authorized operational task. Do not run these synthetic inputs.

Inputs and field meanings

FieldPresenceDeclared constraintMeaning
provideroptionalstring; enum=["ics", "manual"]Declared provider: create supports manual/ics, OAuth start google/microsoft. Use the action-specific enum.
accountEmailrequiredstringIntended external-calendar account email; a label/identity input, not evidence the provider account is connected.
displayNameoptionalnullable/unionHost or external calendar display name. host.update requires it; external-calendar displayName is optional.

Worked request and response

Source-reviewed illustration only. Nothing below was executed; all identifiers, counts, states, credentials and URLs are synthetic. Replace identifiers through discovery before any separately authorized call.

Resource context: workspace; it is not an extra action input field.

Illustrative action input:

{
  "provider": "manual",
  "accountEmail": "host@example.com",
  "displayName": "Example busy calendar"
}

Illustrative HTTP 201 source response:

{
  "externalCalendar": {
    "id": "cal_example",
    "hostId": "hst_example",
    "provider": "manual",
    "accountEmail": "host@example.com",
    "displayName": "Example busy calendar",
    "providerCalendarId": null,
    "nexusConnectionId": null,
    "connectionStatus": null,
    "connectionStatusReason": null,
    "lastSyncedAt": null,
    "status": "active",
    "syncCursor": null,
    "lastError": null,
    "createdAt": "2026-11-01T00:00:00.000Z",
    "updatedAt": "2026-11-01T00:00:00.000Z"
  }
}

externalCalendar is a local registration. A null lastSyncedAt means this illustration has not imported busy time. Use sync with a deliberate full snapshot to suppress slots.

The illustrative response passes the declared structural schema. This establishes only schema compatibility, not deployed shape, values, authorization or business outcome.

Effects and verification

  • Creates a manual/ICS calendar record; does not pull an external feed or connect OAuth by itself.
  1. Read external_calendars.list and retain the returned ID/provider, then separately authorize sync if intended.

Refusals and recovery

Selected source refusals are listed below; runtime middleware can return additional structured errors.

HTTPErrorSupported response
403forbiddenReconcile the declared permission, organization and verified resource grant with the legitimate access owner; do not switch context to bypass a refusal.
404no_hostRead host.get; if it returns host:null, create the intended workspace host through host.update before retrying.
400invalid_providerThis action supports manual or ics; use the specific OAuth/CalDAV action for those providers.
400invalid_account_emailSupply the intended account email.

Recovery: Disconnect the newly created record after verifying its ID and current busy-block effects; deletion can reopen slots.

After an uncertain mutation, reconcile the named records and provider/delivery evidence before repeating it.

  • app_topolo_calendar.external_calendars.list: Discover external calendar IDs, connection state and sync history.
  • app_topolo_calendar.external_calendars.sync: Replace an external calendar’s imported busy-time snapshot.
  • app_topolo_calendar.external_calendars.delete: Disconnect a calendar and remove its local busy-time effect.

Declared schemas and provenance

The hidden action guide carries these exact current declared schemas. They are not rewritten to make the illustrations pass.

Input schema:

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "provider": {
      "type": "string",
      "enum": [
        "ics",
        "manual"
      ]
    },
    "accountEmail": {
      "type": "string",
      "format": "email",
      "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
    },
    "displayName": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "accountEmail"
  ],
  "additionalProperties": false
}

Output schema:

{
  "type": "object",
  "title": "Create external calendar response",
  "description": "Operation result returned by external_calendars.create.",
  "properties": {
    "success": {
      "type": "boolean"
    },
    "id": {
      "type": "string"
    },
    "data": {
      "oneOf": [
        {
          "type": "object",
          "title": "external record",
          "properties": {
            "id": {
              "type": "string",
              "description": "Stable identifier when the external exposes one."
            }
          },
          "additionalProperties": true
        },
        {
          "type": "object",
          "additionalProperties": true
        }
      ]
    },
    "result": {
      "type": "object",
      "additionalProperties": true
    },
    "message": {
      "type": "string"
    }
  },
  "additionalProperties": true,
  "x-topolo-contract-source": "derived-action-metadata",
  "x-topolo-contract-precision": "structural"
}

Source: TopoloCalendar@b378ceb73800ee1d1e6c4ff6f0b4179918cf632c, apps/api/src/routes/admin-external-calendars.ts. Current catalog metadata and source were compared without executing the application.

  • Source-reviewed synthetic input/response; not captured or executed.
  • Source revision is not proof of current deployment, caller access, provider connection or notification delivery.
  • The illustrative response passes the declared structural schema. This establishes only schema compatibility, not deployed shape, values, authorization or business outcome.