# Close a service for a span

`POST /bookings/services/{id}/blocks` · Rivier · bookings

Close a service for a span: nothing of it can be held or booked there. Its sessions inside are closed (not deleted) and their holds released, each raising bookings.hold.expired with reason blocked; bookings already made are listed for the business to decide.

- Scope: bookings:admin
- Sdk: bookings.serviceBlock.create
- Cli: bookings service block create
- Events: bookings.hold.expired

## Parameters

- `id` (path, required), string

## Request body

`application/json`

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