---
title: "Create Keys Bulk"
method: POST
path: "/v1/mcp/projects/{project_id}/keys/bulk"
tags: ["mcp"]
---

# Create Keys Bulk

`POST /v1/mcp/projects/{project_id}/keys/bulk`

## Request

- Base URL: `https://api.sonenta.dev`
- URL: `https://api.sonenta.dev/v1/mcp/projects/{project_id}/keys/bulk`
- Auth: none declared

Batch key creation — idempotent, best-effort per-item. Batches the
writes only; there is NO server-side translation.

Valid items commit even when siblings fail; each item gets an entry in
`results` (status ok|error) plus a roll-up `summary`. Unknown namespace
and intra-batch duplicates (same namespace+name twice) error per item.
The plan key-cap is a whole-batch gate: if the NEW keys would push the
org over its cap the entire call is rejected (403) before any write.

## Path parameters

- `project_id` string, required

## Request body

- CreateKeysBulkIn
  - `items` KeyBulkItem[], required
    - `namespace` string, required: Namespace slug
    - `name` string, required
    - `type` string
    - `source_value` string, nullable
    - `description` string, nullable
    - `plurals` boolean
    - `max_length` integer, nullable
    - `update_source` boolean

## Response `200`

Successful Response

- CreateKeysBulkOut
  - `results` KeyBulkResult[], required
    - `index` integer, required
    - `status` string, required
    - `created` boolean, nullable
    - `key_uuid` string, nullable
    - `key_name` string, nullable
    - `namespace_uuid` string, nullable
    - `error` BulkItemError
      - `code` string, required
      - `message` string, required
  - `summary` BulkSummary, required
    - `total` integer, required
    - `ok` integer, required
    - `errors` integer, required
    - `created` integer
    - `updated` integer
    - `unchanged` integer

## Other responses

- `422`: Validation Error

---

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