# Create a collection

`POST /assets/collections` · Rivier · files

Create a collection.

- Scope: files:write
- Mcp: rivier_assets_collection_save
- Graphql: Mutation.filesCollectionCreate
- Sdk: files.collection.create
- Cli: files collection create

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "kind": {
      "type": "string",
      "enum": [
        "set",
        "character",
        "campaign",
        "kit",
        "series",
        "custom"
      ]
    },
    "description": {
      "type": "string",
      "maxLength": 1000
    },
    "refKind": {
      "type": "string",
      "maxLength": 40
    },
    "refId": {
      "type": "string",
      "maxLength": 200
    },
    "assetIds": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid"
      }
    }
  },
  "required": [
    "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/assets/collections' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string"
}'
```
