# POST /api/v1/keys/link

Auth: Bearer

HTML: https://cooperemail.com/docs/reference/keys-link

## Summary

Get a single-use browser link that creates one new full-access API key. For an account that signed in with OAuth (ChatGPT, Claude, Grok Bot) and has no key. Needs an OAuth token or a full-access key; a restricted or inbox-scoped key gets HTTP 403 permission_denied. Body name is optional, at most 80 characters (default created from link). HTTP 201 returns {object: api_key_link, url, expires_at, single_use, key_name, note}, never the key. The link expires in 15 minutes and works once. Opening it shows a Create key button; pressing it shows the new key once on that page. Existing keys and OAuth connections keep working. 5 links per hour per account, then HTTP 429 rate_limited. MCP: cooper_create_api_key_link.

## Request

```json
{
  "name": "laptop curl"
}
```

## Response

HTTP 201. Sample values illustrate the schema.

```json
{
  "object": "api_key_link",
  "url": "https://example.com/hooks/cooper",
  "expires_at": "2026-10-18T12:00:00.000Z",
  "single_use": true,
  "key_name": "string"
}
```

## Errors

- HTTP 403 permission_denied
- HTTP 429 rate_limited

The live `message` is the sentence for that code. Branch on `code`.

```json
{
  "error": {
    "type": "authentication_error",
    "code": "permission_denied",
    "docs_url": "https://cooperemail.com/docs#permission_denied"
  }
}
```

## Idempotency

This route does not document Idempotency-Key or client_id.
