---
title: "Create App Key"
method: POST
path: "/v2/appkeys"
tags: ["Token"]
---

# Create App Key

`POST /v2/appkeys`

Create an application-specific key for accessing other APIs.

### Parameters:
- `user` (User): The user instance for whom the app key is being created.
- `data` (AppKeyCreate, optional): The data containing the name, full access rights, and optional expiration.

### Returns:
- `dict`: A dictionary containing the app key's ID, token, and expiration date.

## Headers

- `authorization` string, nullable

## Request body

- AppKeyCreate
  - `name` string, nullable
  - `fullAccess` boolean, nullable
  - `expires` integer, nullable
  - `allowedTemplates` PydanticObjectId[], nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/loyalty/apis/loyaltydog.md) · [All operations](https://skmtc.net/loyalty/apis/loyaltydog/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/loyalty/loyaltydog/versions/42b7b22af2b6/schema)
