# updateAsset mutation


`updateAsset` is a GraphQL mutation of the Chameleoon MAX API. Send it as `POST https://max-api.chameleoon.sk/api/v1/graphql` with your API key, see [Chameleoon MAX](/chameleoon-max).

Updates the asset's name or whether it is public. Call it to rename an asset or to publish it
for e-mails.

- A field you omit keeps its value.
- Requires the `company.write` permission, and for a company's asset also the company in your
  API key's legal-entity scope.
- `NOT_FOUND` when the asset does not exist or your API key cannot see it.
- `VALIDATION` with reason `NOT_PUBLISHABLE` when you make a stamp public.

## Arguments

- `input`: [`UpdateAssetInput!`](/chameleoon-max/type/update-asset-input) · required

## Returns

[`Asset!`](/chameleoon-max/type/asset)

## Example

**Mutation**

```graphql
mutation updateAsset($input: UpdateAssetInput!) {
  updateAsset(input: $input) {
    id
    scope
    legalEntityId
    code
    reference
    name
    kind
    contentType
    width
    height
    sizeBytes
    isPublic
    publicUrl
    createdAt
    updatedAt
  }
}
```

**Variables**

```json
{
  "input": {
    "id": "00000000-0000-4000-8000-000000000001"
  }
}
```

**Response**

```json
{
  "data": {
    "updateAsset": {
      "id": "00000000-0000-4000-8000-000000000001",
      "scope": "TENANT",
      "legalEntityId": "00000000-0000-4000-8000-000000000001",
      "code": "example",
      "reference": "example",
      "name": "example",
      "kind": "LOGO",
      "contentType": "example",
      "width": 1,
      "height": 1,
      "sizeBytes": 1,
      "isPublic": true,
      "publicUrl": "example",
      "createdAt": "2026-01-01T00:00:00Z",
      "updatedAt": "2026-01-01T00:00:00Z"
    }
  }
}
```

Values are illustrative: replace IDs and codes with your own before you send the call.
