---
title: "Upload QR graphic asset REST API | HitKeep"
description: "Reference for the HitKeep REST API operation Upload QR graphic asset, including request parameters, responses, and authentication notes."
canonical: "https://hitkeep.com/api/operations/apisitesidqr-codesqridasset/put/"
---

# Upload QR graphic asset REST API

PUT

/api/sites/{id}/qr-codes/{qrID}/asset

FetchcURL

```
const url = 'http://127.0.0.1:25737/api/sites/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/qr-codes/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/asset';
const form = new FormData();
form.append('asset', 'file');

const options = {method: 'PUT', headers: {cookie: 'hk_token=<hk_token>'}};

options.body = form;

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```
curl --request PUT \
  --url http://127.0.0.1:25737/api/sites/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/qr-codes/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/asset \
  --header 'Content-Type: multipart/form-data' \
  --cookie hk_token=<hk_token> \
  --form asset=@file
```

-

Stores a PNG, JPEG, or WebP graphic for a QR code under the configured HitKeep data directory and persists only metadata in the control-plane database. Maximum size is 2 MB. Requires site.manage_data.

## Authorizations

- **[cookieAuth](https://hitkeep.com/api/#cookieauth)**

## Parameters

### Path Parameters

**id**

required

string format: uuid

**qrID**

required

string format: uuid

## Request Bodyrequired

multipart/form-data

object

**asset**

required

string format: binary

## Responses

### 200

QR asset

application/json

Public QR graphic metadata. The raster image is stored under the configured HitKeep data directory; filesystem storage keys and binary payloads are not exposed in JSON or table takeout.

object

**byte_size**

integer

**checksum**

string

**content_type**

string

Allowed values: image/png image/jpeg image/webp

**created_at**

string format: date-time

**filename**

string

**height**

integer

**qr_code_id**

string format: uuid

**site_id**

string format: uuid

**updated_at**

string format: date-time

**width**

integer

##### Example

```
{
  "content_type": "image/png"
}
```

### 400

Invalid asset

application/json

object

**message**

string

##### Examplegenerated

```
{
  "message": "example"
}
```

### 413

Asset too large

application/json

object

**message**

string

##### Examplegenerated

```
{
  "message": "example"
}
```

[Previous Get QR graphic asset](https://hitkeep.com/api/operations/apisitesidqr-codesqridasset/get/)[Next Delete QR graphic asset](https://hitkeep.com/api/operations/apisitesidqr-codesqridasset/delete/)
