# Add a resource

`POST /bookings/resources` · Rivier · bookings

Add a resource.

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

## 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
    }
  },
  "required": [
    "locationId",
    "name"
  ],
  "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/resources' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "locationId": "string",
  "name": "string"
}'
```
