# Add a version from a base64 body

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

Add a version from a base64 body.

- Scope: files:write
- Mcp: rivier_assets_new_version
- Graphql: Mutation.filesVersionCreate
- Sdk: files.version.create
- Cli: files version create
- Events: files.asset.updated

## Parameters

- `id` (path, required), string

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "content": {
      "type": "string",
      "minLength": 1
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 300
    },
    "note": {
      "type": "string",
      "maxLength": 300
    },
    "sha256": {
      "type": "string",
      "pattern": "^[a-fA-F0-9]{64}$"
    },
    "kind": {
      "type": "string",
      "enum": [
        "logo",
        "mark",
        "lockup",
        "wordmark",
        "favicon",
        "palette",
        "typography",
        "guideline",
        "voice",
        "imagery",
        "persona_sheet",
        "avatar",
        "template",
        "font",
        "document",
        "video",
        "audio",
        "image",
        "other"
      ]
    },
    "description": {
      "type": "string",
      "maxLength": 2000
    },
    "altText": {
      "type": "string",
      "maxLength": 1500
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 60
      },
      "maxItems": 40
    },
    "licence": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "minLength": 1,
              "maxLength": 40
            },
            "holder": {
              "type": "string",
              "maxLength": 200
            },
            "sourceUrl": {
              "type": "string",
              "format": "uri",
              "maxLength": 1000
            },
            "terms": {
              "type": "string",
              "maxLength": 2000
            },
            "attribution": {
              "type": "string",
              "maxLength": 500
            },
            "scope": {
              "type": "string",
              "maxLength": 500
            }
          },
          "required": [
            "type"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    },
    "rightsExpiresAt": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "ai": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "generated": {
              "type": "boolean"
            },
            "model": {
              "type": "string",
              "maxLength": 120
            },
            "tool": {
              "type": "string",
              "maxLength": 120
            },
            "generatedAt": {
              "type": "string",
              "format": "date-time"
            },
            "promptRef": {
              "type": "string",
              "maxLength": 300
            },
            "note": {
              "type": "string",
              "maxLength": 500
            }
          },
          "required": [
            "generated"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    },
    "disclosureLine": {
      "type": "string",
      "maxLength": 400
    },
    "provenance": {
      "type": "object",
      "properties": {
        "originPath": {
          "type": "string",
          "maxLength": 500
        },
        "sourceRef": {
          "type": "string",
          "maxLength": 500
        },
        "sourceUrl": {
          "type": "string",
          "format": "uri",
          "maxLength": 1000
        },
        "importedFrom": {
          "type": "string",
          "maxLength": 200
        },
        "note": {
          "type": "string",
          "maxLength": 500
        }
      },
      "additionalProperties": false
    }
  },
  "required": [
    "content"
  ],
  "additionalProperties": true
}
```

## 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}/versions' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "content": "string"
}'
```
