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

# PUT /v1/bookings/{id}

> Transform booking to API response format (snake_case)

# PUT /v1/bookings/{id}

Transform booking to API response format (snake\_case)

## Path Parameters

<ParamField path="id" type="string" optional>
  id
</ParamField>

## Request Body

<ParamField body="body" type="CreateBooking" required>
  Request body following the [`CreateBooking`](#components/schemas/CreateBooking) schema
</ParamField>

## Responses

<ResponseField name="200" type="success">
  Successful response
</ResponseField>

<ResponseField name="400" type="error">
  Bad request - Invalid parameters

  Returns a [`Error`](#components/schemas/Error) object
</ResponseField>

<ResponseField name="401" type="error">
  Unauthorized - Invalid or missing API key

  Returns a [`Error`](#components/schemas/Error) object
</ResponseField>

<ResponseField name="404" type="error">
  Not found

  Returns a [`Error`](#components/schemas/Error) object
</ResponseField>

<ResponseField name="500" type="error">
  Internal server error

  Returns a [`Error`](#components/schemas/Error) object
</ResponseField>

## Code Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl -X PUT https://www.skaala.ai/api/v1/bookings/abc123 \
    -H "X-API-Key: sk_live_your_key_here" \
    -H "Content-Type: application/json" \
    -d '{
      // Your request body here
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://www.skaala.ai/api/v1/bookings/abc123', {
    method: 'PUT',
    headers: {
      'X-API-Key': process.env.SKAALA_API_KEY,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      // Your request body here
    })
  });

  const data = await response.json();
  console.log(data);
  ```

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

  response = requests.put(
      'https://www.skaala.ai/api/v1/bookings/abc123',
      headers={'X-API-Key': os.environ['SKAALA_API_KEY']},
      json={
          # Your request body here
      }
  )

  data = response.json()
  print(data)
  ```
</CodeGroup>
