# Record that something uses an asset

`POST /assets/{id}/usage` · Rivier · files

Record that something uses an asset.

- Scope: files:write
- Mcp: rivier_assets_record_usage
- Graphql: Mutation.filesUsageRecord
- Sdk: files.usage.record
- Cli: files usage record

## Parameters

- `id` (path, required), string

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "userKind": {
      "type": "string",
      "enum": [
        "post",
        "content_item",
        "content_variant",
        "campaign",
        "agent",
        "channel",
        "page",
        "persona",
        "product",
        "property",
        "area",
        "unit",
        "amenity",
        "rate_plan",
        "extra",
        "poi",
        "policy",
        "cms_entry",
        "mail_message",
        "other"
      ]
    },
    "userId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "role": {
      "type": "string",
      "maxLength": 40
    },
    "note": {
      "type": "string",
      "maxLength": 300
    },
    "versionId": {
      "type": "string",
      "format": "uuid"
    }
  },
  "required": [
    "userKind",
    "userId"
  ],
  "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/{id}/usage' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "userKind": "post",
  "userId": "string"
}'
```
