# Update an event type (/docs/api-reference/scheduling-event-types/update-scheduling-event-type)

Changes what's given. Existing bookings keep what they were booked with. Set `status` to `archived` to stop new bookings.

`PATCH https://api.coss.com/v1/scheduling/event_types/{event_type}`

Authenticate with your API key as a bearer token (`Authorization: Bearer coss_test_…`). Responses are JSON with snake_case fields; errors are `{ error: { type, code, message, param?, issues?, request_id } }` (https://coss.com/docs/api-reference/errors.md).

## Path parameters

- `event_type` (string, required): The event type's id or uid.

## Request body

- `uid` (string | null, 1-255 characters)
- `title` (string, 1-120 characters): Shown to attendees and in emails. Host calendars always show a neutral title.
- `duration_minutes` (integer, 5-1440)
- `duration_options` (integer[], at most 10 items)
- `step_minutes` (integer, 5-1440): How far apart slots start. Default: the duration.
- `grid_time_zone` (string | null, 1-64 characters): The zone slots align in. Default: each host's own.
- `buffer_before_minutes` (integer, 0-480)
- `buffer_after_minutes` (integer, 0-480)
- `min_notice_minutes` (integer, 0-525600)
- `booking_window` (object | null)
  - One of (1):
    - `kind` ("rolling", required)
    - `days` (integer, required, 1-730)
  - One of (2):
    - `kind` ("range", required)
    - `from` (string, required): A local date in the schedule's time zone.
    - `to` (string, required): A local date in the schedule's time zone.
- `limits` (object[], at most 4 items)
  - `period` ("day" | "week", required): In the host's time zone.
  - `max` (integer, required, 1-1000)
  - `scope` ("event_type" | "host", default "event_type"): Count this event type's bookings, or all of the host's.
- `capacity` (integer | null, 2-10000): Attendees per session. Required for, and only allowed on, `group`.
- `requires_approval` (boolean)
- `approval_ttl_minutes` (integer, 5-43200)
- `hold_ttl_seconds` (integer, 60-86400)
- `cancel_notice_minutes` (integer, 0-525600): Attendees can't cancel closer to the start than this. API keys can.
- `reschedule_notice_minutes` (integer, 0-525600)
- `questions` (object[], at most 25 items)
  - `key` (string, required)
  - `type` ("text" | "textarea" | "select" | "radio" | "checkbox" | "phone" | "email" | "number", required)
  - `label` (string, required, 1-200 characters)
  - `required` (boolean, default false)
  - `options` (string[], at most 50 items, default [])
- `locations` (object[], at most 10 items)
  - One of (1):
    - `type` ("link", required)
    - `url` (string | null, uri, at most 2000 characters, default null)
  - One of (2):
    - `type` ("phone", required)
    - `number` (string | null, at most 32 characters, default null)
  - One of (3):
    - `type` ("in_person", required)
    - `address` (string | null, at most 500 characters, default null)
  - One of (4):
    - `type` ("google_meet", required)
  - One of (5):
    - `type` ("microsoft_teams", required)
- `host_filter` (map of string | string[] | null): Pool members also include active hosts matching all of these attributes.
- `metadata` (map of string): Your own key-value pairs. Don't put sensitive data here.
- `status` ("active" | "archived")
- `hosts` (object[], at most 500 items): Replaces the assigned hosts. Removed hosts keep their existing bookings.
  - `host` (string, required): The host's id or uid.
  - `role` ("required" | "member", default "member"): `required` hosts must all be free; one `member` is chosen for a booking.
  - `weight` (integer, 1-10000, default 100): Share of a pool's bookings relative to other members.
  - `schedule` (string | null, default null): A schedule of this host's. Default: their default schedule.

## Example request

TypeScript (the `coss` package):

```ts
import { Coss } from "coss";

const coss = new Coss({
  apiKey: process.env.COSS_API_KEY,
  baseUrl: "https://api.coss.com",
});

const { data, error } = await coss.scheduling.eventTypes.update({
  value: "evtype_01kd2m9a0b1c2d3e4f5g6h7j8m",
}, {
  min_notice_minutes: 240,
});
```

HTTP:

```sh
curl -X PATCH "https://api.coss.com/v1/scheduling/event_types/evtype_01kd2m9a0b1c2d3e4f5g6h7j8m" \
  -H "Authorization: Bearer $COSS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "min_notice_minutes": 240
}'
```

## Response 200

The event type.

- `object` ("scheduling.event_type", required)
- `id` (string, required)
- `uid` (string | null, required)
- `title` (string, required)
- `kind` ("one_on_one" | "pool" | "collective" | "group", required)
- `status` ("active" | "archived", required)
- `duration_minutes` (number, required)
- `duration_options` (number[], required)
- `step_minutes` (number, required)
- `grid_time_zone` (string | null, required)
- `buffer_before_minutes` (number, required)
- `buffer_after_minutes` (number, required)
- `min_notice_minutes` (number, required)
- `booking_window` (object | null, required)
  - One of (1):
    - `kind` ("rolling", required)
    - `days` (integer, required, 1-730)
  - One of (2):
    - `kind` ("range", required)
    - `from` (string, required): A local date in the schedule's time zone.
    - `to` (string, required): A local date in the schedule's time zone.
- `limits` (object[], required)
  - `period` ("day" | "week", required): In the host's time zone.
  - `max` (integer, required, 1-1000)
  - `scope` ("event_type" | "host", default "event_type"): Count this event type's bookings, or all of the host's.
- `capacity` (number | null, required)
- `requires_approval` (boolean, required)
- `approval_ttl_minutes` (number, required)
- `hold_ttl_seconds` (number, required)
- `cancel_notice_minutes` (number, required)
- `reschedule_notice_minutes` (number, required)
- `questions` (object[], required)
  - `key` (string, required)
  - `type` ("text" | "textarea" | "select" | "radio" | "checkbox" | "phone" | "email" | "number", required)
  - `label` (string, required, 1-200 characters)
  - `required` (boolean, default false)
  - `options` (string[], at most 50 items, default [])
- `locations` (object[], required)
  - One of (1):
    - `type` ("link", required)
    - `url` (string | null, uri, at most 2000 characters, default null)
  - One of (2):
    - `type` ("phone", required)
    - `number` (string | null, at most 32 characters, default null)
  - One of (3):
    - `type` ("in_person", required)
    - `address` (string | null, at most 500 characters, default null)
  - One of (4):
    - `type` ("google_meet", required)
  - One of (5):
    - `type` ("microsoft_teams", required)
- `host_filter` (map of string | string[] | null, required)
- `hosts` (object[], required)
  - `host` (string, required)
  - `role` ("required" | "member", required)
  - `weight` (number, required)
  - `schedule` (string | null, required)
- `metadata` (map of string, required)
- `created_at` (string, required)
- `updated_at` (string, required)

Example:

```json
{
  "object": "scheduling.event_type",
  "id": "evtype_01kd2m9a0b1c2d3e4f5g6h7j8m",
  "uid": null,
  "title": "Initial consultation",
  "kind": "one_on_one",
  "status": "active",
  "duration_minutes": 30,
  "duration_options": [],
  "step_minutes": 30,
  "grid_time_zone": null,
  "buffer_before_minutes": 0,
  "buffer_after_minutes": 10,
  "min_notice_minutes": 120,
  "booking_window": null,
  "limits": [],
  "capacity": null,
  "requires_approval": false,
  "approval_ttl_minutes": 1440,
  "hold_ttl_seconds": 600,
  "cancel_notice_minutes": 0,
  "reschedule_notice_minutes": 0,
  "questions": [],
  "locations": [],
  "host_filter": null,
  "hosts": [
    {
      "host": "host_01kd2m9a0b1c2d3e4f5g6h7j8m",
      "role": "member",
      "weight": 100,
      "schedule": null
    }
  ],
  "metadata": {},
  "created_at": "2027-01-01T10:00:00.000Z",
  "updated_at": "2027-01-01T10:00:00.000Z"
}
```

## Errors

- `400`: The body is not valid JSON (`invalid_json`). Also when the `Coss-Version` header names an unknown API version (`invalid_api_version`).
- `401`: The API key is missing, invalid, revoked or expired (`authentication_error`).
- `403`: The API key lacks the permission this endpoint needs (`permission_error`), or its organization is suspended (`organization_suspended`).
- `404`: Nothing with this id or uid exists in the environment (`not_found`).
- `415`: The body is not sent as `application/json` (`unsupported_media_type`).
- `422`: The request failed validation (`validation_error`, see `issues`), or can't be done: see `code`.
- `429`: Too many requests with this API key (`rate_limited`), or too many requests with invalid keys from this address (`too_many_failed_authentications`). Retry after `Retry-After` seconds. Successful responses carry `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset` (seconds until the limit is fully restored).
- `500`: Unexpected server error (`api_error` / `internal_error`).
- `503`: The API key could not be verified right now; retry (`service_unavailable`).