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

# Cancel Booking

> Soft-delete a previously recorded booking so the bot stops seeing it

## Overview

This endpoint soft-deletes a previously recorded booking. Use the `id` returned by [Create Booking](/setter-ai/bookings). The bot will stop seeing this booking in its context from the next message onwards.

<Note>
  **Authentication**: All requests require a Bearer token in the Authorization header.
</Note>

## Important Notes

* **Authentication**: All requests require a Bearer token in the Authorization header
* **Idempotency**: Re-cancelling an already-cancelled booking is a no-op
* **Access Control**: You can only cancel bookings owned by your organization

## Getting Your API Key

API keys can be generated from your Setter AI dashboard under **Settings > API Keys**. Keep your API key secure and never expose it in client-side code.

## Example Usage

```bash theme={null}
curl -X POST https://chat.trysetter.com/api/v1/bookings/555/cancel \
  -H "Authorization: Bearer your_api_key"
```


## OpenAPI

````yaml POST /api/v1/bookings/{id}/cancel
openapi: 3.0.3
info:
  title: Setter AI API
  description: API for Setter AI appointment booking assistant
  version: 1.0.0
  contact:
    email: support@trysetter.com
servers:
  - url: https://chat.trysetter.com
    description: Production server
security:
  - bearerAuth: []
paths:
  /api/v1/bookings/{id}/cancel:
    post:
      tags:
        - Bookings
      summary: Cancel Booking
      description: >-
        Soft-deletes a previously recorded booking. Use the `id` returned by
        [Create Booking](/setter-ai/bookings). The bot will stop seeing this
        booking in its context from the next message onwards.
      operationId: cancelBooking
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
          description: Booking id returned by Create Booking.
          example: 555
      responses:
        '200':
          description: Cancelled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancelBookingResponse'
        '400':
          description: Invalid booking id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                message: Invalid booking id
        '404':
          description: Booking not found (or not owned by your organization)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                message: Booking not found
components:
  schemas:
    CancelBookingResponse:
      type: object
      properties:
        id:
          type: integer
          example: 555
        event_id:
          type: integer
          example: 999
        cancelled_at:
          type: string
          format: date-time
          example: '2026-05-20T17:42:00.000Z'
    ErrorResponse:
      type: object
      properties:
        message:
          type: string
          description: Error message
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Bearer token authentication using your API key

````