> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Mints a tenant-scoped API key for external REST callers. The key authenticates

> as the tenant (full access within it, no platform operations). The plaintext is returned **once** and never stored. Platform-admin only.

as the tenant (full access within it, no platform operations). The plaintext
is returned **once** and never stored. Platform-admin only.

### Path parameters

<ParamField path="id" type="string" required>
  Tenant ID
</ParamField>

### Request body

`MintTenantKeyBody`

<ParamField body="name" type="string" required>
  Operator label for the key, e.g. `production-orders`.
</ParamField>

### Response

No response body. The new key — plaintext shown once.

### Status codes

| Code  | Meaning                            |
| ----- | ---------------------------------- |
| `200` | The new key — plaintext shown once |
| `403` | Platform-admin credential required |
| `404` | Unknown tenant                     |

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://edi.stateset.com/v1/tenants/{id}/api-keys' \
    --header 'Authorization: Bearer YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
    "name": "Two-Person Tent"
  }'
  ```
</RequestExample>
