# Book appointment

> Book a contact on a calendar.

Source: https://docs.mycrmsim.com/docs/appointments/book-appointment

```http
POST https://backend.mysmsgateway.app/api/v1/ext/appointments
```

- Category: myCRMSIM Appointments / Calendars & Appointments
- Auth: Bearer access token
- Scope: `appointments.write`

The calendar's booking rules apply, as for the booking page and the AI: `start_at` must be a time **Free slots** offers — inside the calendar's availability, on its slot times, within its notice and booking window, and not in the past (400 `OUTSIDE_AVAILABILITY`). Send `ignore_booking_rules: true` to book outside them, as staff can on the dashboard. A time that is already taken is always refused (409).

Without `end_at` the calendar's slot length is used. Booking runs any workflow that triggers on **Appointment booked**, sends the calendar's reminders, and syncs to a linked Google or Outlook calendar.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `workspace_id` | body | number | yes | The workspace. Example: `7` |
| `calendar_id` | body | number | yes | A calendar of that workspace. Example: `5` |
| `contact_id` | body | number | yes | A contact in that workspace. Example: `1234` |
| `start_at` | body | string | yes | ISO 8601, e.g. a time from Free slots. Example: `2026-11-03T00:00:00Z` |
| `end_at` | body | string | no | ISO 8601. Default start + the calendar's slot length. |
| `title` | body | string | no | Default the calendar's title template. |
| `description` | body | string | no | Notes. |
| `timezone` | body | string | no | IANA timezone of the contact. Example: `Australia/Sydney` |
| `assignee_id` | body | number | no | A team member assigned to the workspace. |
| `location_text` | body | string | no | Address or location note. |
| `meeting_link` | body | string | no | Video meeting link. |
| `ignore_booking_rules` | body | boolean | no | Default false. Double-booking is refused either way. |

## Request body

```json
{
  "workspace_id": 7,
  "calendar_id": 5,
  "contact_id": 1234,
  "start_at": "2026-11-03T00:00:00Z",
  "title": "Intro call with Ann Lee",
  "timezone": "Australia/Sydney"
}
```

## Response fields (appointment)

| Field | Type | Description |
| --- | --- | --- |
| `id` | number | Appointment id. |
| `workspace_id` | number | The workspace it belongs to. |
| `calendar_id` | number | The calendar it is booked on. |
| `calendar` | object | id, name and color of the calendar. |
| `contact` | object | The contact: id, first_name, last_name, email, phone_number, company_name. |
| `assignee` | object, nullable | The team member it is assigned to: id and name. |
| `title` | string | Appointment title. |
| `description` | string, nullable | Notes for the appointment. |
| `start_at` | string (ISO 8601) | Start time, UTC. |
| `end_at` | string (ISO 8601) | End time, UTC. |
| `timezone` | string | IANA timezone it was booked in. |
| `status` | string | "confirmed", "cancelled", "no_show" or "completed". |
| `source` | string | Where it was booked: api (this API), dashboard, booking_page, agent, mcp … |
| `location_text` | string, nullable | Address or location note. |
| `meeting_link` | string, nullable | Video meeting link. |
| `reschedule_count` | number | How many times it has been moved. |
| `cancelled_at` | string (ISO 8601), nullable | When it was cancelled. |
| `cancel_reason` | string, nullable | Reason given on cancel. |

## Response 201

Booked

```json
{
  "success": true,
  "message": "Appointment booked",
  "data": {
    "id": 700,
    "workspace_id": 7,
    "calendar_id": 5,
    "calendar": {
      "id": 5,
      "name": "Sales calls",
      "color": "#3b82f6"
    },
    "contact_id": 1234,
    "contact": {
      "id": 1234,
      "first_name": "Ann",
      "last_name": "Lee",
      "email": "ann@example.com",
      "phone_number": "+61412345678",
      "company_name": "Lee Studio"
    },
    "assignee_id": null,
    "assignee": null,
    "title": "Intro call with Ann Lee",
    "description": null,
    "start_at": "2026-11-03T00:00:00.000Z",
    "end_at": "2026-11-03T00:30:00.000Z",
    "timezone": "Australia/Sydney",
    "status": "confirmed",
    "source": "dashboard",
    "location_text": null,
    "meeting_link": "https://meet.example.com/abc",
    "reschedule_count": 0,
    "cancelled_at": null,
    "cancel_reason": null,
    "created_at": "2026-10-27T09:00:00.000Z",
    "updated_at": "2026-10-27T09:00:00.000Z"
  }
}
```

## Response 400

Missing field

```json
{
  "success": false,
  "message": "start_at is required"
}
```

## Response 400

Not a time Free slots offers

```json
{
  "success": false,
  "code": "OUTSIDE_AVAILABILITY",
  "message": "start_at is not a bookable time on this calendar (outside its availability, booking window or slot times). Pick a time from Free slots, or send ignore_booking_rules: true."
}
```

## Response 401

Missing or invalid token

```json
{
  "success": false,
  "message": "Invalid or expired access token."
}
```

## Response 403

Missing scope

```json
{
  "success": false,
  "message": "Missing scope(s): appointments.write. This integration was granted: …"
}
```

## Response 404

Workspace, calendar or contact not found or not accessible

```json
{
  "success": false,
  "message": "Calendar not found or not accessible to this token"
}
```

## Response 409

The time is already booked

```json
{
  "success": false,
  "code": "SLOT_CONFLICT",
  "message": "That time is no longer available on this calendar."
}
```
