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

# AppointmentSchedules.batch_create_or_update

`POST /entities/AppointmentSchedules/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/AppointmentSchedules/batch-modify`
- Auth: HTTP basic
- TypeScript: <https://skmtc.dev/coevera/apis/coevera-crm-api/docs/entities/AppointmentSchedules/batch-modify/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates or updates AppointmentSchedule 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

- BatchAppointmentScheduleInput[]
  - `appointment_description` string: Description applied to appointments booked through this schedule.
  - `appointment_duration` number, double: Duration of each booked appointment.
  - `appointment_location` string: Location applied to appointments booked through this schedule.
  - `appointment_location_type` 0 | 1 | 2: Where booked appointments take place: the location given in appointment_location (Custom), or a Microsoft Teams (Microsoft) or Zoom (Zoom) online meeting. Integer enum value: 0 - Custom, 1 - Microsoft, 2 - Zoom
  - `appointment_owner_id` string, uuid: Id of the user receiving the booking.
  - `appointment_subject` string: Subject applied to appointments booked through this schedule.
  - `appointment_subject_uses_schedule_name` boolean: When true, booked appointments use the schedule_name as their subject instead of appointment_subject.
  - `appointment_type_id` string, uuid: Id of the appointment type used for appointments booked through the schedule.
  - `availability_tzid` string: IANA timezone (e.g. "Europe/Bratislava") in which availability windows are defined.
  - `buffer_time_after` integer: Buffer in seconds kept free after each booked appointment (e.g. 900 = 15 minutes).
  - `buffer_time_before` integer: Buffer in seconds kept free before each booked appointment (e.g. 900 = 15 minutes).
  - `confirmation_page_type` 0 | 1: What is shown to the booker after confirming (e.g. default Coevera page or a custom redirect URL). Integer enum value: 0 - ConfirmationPage, 1 - ExternalUrl
  - `confirmation_page_url` string: Custom URL the booker is redirected to after confirming. Used when confirmation_page_type selects a custom redirect.
  - `is_enabled` boolean: Master switch for the schedule. Disabled schedules do not accept new bookings.
  - `minimum_notice_time` integer: Minimum notice in seconds required before a slot can be booked (e.g. 3600 = one hour).
  - `name` string: Admin-only name for the schedule, used in pickers and lists. Not shown to bookers; use schedule_name for the public-facing name.
  - `owner_id` string, uuid: Id of the schedule owner.
  - `planning_day_offset` integer: With Offset planning, how many days ahead the schedule remains bookable.
  - `planning_period_from` string, date: With Period planning, first date bookings are accepted for.
  - `planning_period_to` string, date: With Period planning, last date bookings are accepted for.
  - `planning_type` 0 | 1 | 2: Time window in which the schedule accepts bookings: any future date (Infinite), up to planning_day_offset days ahead (Offset), or between planning_period_from and planning_period_to (Period). Integer enum value: 0 - Infinite, 1 - Offset, 2 - Period
  - `reminder_email_enabled` boolean: True when a reminder email is sent to invitees ahead of the booked appointment.
  - `reminder_email_offset` integer: Time before the appointment when the reminder email is sent. Interpreted using reminder_email_offset_type.
  - `reminder_email_offset_type` 0 | 1 | 2 | 3: Time unit of reminder_email_offset: Minute, Hour, Day or Week. Integer enum value: 0 - Minute, 1 - Hour, 2 - Day, 3 - Week
  - `reply_company_email_id` string, uuid: Id of the company email used as the From / Reply-To on schedule confirmation emails. Empty falls back to the team space default.
  - `schedule_name` string: Public-facing name of the schedule, shown to bookers on the booking page.
  - `time_increment` integer: Step in seconds between offered start times (e.g. 900 means slots at :00, :15, :30, :45).
  - `type` 0 | 1: Kind of meetings booked through the schedule: one-to-one (OneToOne) or group (Group) meetings. Integer enum value: 0 - OneToOne, 1 - Group
  - `url` string: Public URL slug of the schedule, used to share the booking page.
  - `additional_fields_data` object[]: Custom fields the booker is asked to fill in on the booking page, in display order.
    - `field_id` string, uuid, required: Id of the appointment field the booker fills in; the value is saved on the booked appointment.
    - `label` string, required: Label of the field on the booking page.
    - `is_required` boolean, required: True when the booker must fill in the field.
  - `availability_data` object: Weekly availability windows (per weekday) used to compute bookable slots, in the schedule's availability_tzid timezone.
  - `appointment_invitees_data` object[]: Default invitees added to appointments booked through this schedule (Coevera users or external email addresses).
    - `entity_id` string, uuid: Id of the user or contact; empty for an Email invitee.
    - `email` string, required: Email address of the invitee.
    - `type` 1 | 2 | 3, required: Kind of invitee: a Coevera user (Client), a contact (Contact) or an external email address (Email). Only Client invitees are added to booked appointments. Integer enum value: 1 - Client, 2 - Contact, 3 - Email
  - `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)
