keys.create
Make a named agent key for one shop (owner only). The owner accepts the agent key terms by passing accept_terms_version. Optional scopes narrow the key: read_only (no changes) and no_money (no charges, refunds or payment changes). A key never does more than the owner can. The key is shown once, here, and never again.
| Who | A person's own sign-in only (agent tokens are refused) |
| REST | POST /v1/keys |
| MCP tool | Not an MCP tool |
| Writes | yes, send an Idempotency-Key |
| Area | Sign-in and agent access |
When to use it
The owner makes a key for each agent they use, with a name they will recognize. The key is shown once and never again, so save it when it is made.
What to tell the owner
Ask the person to do this with their own sign-in. Your agent token is refused here.
Input
| Field | Type | Required |
|---|---|---|
shop_id | string | yes |
label | string | yes |
scopes | array | no |
audience | string (one of any, mcp) | no |
accept_terms_version | string | yes |
Example
POST https://doingwork.work/v1/keys
content-type: application/json
Idempotency-Key: 3f1c...
{
"shop_id": "00000000-0000-4000-8000-000000000000",
"label": "...",
"accept_terms_version": "..."
}Output
JSON. The response shape isn't published yet; read the fields you need and ignore the rest. Errors are {code, message, status}.
Errors
| Code | Status | What to do |
|---|---|---|
invalid_input, invalid_token, rate_limited | Can happen on any call. See errors. |