---
title: "Create QR code REST API | HitKeep"
description: "Reference for the HitKeep REST API operation Create QR code, including request parameters, responses, and authentication notes."
canonical: "https://hitkeep.com/api/operations/apisitesidqr-codes/post/"
---

# Create QR code REST API

POST

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

FetchcURL

```
const url = 'http://127.0.0.1:25737/api/sites/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/qr-codes';
const options = {
  method: 'POST',
  headers: {cookie: 'hk_token=<hk_token>', 'Content-Type': 'application/json'},
  body: '{"custom_params":{"additionalProperty":"example"},"destination_url":"https://example.com","name":"example","style":{},"utm_campaign":"example","utm_content":"example","utm_medium":"example","utm_source":"example","utm_term":"example"}'
};

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

```
curl --request POST \
  --url http://127.0.0.1:25737/api/sites/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/qr-codes \
  --header 'Content-Type: application/json' \
  --cookie hk_token=<hk_token> \
  --data '{ "custom_params": { "additionalProperty": "example" }, "destination_url": "https://example.com", "name": "example", "style": {}, "utm_campaign": "example", "utm_content": "example", "utm_medium": "example", "utm_source": "example", "utm_term": "example" }'
```

-

Creates a dynamic QR campaign definition. Requires site.manage_data.

## Authorizations

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

## Parameters

### Path Parameters

**id**

required

string format: uuid

## Request Bodyrequired

application/json

object

**custom_params**

object

***key***

additional properties

string

**destination_url**

required

string format: uri

**name**

required

string

**style**

object

***key***

additional properties

any

**utm_campaign**

string

**utm_content**

string

**utm_medium**

string

**utm_source**

string

**utm_term**

string

##### Examplegenerated

```
{
  "custom_params": {
    "additionalProperty": "example"
  },
  "destination_url": "https://example.com",
  "name": "example",
  "style": {},
  "utm_campaign": "example",
  "utm_content": "example",
  "utm_medium": "example",
  "utm_source": "example",
  "utm_term": "example"
}
```

## Responses

### 201

Created QR code

application/json

object

**archived_at**

string format: date-time

**created_at**

string format: date-time

**created_by**

string format: uuid

**custom_params**

object

***key***

additional properties

string

**destination_url**

string format: uri

**has_asset**

boolean

**id**

string format: uuid

**name**

string

**redirect_url**

Dynamic HitKeep redirect URL to encode in printed QR assets.

string format: uri

**site_id**

string format: uuid

**style**

object

***key***

additional properties

any

**token_hint**

string

**updated_at**

string format: date-time

**utm_campaign**

string

**utm_content**

string

**utm_medium**

string

**utm_source**

string

**utm_term**

string

##### Examplegenerated

```
{
  "archived_at": "2026-04-15T12:00:00Z",
  "created_at": "2026-04-15T12:00:00Z",
  "created_by": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
  "custom_params": {
    "additionalProperty": "example"
  },
  "destination_url": "https://example.com",
  "has_asset": true,
  "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
  "name": "example",
  "redirect_url": "https://example.com",
  "site_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
  "style": {},
  "token_hint": "example",
  "updated_at": "2026-04-15T12:00:00Z",
  "utm_campaign": "example",
  "utm_content": "example",
  "utm_medium": "example",
  "utm_source": "example",
  "utm_term": "example"
}
```

### 400

Invalid QR request

application/json

object

**message**

string

##### Examplegenerated

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

[Previous List QR codes](https://hitkeep.com/api/operations/apisitesidqr-codes/get/)[Next Get QR code](https://hitkeep.com/api/operations/apisitesidqr-codesqrid/get/)
