---
title: "Create entity qrcodes"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.sureshake.com/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Sureshake API › entities

`POST /v2/entities/{entityId}/qr-codes`

## Path parameters

- `entityId` (`entity-qrcodes-create.path.entityId`; string, required)
  - format `uuid`

## Request body

_Required._

- `qrType` (`entity-qrcodes-create.qrType`; string, required)
  - one of `"profile"`, `"verification"`, `"contact"`, `"claim"`, `"document"`
- `accessLevel` (`entity-qrcodes-create.accessLevel`; string, optional)
  - one of `"open"`, `"restricted"`, `"authenticated"`; default `"open"`
- `expiresIn` (`entity-qrcodes-create.expiresIn`; integer, optional)
  - min 1; max 365
- `targetUrl` (`entity-qrcodes-create.targetUrl`; string, optional)
  - format `uri`
- `description` (`entity-qrcodes-create.description`; string, optional)

## Example request

```json
{
  "qrType": "profile",
  "accessLevel": "open",
  "expiresIn": 1,
  "targetUrl": "http://example.com",
  "description": "string"
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url 'https://api.sureshake.com/v2/entities/<entityId>/qr-codes' \
  --header 'Content-Type: application/json' \
  --data '
{
  "qrType": "profile",
  "accessLevel": "open",
  "expiresIn": 1,
  "targetUrl": "http://example.com",
  "description": "string"
}
'
```

### TypeScript

```typescript
const url = 'https://api.sureshake.com/v2/entities/<entityId>/qr-codes';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({
    qrType: 'profile',
    accessLevel: 'open',
    expiresIn: 1,
    targetUrl: 'http://example.com',
    description: 'string'
  })
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.sureshake.com/v2/entities/<entityId>/qr-codes"

payload = {
    "qrType": "profile",
    "accessLevel": "open",
    "expiresIn": 1,
    "targetUrl": "http://example.com",
    "description": "string"
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

Default Response

#### Example

```json
{
  "data": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "entityId": "156e622c-6cdf-4c27-9bc9-2f2db69919f5",
    "qrType": "profile",
    "uniqueCode": "string",
    "qrImageUrl": "string",
    "targetUrl": "string",
    "accessLevel": "open",
    "scanCount": 0,
    "lastScannedAt": "2019-08-24T14:15:22Z",
    "expiresAt": "2019-08-24T14:15:22Z",
    "isActive": true,
    "createdBy": "string",
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z"
  },
  "meta": {
    "timestamp": "2019-08-24T14:15:22Z"
  }
}
```

- `data` (`entity-qrcodes-create.response.200.data`; object, required)
  - `id` (`entity-qrcodes-create.response.200.data.id`; string, required)
    - format `uuid`
  - `entityId` (`entity-qrcodes-create.response.200.data.entityId`; string, required)
    - format `uuid`
  - `qrType` (`entity-qrcodes-create.response.200.data.qrType`; string, required)
    - one of `"profile"`, `"verification"`, `"contact"`, `"claim"`, `"document"`
  - `uniqueCode` (`entity-qrcodes-create.response.200.data.uniqueCode`; string, required)
  - `qrImageUrl` (`entity-qrcodes-create.response.200.data.qrImageUrl`; string, required, nullable)
  - `targetUrl` (`entity-qrcodes-create.response.200.data.targetUrl`; string, required)
  - `accessLevel` (`entity-qrcodes-create.response.200.data.accessLevel`; string, required)
    - one of `"open"`, `"restricted"`, `"authenticated"`
  - `scanCount` (`entity-qrcodes-create.response.200.data.scanCount`; integer, required, nullable)
  - `lastScannedAt` (`entity-qrcodes-create.response.200.data.lastScannedAt`; string, required, nullable)
    - format `date-time`
  - `expiresAt` (`entity-qrcodes-create.response.200.data.expiresAt`; string, required, nullable)
    - format `date-time`
  - `isActive` (`entity-qrcodes-create.response.200.data.isActive`; boolean, required, nullable)
  - `createdBy` (`entity-qrcodes-create.response.200.data.createdBy`; string, required, nullable)
  - `createdAt` (`entity-qrcodes-create.response.200.data.createdAt`; string, required)
    - format `date-time`
  - `updatedAt` (`entity-qrcodes-create.response.200.data.updatedAt`; string, required)
    - format `date-time`
- `meta` (`entity-qrcodes-create.response.200.meta`; object, optional)
  - `timestamp` (`entity-qrcodes-create.response.200.meta.timestamp`; string, required)
    - format `date-time`

### 400

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`entity-qrcodes-create.response.400.error`; object, required)
  - `code` (`entity-qrcodes-create.response.400.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`entity-qrcodes-create.response.400.error.message`; string, required) — Human-readable error message
  - `details` (`entity-qrcodes-create.response.400.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`entity-qrcodes-create.response.400.error.traceId`; string, optional) — Unique ID for log correlation

### 401

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`entity-qrcodes-create.response.401.error`; object, required)
  - `code` (`entity-qrcodes-create.response.401.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`entity-qrcodes-create.response.401.error.message`; string, required) — Human-readable error message
  - `details` (`entity-qrcodes-create.response.401.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`entity-qrcodes-create.response.401.error.traceId`; string, optional) — Unique ID for log correlation

### 403

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`entity-qrcodes-create.response.403.error`; object, required)
  - `code` (`entity-qrcodes-create.response.403.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`entity-qrcodes-create.response.403.error.message`; string, required) — Human-readable error message
  - `details` (`entity-qrcodes-create.response.403.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`entity-qrcodes-create.response.403.error.traceId`; string, optional) — Unique ID for log correlation

### 404

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`entity-qrcodes-create.response.404.error`; object, required)
  - `code` (`entity-qrcodes-create.response.404.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`entity-qrcodes-create.response.404.error.message`; string, required) — Human-readable error message
  - `details` (`entity-qrcodes-create.response.404.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`entity-qrcodes-create.response.404.error.traceId`; string, optional) — Unique ID for log correlation

### 500

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`entity-qrcodes-create.response.500.error`; object, required)
  - `code` (`entity-qrcodes-create.response.500.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`entity-qrcodes-create.response.500.error.message`; string, required) — Human-readable error message
  - `details` (`entity-qrcodes-create.response.500.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`entity-qrcodes-create.response.500.error.traceId`; string, optional) — Unique ID for log correlation

### 503

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`entity-qrcodes-create.response.503.error`; object, required)
  - `code` (`entity-qrcodes-create.response.503.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`entity-qrcodes-create.response.503.error.message`; string, required) — Human-readable error message
  - `details` (`entity-qrcodes-create.response.503.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`entity-qrcodes-create.response.503.error.traceId`; string, optional) — Unique ID for log correlation


Source: https://docs.sureshake.com/reference/entity-qrcodes-create/index.md
