> ## Documentation Index
> Fetch the complete documentation index at: https://omni.fireflo.au/llms.txt
> Use this file to discover all available pages before exploring further.

# PATCH /v1/calendar/booking-types/{type_id}

> Change a booking type: send only the fields that change.

Changes a booking type. Send only what changes; the rest stays as it is. Changes apply to new bookings — appointments already booked keep their times.

<Note>Needs the `calendar:write` scope.</Note>

## Path parameters

| Field | Type | Required | Notes |
| :- | :- | :- | :- |
| `type_id` | integer | Yes | The booking type's id. |

## Body

| Field | Type | Required | Notes |
| :- | :- | :- | :- |
| `name` | string | No | What it is called. Up to 100 characters, and unlike the account's other booking types. |
| `description` | string | No | What it is for. Up to 255 characters. |
| `slot_minutes` | integer | No | How long it lasts: 5 to 480 minutes. |
| `prep_minutes` | integer | No | Time blocked before it, for the teammate to get ready: 0 to 240 minutes. |
| `mode` | string | No | `online`, `physical` (in person) or `either` — chosen when booking. |
| `location` | string | No | Where in-person appointments happen. Up to 255 characters. Empty uses the teammate's own place, or the account's default. |
| `meeting_link` | string | No | The link for online appointments, starting `https://`. Empty uses the teammate's own link. |
| `default_staff` | string | No | The email of the teammate who takes it first; `null` for none. |
| `staff` | array | No | Emails of the others who can take it. Replaces the list. |
| `colour` | string | No | How the panel's calendar shows it: `brand`, `info`, `ai`, `warning` or `rose`. |
| `active` | boolean | No | Whether it can be booked. |
| `online` | boolean | No | Whether it is offered on the account's online booking page. |

## Request

<CodeGroup>
  ```bash cURL theme={null}
  curl -X PATCH "https://api.fireflo.au/v1/calendar/booking-types/3" \
    -H "Authorization: Bearer $OMNI_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
    "slot_minutes": 45,
    "staff": [
      "rahul@acme.in",
      "anjali@acme.in"
    ]
  }'
  ```

  ```python Python theme={null}
  import os

  import requests

  response = requests.patch(
      "https://api.fireflo.au/v1/calendar/booking-types/3",
      headers={"Authorization": f"Bearer {os.environ['OMNI_API_KEY']}"},
      json={
          "slot_minutes": 45,
          "staff": [
              "rahul@acme.in",
              "anjali@acme.in"
          ]
      },
  )
  print(response.status_code, response.json())
  ```

  ```javascript Node theme={null}
  const response = await fetch("https://api.fireflo.au/v1/calendar/booking-types/3", {
    method: "PATCH",
    headers: {
      Authorization: `Bearer ${process.env.OMNI_API_KEY}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      "slot_minutes": 45,
      "staff": [
        "rahul@acme.in",
        "anjali@acme.in"
      ]
    }),
  });
  console.log(response.status, await response.json());
  ```
</CodeGroup>

## Response

`200 OK` — the booking type as it is now.

```json theme={null}
{
  "id": 3,
  "name": "Home loan consultation",
  "description": "Eligibility, documents and EMI options, in 30 minutes.",
  "slot_minutes": 45,
  "prep_minutes": 10,
  "mode": "either",
  "location": "Kaveri Homes, 2nd floor, Kalpataru Plaza, Andheri East, Mumbai",
  "meeting_link": "https://meet.google.com/kfr-ptqw-xya",
  "default_staff": {
    "name": "Priya Sharma",
    "email": "priya@acme.in"
  },
  "staff": [
    {
      "name": "Anjali Iyer",
      "email": "anjali@acme.in"
    },
    {
      "name": "Rahul Verma",
      "email": "rahul@acme.in"
    }
  ],
  "active": true,
  "online": true
}
```

## Errors

Every refusal is `{"error": {"code", "message", "field"}}`; `field` is there when one input is at fault.

| Status | Error code | When |
| :- | :- | :- |
| 404 | `not_found` | No booking type of this account's has that id. |
| 400 | `invalid_request` | A field is wrong — `field` names it: no `name`, a name another booking type has, minutes out of range, an unknown `mode` or `colour`, a link that doesn't start `https://`, or an email nobody active in your team has. |
| 404 | `module_off` | The account's plan doesn't include Calendar. |
| 403 | `scope_missing` | The key doesn't have the `calendar:write` scope. |

Any request can also be refused for its key, its account or its rate (`key_required`, `invalid_key`, `account_suspended`, `plan_excludes_api`, `address_not_allowed`, `rate_limited`); see [the overview](/api-reference/overview).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.