---
title: "Appointments.batch_create_or_update"
method: POST
path: "/entities/Appointments/batch-modify"
tags: ["Activity"]
---

# Appointments.batch_create_or_update

`POST /entities/Appointments/batch-modify`

## Request

- Base URL: `https://us-east.api.coevera.com/api/v100/rest/spaces/your_space_id`
- URL: `https://us-east.api.coevera.com/api/v100/rest/spaces/your_space_id/entities/Appointments/batch-modify`
- Auth: HTTP basic
- TypeScript: <https://skmtc.dev/coevera/apis/coevera-crm-api/docs/entities/Appointments/batch-modify/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates or updates Appointment records in one request: an item with an id updates that record, an item without one creates a new record.

## Query parameters

- `validation-level` integer
- `rollback-method` 0 | 1

## Request body

- BatchAppointmentInput[]
  - `media_transcription_id` string, uuid: Id of the linked Media record holding the activity's call recording / transcription, when available.
  - `activity_type_id` string, uuid: Id of the appointment type.
  - `currency_exchange_rates_list_id` string, uuid: Id of the currency exchange rate list applied to this appointment.
  - `description` string: Free-form description of the appointment.
  - `duration` number, double: Duration of the appointment, derived from start/end dates.
  - `end_date` string, date-time: End timestamp of the appointment.
  - `invitees_can_edit` boolean: True when invitees are allowed to edit the appointment. Defaults to false.
  - `is_recurrence_active` boolean: True when the recurrence series is still generating new occurrences. Read-only.
  - `is_recurrence_exception` boolean: True when this occurrence has been modified independently of the recurring series. Read-only.
  - `location` string: Free-text physical location of the appointment.
  - `meeting_url` object: Online meeting link associated with the appointment (join URL plus meeting type, e.g. Zoom, Teams). Empty when the appointment has no online meeting attached.
  - `occurence_date` string, date-time: Original date of this occurrence in the recurring series. Set automatically.
  - `organizer` string: Email of the user organising the appointment. Set automatically and used as the reply-to address in invitation emails.
  - `owner_id` string, uuid: Id of the appointment owner.
  - `recurrence_master_id` string, uuid: Id of the master appointment.
  - `recurrence_rule` string: iCalendar RRULE string describing the recurrence pattern (e.g. "FREQ=WEEKLY;BYDAY=MO,WE"). Empty for non-recurring appointments.
  - `recurrence_tzid` string: IANA timezone the recurrence rule is evaluated in.
  - `schedule_id` string, uuid: Id of the appointment schedule.
  - `schedule_tzid` string: IANA timezone the appointment was booked in (e.g. "Europe/Bratislava"). Used to evaluate availability against the schedule.
  - `start_date` string, date-time: Start timestamp of the appointment.
  - `subject` string: Short summary line shown in calendars and lists.
  - `unit_id` string, uuid: Id of the sales unit.
  - `revision` integer: Revision when entity was lastly changed.
  - `account_relations` object[]: Accounts this appointment is linked to.
    - `id` string, uuid: Id of the related ActivityRelation record.
  - `contact_relations` object[]: Contacts this appointment is linked to.
    - `id` string, uuid: Id of the related ActivityRelation record.
  - `lead_relations` object[]: Leads this appointment is linked to.
    - `id` string, uuid: Id of the related ActivityRelation record.
  - `opportunity_relations` object[]: Opportunities this appointment is linked to.
    - `id` string, uuid: Id of the related ActivityRelation record.
  - `project_relations` object[]: Projects this appointment is linked to, including the per-objective ordering.
    - `id` string, uuid: Id of the related ActivityRelation record.
  - `quote_relations` object[]: Quotes this appointment is linked to.
    - `id` string, uuid: Id of the related ActivityRelation record.
  - `custom_entity_relations` object[]: Custom entity records this appointment is linked to.
    - `id` string, uuid: Id of the related ActivityRelation record.
  - `invitees_contacts` object[]: Non-user invitees on this appointment, identified by email. Contacts are auto-linked when their email matches an existing Contact record.
    - `id` string, uuid: Id of the related AppointmentContactInviteesRelation record.
  - `invitees_clients` object[]: Internal-user invitees on this appointment.
    - `id` string, uuid: Id of the related AppointmentClientInviteesRelation record.
  - `exchange_entity_id` string: External identifier of the record in the linked third-party service (e.g. Google, Microsoft 365, Exchange). Maintained by the sync engine.
  - `gapi_entity_id` string: External identifier of the record in the linked third-party service (e.g. Google, Microsoft 365, Exchange). Maintained by the sync engine.
  - `o365_entity_id` string: External identifier of the record in the linked third-party service (e.g. Google, Microsoft 365, Exchange). Maintained by the sync engine.
  - `documents` object[]: Documents linked to this appointment.
    - `id` string, uuid: Id of the related CloudObjectRelation record.
  - `comments` object[]: Comments authored on this appointment.
    - `id` string, uuid: Id of the related ActivityComment record.
  - `tags` object[]: Tag labels applied to this appointment.
    - `id` string, uuid: Id of the related TagRelation record.
  - `id` string, uuid: ID of object to update.

## Response `200`

Result per item, in request order: the id of the created or updated record, or the error.

- object
  - `success` boolean: True when the request succeeded; false on error.
  - `data` union[]
    - union
      - string, uuid: Id of the created or updated record.
      - Error: The body of every REST error. `code` and `name` are stable identifiers; `message` is for people. The full list of codes is at https://developers.coevera.com/reference/errors/.
        - `http_status` integer, required: HTTP status code.
        - `code` integer: Numeric code of the API error.
        - `name` string: Name of the API error.
        - `message` string: Message describing the error.
        - `success` boolean, required: Always false on error.

## Other responses

- `400`: Bad request: a bad or unknown parameter (codes 117, 118), a missing permission (code 50), conflicting data (code 2002) or any other API error. The REST API answers 400 where others answer 403 or 409; check `code`.
- `401`: Not authenticated: missing or wrong credentials, a credential of another space, or an expired token (code 401, ERROR_UNAUTHORIZED).
- `422`: Validation failed (code 40000, with the failing fields) or a required parameter is missing (code 119). By default one failed item fails a whole batch and nothing is written.
- `429`: Too many requests (code 182). Wait for the seconds in Retry-After, then retry.
- `500`: Unexpected server error (code 1000, ERROR_UNKNOWN).

---

[API](https://skmtc.dev/coevera/apis/coevera-crm-api.md) - [All operations](https://skmtc.dev/coevera/apis/coevera-crm-api/llms.txt) - [OpenAPI document](https://skmtc.dev/coevera/apis/coevera-crm-api/revisions/40ebbc83f179?raw)
