---
title: "Create API key"
method: POST
path: "/api/v2/organizations/api-keys"
tags: ["Api-Keys"]
---

# Create API key

`POST /api/v2/organizations/api-keys`

## Request

- Base URL: `https://api.chirpwireless.io`
- URL: `https://api.chirpwireless.io/api/v2/organizations/api-keys`
- Auth: API key in header `X-API-Key` and API key in header `X-Organization-Id`

Create a new API key with specified scopes.

**Required scope:** `api-keys:write`

## Request body

- object
  - `name` string, required: Human-readable API key name
  - `organizationId` string, required
  - `scopes` string[]: List of scopes to assign (e.g. devices:read, devices:write)
  - `expiresAt` string: Optional expiration date (ISO 8601)

## Response `200`

Created

- object
  - `id` string
  - `name` string
  - `key` string: The API key secret (only shown once at creation)
  - `scopes` string[]
  - `expiresAt` string
  - `createdAt` string

## Other responses

- `401`: Missing or invalid API key
- `403`: Insufficient permissions (missing required scope)

---

[API](https://skmtc.dev/chirpwireless/apis/chirp-public-api.md) · [All operations](https://skmtc.dev/chirpwireless/apis/chirp-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/chirpwireless/apis/chirp-public-api/revisions/0414f3e239ff?raw)
