# Book

`POST /bookings` · Rivier · bookings

Book: from a hold, a quote or a time. Idempotent on the key. A dry run returns the booking it would make.

- Scope: bookings:write
- Mcp: rivier_booking_book
- Graphql: Mutation.createBooking
- Sdk: bookings.booking.create
- Cli: bookings booking create
- Events: bookings.booking.created, bookings.booking.confirmed

## Parameters

- `dryRun` (query), string

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "serviceId": {
      "type": "string",
      "format": "uuid"
    },
    "start": {
      "type": "string",
      "format": "date-time"
    },
    "durationMinutes": {
      "type": "integer",
      "minimum": 5,
      "maximum": 1440
    },
    "partySize": {
      "type": "integer",
      "minimum": 1,
      "maximum": 10000,
      "default": 1
    },
    "resourceIds": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid"
      },
      "maxItems": 20
    },
    "sessionId": {
      "type": "string",
      "format": "uuid"
    },
    "quote": {
      "type": "string",
      "maxLength": 4000
    },
    "holdId": {
      "type": "string",
      "format": "uuid"
    },
    "contact": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 160
        },
        "email": {
          "type": "string",
          "format": "email",
          "maxLength": 254
        },
        "phone": {
          "type": "string",
          "pattern": "^\\+?[0-9 ()-]{6,20}$"
        },
        "locale": {
          "type": "string",
          "maxLength": 20
        }
      },
      "required": [
        "name"
      ],
      "additionalProperties": false
    },
    "consent": {
      "type": "object",
      "properties": {
        "email": {
          "type": "boolean"
        },
        "sms": {
          "type": "boolean"
        },
        "voice": {
          "type": "boolean"
        },
        "whatsapp": {
          "type": "boolean"
        }
      },
      "additionalProperties": false,
      "default": {}
    },
    "intake": {
      "type": "object",
      "additionalProperties": {},
      "default": {}
    },
    "notes": {
      "type": "string",
      "maxLength": 2000,
      "default": ""
    },
    "channel": {
      "type": "string",
      "enum": [
        "owner",
        "widget",
        "api",
        "mcp",
        "phone",
        "chat",
        "import"
      ],
      "default": "api"
    },
    "idempotencyKey": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    }
  },
  "required": [
    "serviceId",
    "start",
    "contact",
    "idempotencyKey"
  ],
  "additionalProperties": false
}
```

## Responses

- `201`: Success
- `400`: The request was malformed
- `401`: No valid credential
- `403`: The credential lacks the scope, origin or address
- `429`: Over the key's rate limit; see Retry-After

## Example

```sh
curl -X POST 'https://api.rivier.ai/bookings' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "serviceId": "string",
  "start": "2026-01-01T00:00:00Z",
  "contact": {
    "name": "string"
  },
  "idempotencyKey": "string"
}'
```
