# Block a resource's time (time off, maintenance)

`POST /bookings/blocks` · Rivier · bookings

Block a resource's time (time off, maintenance). Refused, listing the bookings in the way, when the time is booked.

- Scope: bookings:write
- Mcp: rivier_booking_resource_block
- Graphql: Mutation.blockBookingResource
- Sdk: bookings.block.create
- Cli: bookings block create
- Events: bookings.block.created

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "resourceId": {
      "type": "string",
      "format": "uuid"
    },
    "kind": {
      "type": "string",
      "enum": [
        "time_off",
        "maintenance"
      ],
      "default": "time_off"
    },
    "from": {
      "type": "string",
      "format": "date-time"
    },
    "to": {
      "type": "string",
      "format": "date-time"
    },
    "reason": {
      "type": "string",
      "maxLength": 300,
      "default": ""
    }
  },
  "required": [
    "resourceId",
    "from",
    "to"
  ],
  "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/blocks' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "resourceId": "string",
  "from": "2026-01-01T00:00:00Z",
  "to": "2026-01-01T00:00:00Z"
}'
```
