---
title: "Create a personal API key for this app"
description: "Mint a key that acts as you in this app, with no more permissions than you have."
canonical: "https://grid82.com/docs/app-api/me/keys-create"
updated: "2026-11-13"
---

# Create a personal API key for this app

`POST https://your-suite.grid82.app/your-app/v1/me/keys`

Mint a key that acts as you in this app, with no more permissions than you have.

> **Note: Generic contract**
>
> Your own version of this operation, with your tables and the fields you can read, is in
> your app's document: `https://{suite}.grid82.app/{app}/v1/openapi.json`, behind your credential.
> [Why each person gets their own](/docs/start/studio-and-runtime#why-an-app-has-an-api-of-its-own).

Only signed-in browsers can mint keys; keys and connected agents cannot mint keys. Keys expire in 90 days unless configured otherwise; `expiresInDays: null` keeps the key active until revoked. The key is returned once and never stored in clear.

Any valid credential for this API: no scope is needed. Operation `me.keys.create`. Not an MCP tool. Minting a credential from a credential is how one leaked token becomes a permanent one. Keys are made by a person in a signed-in browser, never by a connected agent. CLI: `grid82 me keys create` (`npx grid82`).

## Headers

| Name              | Type   | Required | Description                                                                                                                                                                                                                                                        |
| ----------------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `Idempotency-Key` | string | no       | Any unique string. Sending the same key with the same request again returns the first response (marked `Idempotency-Replayed: true`) instead of running it twice. Reusing it for a different request is refused with 409. Kept for 24 hours. Up to 255 characters. |

## Request body

| Field           | Type            | Required | Description          |
| --------------- | --------------- | -------- | -------------------- |
| `name`          | string          | yes      | Up to 60 characters. |
| `scopes`        | string\[]       | yes      |                      |
| `expiresInDays` | integer or null | no       |                      |

**Authorizations**

- `Authorization` (bearer, in header, required)

## Response

**201**: Success

- `data` (`object`, required)
- `data.id` (`string`, required)
- `data.kind` (`enum<string>`, required, one of: `key, oauth`)
- `data.name` (`string`, required)
- `data.keyId` (`string`, required)
- `data.scopes` (`string[]`, required)
- `data.clientId` (`string,null`, required)
- `data.appIds` (`string[] | null`, required)
- `data.createdAt` (`string`, required)
- `data.expiresAt` (`string,null`, required)
- `data.lastUsedAt` (`string,null`, required)
- `data.key` (`string`, required)

```json
{
  "data": {
    "id": "<string>",
    "kind": "key",
    "name": "<string>",
    "keyId": "<string>",
    "scopes": [
      "<string>"
    ],
    "clientId": null,
    "appIds": [
      "<string>"
    ],
    "createdAt": "<string>",
    "expiresAt": null,
    "lastUsedAt": null,
    "key": "<string>"
  }
}
```

**4XX**: Refused

- `error` (`object`, required)
- `error.code` (`enum<string>`, required, one of: `not_found, forbidden, unauthenticated, validation_failed, conflict, rate_limited, payment_required, not_implemented, internal`)
- `error.message` (`string`, required)
- `error.details` (`Record<string, unknown>`)

```json
{
  "error": {
    "code": "not_found",
    "message": "<string>",
    "details": {}
  }
}
```

**Example request**

```bash
curl --request POST \
  --url 'https://your-suite.grid82.app/your-app/v1/me/keys' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "scopes": [
    "<string>"
  ]
}'
```
