---
title: "Create Api Key"
method: POST
path: "/org/api-keys"
tags: ["org"]
---

# Create Api Key

`POST /org/api-keys`

## Request

- Base URL: `https://api.os3robotics.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.os3robotics.com/org/api-keys`
- Auth: HTTP bearer

## Request body

- ApiKeyIn
  - `name` string, required
  - `workspace_id` string, uuid, nullable
  - `scopes` string[], required
  - `expires_at` string, date-time, nullable

## Response `201`

Successful Response

- ApiKeyCreated
  - `id` string, uuid, required
  - `name` string, required
  - `prefix` string, required
  - `workspace_id` string, uuid, nullable, required
  - `scopes` string[], nullable, required
  - `created_by` string, uuid, nullable, required
  - `created_by_email` string, nullable, required
  - `created_at` string, date-time, required
  - `expires_at` string, date-time, nullable, required
  - `last_used_at` string, date-time, nullable, required
  - `key` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/os3robotics/apis/os3-api.md) - [All operations](https://skmtc.dev/os3robotics/apis/os3-api/llms.txt) - [OpenAPI document](https://skmtc.dev/os3robotics/apis/os3-api/revisions/af32cd4f14bb?raw)
