Skip to main content
POST
Sign up from an agent

Body

application/json
email
string
required

The work email of the person the key is for. They get the email that approves it.

Maximum string length: 320
Example:

"maya@acme.com"

agentName
string

What to call the agent in the approval email and on the page the person approves on: up to 40 letters, digits, spaces, hyphens and underscores, and a dot between two digits (Claude 3.5). The new key is named after it.

Required string length: 1 - 40
Pattern: ^(?:[A-Za-z0-9 _-]|(?<=\d)\.(?=\d))+$
Example:

"Claude Code"

Response

The approval email is on its way. Poll with the pollToken until the person approves.

pollToken
string
required

Send it to POST /v1/agent-sign-ups/poll. Keep it secret: it collects the API key.

matchCode
string
required

Show it to the person. For a new account, the approval email and page show the same code, and the person approves only if the two match. For an address that already has an account, the person types it to approve. It is not a secret.

pollIntervalSeconds
integer
required

Wait this many seconds between polls.

expiresAt
string<date-time>
required

When the request ends if the person has not approved it.