---
title: "Ask the account owner for an API key (no key needed)"
method: POST
path: "/api/v1/agent/connect"
---

# Ask the account owner for an API key (no key needed)

`POST /api/v1/agent/connect`

## Request

- Base URL: `https://www.premierletters.com`
- URL: `https://www.premierletters.com/api/v1/agent/connect`
- Auth: none required

Emails the owner an approval link (they can sign up from it). Show them user_code, then poll GET /api/v1/agent/connect/{id}?secret=<poll_secret> every 10-30 seconds until status is approved. Always 202 for a valid body, whether or not the email has an account.

## Request body

- ConnectRequest
  - `email` string, email, required: The account owner's email; the approval link is sent here
  - `agent_name` string, required: Your name as the user will see it, e.g. "Claude". Letters, digits, spaces and . , ' & ( ) - _ only (no links).
  - `mode` 'live' | 'test'

## Response `202`

Request created and approval email sent

- ConnectStarted
  - `request_id` string, uuid
  - `poll_url` string, uri
  - `poll_secret` string: Pass as ?secret= when polling. Keep it private.
  - `user_code` string: Short code (ABC-DEF) to show the user; the approval page repeats it
  - `expires_at` string, date-time
  - `instructions` string

## Other responses

- `400`: invalid_json, or validation_error (bad email, agent_name or mode)
- `429`: rate_limited: too many requests from this IP, or for this email, in the last hour
- `502`: connect_failed

---

[API](https://skmtc.dev/premierletters/apis/premier-letters-api.md) · [All operations](https://skmtc.dev/premierletters/apis/premier-letters-api/llms.txt) · [OpenAPI document](https://skmtc.dev/premierletters/apis/premier-letters-api/revisions/9dc302324ca1?raw)
