---
title: "Create Own Key"
method: POST
path: "/v1/organizations/me/keys"
tags: ["organization-keys"]
---

# Create Own Key

`POST /v1/organizations/me/keys`

Create an API key owned by the caller, in a workspace they may see.

The member-scoped counterpart of ``POST /v1/keys``: the owner is always the
caller's own attribution user, the key is always budget-enforced, and the
workspace must be visible to the caller (a member of it, or an organization
owner/admin/superuser, who see every workspace). The secret is returned once.

## Request body

- CreateOwnKeyRequest — Create-key body for the member surface. Deliberately not ``CreateKeyRequest``: it carries no ``user_id`` (the owner is always the caller) and no ``exclude_from_budget`` (a member must not exempt their own spend from enforcement).
  - `allowed_models` string[], nullable — Model allow-list: null = any model your user default allows, [] = deny all, or canonical instance:model entries. A key can only narrow your own model access, never broaden it.
  - `capture_agent_telemetry` boolean, nullable — Per-key override of the deployment-wide capture_agent_telemetry setting: null (default) inherits it, true always stores this key's coding-agent telemetry, false always discards it.
  - `expires_at` string, date-time, nullable — Optional expiration timestamp
  - `key_name` string, nullable — Optional name for the key
  - `metadata` object — Optional metadata
  - `reject_user_mismatch` boolean, nullable — Per-key override of the deployment-wide reject_user_mismatch setting: null (default) inherits it, true always rejects a request naming a different 'user', false always accepts it. Spend binds to your own user either way.
  - `workspace_id` string, uuid, nullable — Workspace this key belongs to, which must be one you may see in your active organization. Omitted means that organization's default workspace, refused when you are not a member of it.

## Response `200`

Successful Response

- CreateKeyResponse — Response model for creating a new API key.
  - `allowed_models` string[], nullable, required
  - `capture_agent_telemetry` boolean, nullable, required
  - `created_at` string, required
  - `exclude_from_budget` boolean, required
  - `expires_at` string, nullable, required
  - `id` string, required
  - `is_active` boolean, required
  - `key` string, required
  - `key_name` string, nullable, required
  - `key_prefix` string, nullable, required
  - `metadata` object, required
  - `reject_user_mismatch` boolean, nullable, required
  - `user_id` string, nullable, required

## Other responses

- `422` — Validation Error

## Changes

- **2026-08-31** `af93af8f54c8` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/mozilla-ai/apis/otari/changes/v1/organizations/me/keys/post.md)

---

[API](https://skmtc.dev/mozilla-ai/apis/otari.md) · [All operations](https://skmtc.dev/mozilla-ai/apis/otari/llms.txt) · [OpenAPI document](https://skmtc.dev/mozilla-ai/apis/otari/revisions/80c117c36f36?raw)
