---
title: "Create calendar commands"
method: POST
path: "/api/v1/campaigns/calendar-commands/create"
tags: ["campaigns"]
---

# Create calendar commands

`POST /api/v1/campaigns/calendar-commands/create`

## Request

- Base URL: `https://point11.ai`
- URL: `https://point11.ai/api/v1/campaigns/calendar-commands/create`
- Auth: OAuth 2 (authorization code, authorization URL `https://auth.point11.ai/oauth2/authorize`, token URL `https://auth.point11.ai/oauth2/token`)

Change one customer's scheduled interaction on a campaign calendar: move it, cancel it, undo an earlier change (naming that receipt's `commandId`), or schedule a new one. It changes a live schedule, so the user must approve. The Idempotency-Key is the command id: a retry with the same key and body replays the receipt. A refusal is 409 CONFLICT with `details.reason`: `conflict`, the revision moved (read again, or take `details.current`, and retry; the only one that may then succeed); `locked`, the interaction's state, a paused subscription or an expired undo refuses it; `occupied`, the customer's month already holds an interaction, live or cancelled; `idempotency_key_reused`, the command id was spent on another change or caller (use a new key; one the door still holds for another request is IDEMPOTENCY_CONFLICT with that reason). Returns the receipt with the schedule before and after.

## Headers

- `Point11-Organization` string, uuid
- `Idempotency-Key` string, uuid, required
- `Point11-Confirm` 'true', required

## Request body

- CampaignsCalendarCommandsCreateRequest
  - `occurrence` union, required: The occurrence to change, or for a create the campaign's UTC month (`cycle`).
    - object
      - `campaignType` 'discovery' | 'research' | 'experience', required
      - `campaignId` string, uuid, required
      - `occurrenceId` string, required
    - object
      - `campaignType` 'discovery' | 'research' | 'experience', required
      - `campaignId` string, uuid, required
      - `cycle` string, required
  - `expectedRevision` string: The occurrence's `revision` the change was made against: required to move, cancel or undo, absent for a create.
  - `change` union, required
    - object
      - `kind` 'move', required
      - `targetAt` string, date-time, required
      - `timeZone` string, required
    - object
      - `kind` 'cancel', required
    - object
      - `kind` 'undo', required
      - `originalCommandId` string, uuid, required
    - object
      - `kind` 'create', required
      - `customerId` string, uuid, required
      - `targetAt` string, date-time, required
      - `timeZone` string, required

## Response `200`

Success.

- CampaignsCalendarCommandsCreateResponse
  - `receipt` object, required
    - `commandId` string, required: The command id; an undo names it as `originalCommandId`.
    - `occurrence` object, required: The occurrence the command named; for a create, the occurrence it made.
      - `campaignType` 'discovery' | 'research' | 'experience', required
      - `campaignId` string, required
      - `occurrenceId` string, required
    - `resultOccurrence` object, required
      - `campaignType` 'discovery' | 'research' | 'experience', required
      - `campaignId` string, required
      - `occurrenceId` string, required
    - `before` object, nullable, required: Null for a created occurrence; undoing it cancels it.
      - `targetAt` string, required
      - `timeZone` string, required
      - `cancelled` boolean, required
    - `after` object, required
      - `targetAt` string, required
      - `timeZone` string, required
      - `cancelled` boolean, required
    - `revision` string, required
  - `replayed` boolean, required: True when this key's committed receipt was replayed.

## Other responses

- `400`: The input, query, or Idempotency-Key is invalid.
- `401`: The bearer is missing, expired, or not accepted.
- `402`: Billing refused the write: the code names the reason and `details.reason` carries it.
- `403`: The credential lacks the operation's scope or role, or the operation needs a different door.
- `404`: The resource or organization does not exist for this caller.
- `405`: This path takes another HTTP method, named in `Allow`.
- `409`: The request conflicts with current state or with prior use of its Idempotency-Key.
- `413`: The request, or the answer it asks for, is too large; narrow it.
- `429`: The credential's rate budget is spent; retry after `Retry-After` seconds.
- `500`: An unexpected server failure; retry later. Only `request_id` identifies it.
- `503`: A dependency is temporarily unavailable; retry after `Retry-After` seconds.
- `default`: Another status a product answers for its own refusal (for example `415` for an unsupported attachment); branch on `code`.

---

[API](https://skmtc.dev/point11/apis/point11-api.md) · [All operations](https://skmtc.dev/point11/apis/point11-api/llms.txt) · [OpenAPI document](https://skmtc.dev/point11/apis/point11-api/revisions/36a84c7aca11?raw)
