---
title: "Create API key"
method: POST
path: "/auth/api_keys"
tags: ["API keys"]
---

# Create API key

`POST /auth/api_keys`

Create a new API Key that is tied to the current user account. The created API key is only listed ONCE upon creation. It can however be regenerated or deleted.

## Request body

- CreateApiKey
  - `data` object
    - `type` 'api_keys', required
    - `attributes` object
      - `name` string, required — Name of the API Key
      - `read_only` boolean — Whether the API Key is read-only. Read-only keys can only perform GET requests.
      - `allowed_ips` string[] — List of allowed IP addresses or CIDR ranges (e.g., "192.168.1.100", "10.0.0.0/24")

## Response `201`

Created

---

[API](https://skmtc.net/latitude/apis/latitude-sh-api.md) · [All operations](https://skmtc.net/latitude/apis/latitude-sh-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/latitude/latitude-sh-api/revisions/7302d79e39bb/schema)
