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

# POST /v1/meet/meetings/:id/cancel

> Cancel a meeting with an optional reason. Cancels the calendar event and the pending reminders.

Cancels a meeting. Keebai cancels the calendar event, so the guests are notified by their calendar, and the reminders still pending. The slot opens up again.

## Endpoint

```
POST https://api.keebai.com/v1/meet/meetings/:id/cancel
```

## Required scope

`meet:meetings:cancel`

## Path params

| Param | Type | Description |
| - | - | - |
| `id` | `string` | Meeting id. |

## Headers

| Header | Required | Value |
| - | - | - |
| `Authorization` | Yes | `Bearer kbai_pk_<token>` |
| `Content-Type` | Yes (if sending a body) | `application/json` |

## Body

| Field | Type | Required | Description |
| - | - | - | - |
| `reason` | `string` | No | Cancellation reason (max 500 characters). Returned in `cancel_reason`. |

## Example request

```bash curl theme={"system"}
curl -X POST https://api.keebai.com/v1/meet/meetings/6735f1e2d3c4b5a697887766/cancel \
  -H "Authorization: Bearer kbai_pk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{ "reason": "El cliente pidió otra fecha" }'
```

```python Python theme={"system"}
import os, requests

resp = requests.post(
    f"https://api.keebai.com/v1/meet/meetings/{meeting_id}/cancel",
    headers={"Authorization": f"Bearer {os.environ['KEEBAI_API_TOKEN']}"},
    json={"reason": "El cliente pidió otra fecha"},
    timeout=20,
)
resp.raise_for_status()
```

## Response

### 200 OK

Returns [the meeting](https://docs.keebai.com/dev/endpoints/meet-meeting-get.md) with `status: "cancelled"`, `cancelled_at`, and `cancel_reason`.

### 404 Not Found

`MEETING_NOT_FOUND`: the meeting does not exist or belongs to another company.

### 409 Conflict

```json theme={"system"}
{
  "error": {
    "code": "MEETING_ALREADY_CANCELLED",
    "message": "La reunión ya está cancelada."
  }
}
```

| Code | When |
| - | - |
| `MEETING_ALREADY_CANCELLED` | The meeting was already cancelled. |
| `MEETING_ALREADY_CLOSED` | The meeting was already marked `completed` or `no_show`, so it cannot be cancelled. |
| `MEETING_CHANGED` | The meeting is still being written to the calendar (it was just booked or moved), or another change got there first. Retry in a few seconds. |

### 401 Unauthorized · 403 Forbidden

Same semantics as the rest of the public API.


## OpenAPI

````yaml POST /v1/meet/meetings/{id}/cancel
openapi: 3.0.0
info:
  title: Keebai Public API
  description: Superficie pública REST autenticada con Personal Access Tokens (PAT).
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.keebai.com
    description: Production
security: []
tags: []
paths:
  /v1/meet/meetings/{id}/cancel:
    post:
      tags:
        - meet
      summary: Cancelar una reunión
      description: >-
        Cancela el evento del calendario y los recordatorios pendientes, con un
        motivo opcional.
      operationId: PublicMeetController_cancel
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MeetingCancelDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicMeetingResponseDto'
      security:
        - PAT: []
components:
  schemas:
    MeetingCancelDto:
      type: object
      properties:
        reason:
          type: string
          description: Motivo de la cancelación.
    PublicMeetingResponseDto:
      type: object
      properties:
        id:
          type: string
          description: ObjectId de la reunión
        type_id:
          type: string
          description: >-
            Tipo de reunión. No viene en las reuniones importadas del calendario
            conectado (`source: calendar`).
        type_name:
          type: string
          description: Nombre del tipo; vacío en las importadas del calendario.
        title:
          type: string
          description: >-
            Título del evento del calendario; solo en las importadas (`source:
            calendar`).
        host_user_id:
          type: string
        host_name:
          type: string
        co_host_user_ids:
          description: >-
            Resto de las personas que atienden cuando el reparto es `collective`
            (auth_users._id).
          type: array
          items:
            type: string
        customer:
          $ref: '#/components/schemas/PublicMeetingCustomerDto'
        invitee_emails:
          type: array
          items:
            type: string
        start:
          type: string
          format: date-time
        end:
          type: string
          format: date-time
        time_zone:
          type: string
          example: America/Santiago
        meet_url:
          type: string
          description: Enlace de la videollamada
        location:
          type: string
          description: Lugar del evento importado del calendario
        status:
          type: string
          enum:
            - scheduled
            - confirmed
            - rescheduled
            - cancelled
            - completed
            - no_show
        source:
          type: string
          enum:
            - agent
            - manual
            - public
            - calendar
          description: >-
            `calendar`: evento creado fuera de Keebai en el calendario conectado
            e importado; se mueve o cancela desde el calendario (reagendar o
            cancelar acá responde 409 `MEETING_MANAGED_IN_CALENDAR`).
        created_by:
          $ref: '#/components/schemas/PublicMeetingCreatedByDto'
        reminders:
          type: array
          items:
            $ref: '#/components/schemas/PublicMeetingReminderDto'
        confirmed_at:
          type: string
          format: date-time
        cancelled_at:
          type: string
          format: date-time
        cancel_reason:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - id
        - type_name
        - host_user_id
        - host_name
        - co_host_user_ids
        - customer
        - invitee_emails
        - start
        - end
        - time_zone
        - status
        - source
        - reminders
    PublicMeetingCustomerDto:
      type: object
      properties:
        name:
          type: string
        email:
          type: string
        phone:
          type: string
        chat_user_id:
          type: string
        customer_id:
          type: string
        ticket_id:
          type: string
      required:
        - name
    PublicMeetingCreatedByDto:
      type: object
      properties:
        kind:
          type: string
          enum:
            - agent
            - user
            - calendar
        id:
          type: string
        name:
          type: string
      required:
        - kind
        - id
        - name
    PublicMeetingReminderDto:
      type: object
      properties:
        key:
          type: string
          example: 24h
        audience:
          type: string
          enum:
            - customer
            - team
          description: 'A quién va: el cliente, o la persona que atiende (aviso del equipo).'
        channel:
          type: string
          enum:
            - whatsapp
            - email
            - push
        scheduled_at:
          type: string
          format: date-time
        status:
          type: string
          enum:
            - scheduled
            - sent
            - failed
            - skipped
        sent_at:
          type: string
          format: date-time
        reason:
          type: string
      required:
        - key
        - audience
        - channel
        - scheduled_at
        - status
  securitySchemes:
    PAT:
      scheme: bearer
      bearerFormat: kbai_pk_<hex>
      type: http
      description: >-
        Personal Access Token con prefijo `kbai_pk_`. Generar desde el portal
        con permiso `developer.manage_tokens`.

````

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