---
title: "Create an API key"
method: POST
path: "/{org_slug}/api-keys"
tags: ["API Keys"]
---

# Create an API key

`POST /{org_slug}/api-keys`

## Request

- Base URL: `https://api.obelinf.com`
- URL: `https://api.obelinf.com/{org_slug}/api-keys`
- Auth: HTTP bearer

Create an API key

## Path parameters

- `org_slug` string, required

## Request body

- object
  - `name` string, required
  - `permissions` 'read' | 'write', required
  - `description` string
  - `expires_in_days` unknown

## Response `201`

API key created

- object
  - `api_key` object, required
    - `created_at` string, required
    - `id` string, required
    - `name` string, required
    - `permissions` 'read' | 'write', required
    - `token` string, required
    - `token_prefix` string, required
    - `updated_at` string, required
    - `description` string, nullable
    - `expires_at` string, nullable

## Other responses

- `400`: Validation error
- `403`: Feature not available on this plan

---

[API](https://skmtc.dev/obelinf/apis/obelinf-api.md) · [All operations](https://skmtc.dev/obelinf/apis/obelinf-api/llms.txt) · [OpenAPI document](https://skmtc.dev/obelinf/apis/obelinf-api/revisions/463fcf791828?raw)
