# Change or archive a resource

`PATCH /bookings/resources/{id}` · Rivier · bookings

Change or archive a resource.

- Scope: bookings:admin
- Sdk: bookings.resource.update
- Cli: bookings resource update

## Parameters

- `id` (path, required), string

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "locationId": {
      "type": "string",
      "format": "uuid"
    },
    "kind": {
      "type": "string",
      "enum": [
        "staff",
        "room",
        "chair",
        "vehicle",
        "equipment",
        "table"
      ],
      "default": "staff"
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "timezone": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "personRef": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 200
        },
        {
          "type": "null"
        }
      ]
    },
    "calendarLink": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "connectionId": {
              "type": "string",
              "maxLength": 100
            },
            "calendarId": {
              "type": "string",
              "maxLength": 300
            },
            "mode": {
              "type": "string",
              "enum": [
                "read_busy",
                "write_through"
              ]
            }
          },
          "required": [
            "connectionId",
            "calendarId",
            "mode"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    },
    "position": {
      "type": "integer",
      "minimum": 0,
      "maximum": 10000,
      "default": 0
    }
  },
  "additionalProperties": false
}
```

## Responses

- `200`: 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 PATCH 'https://api.rivier.ai/bookings/resources/{id}' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "locationId": "string",
  "kind": "staff",
  "name": "string",
  "timezone": "string",
  "personRef": "string",
  "calendarLink": {
    "connectionId": "string",
    "calendarId": "string",
    "mode": "read_busy"
  },
  "position": 0
}'
```
