---
title: "Create API Key"
method: POST
path: "/api/v1/keys"
tags: ["Keys"]
---

# Create API Key

`POST /api/v1/keys`

## Request

- Base URL: `http://localhost:8080`
- URL: `http://localhost:8080/api/v1/keys`
- Auth: HTTP bearer

## Request body

- object
  - `name` string
  - `environment` 'sandbox' | 'production'
  - `scopes` string[]

## Response `201`

Key created

- object
  - `key` object, required
    - `key_id` string, required
    - `prefix` string, required
    - `name` string, required
    - `environment` 'sandbox' | 'production', required
    - `status` string, required
    - `last_used` string, date-time, nullable, required: ISO 8601 timestamp
    - `created_at` string, date-time, required: ISO 8601 timestamp
    - `key` string, required

---

[API](https://skmtc.dev/deerdawn/apis/deerdawn-session-memory-api.md) · [All operations](https://skmtc.dev/deerdawn/apis/deerdawn-session-memory-api/llms.txt) · [OpenAPI document](https://skmtc.dev/deerdawn/apis/deerdawn-session-memory-api/revisions/002b48818bf9?raw)
