---
title: "Step 2 of agent self-registration; the signed message returns an agent account and an API key (unauthenticated)"
method: POST
path: "/api/v1/agents/accounts"
tags: ["agents"]
---

# Step 2 of agent self-registration; the signed message returns an agent account and an API key (unauthenticated)

`POST /api/v1/agents/accounts`

## Request

- Base URL: `https://amplerun-api.spiry.org`
- URL: `https://amplerun-api.spiry.org/api/v1/agents/accounts`
- Auth: none required

Verifies the signed challenge (single use, unexpired, byte-for-byte the message the server wrote, signed by its address) and opens an account tagged account_kind agent, with the wallet as its verified linked wallet and payout destination. Returns an API key with the renter scope (add "host" to scopes to host), shown once. The same wallet again returns the same account (200) and a new key, only with a fresh signature. There is no free credit: fund the account (POST /api/v1/funding-intents) before renting. Refused: a replayed, expired or tampered message (401); a wallet linked to or unlinked from another account, or an account with an authenticator app (409); a suspended account's wallet (403). Rate-limited per source address and per wallet (429). Audited.

## Request body

- object
  - `message` string, required: The challenge message
  - `signature` string, required: 0x-prefixed EIP-191 signature.
  - `agent` object, required: Self-declared and unverified; shown to operators, never used for authorization.
    - `name` string, required
    - `vendor` string, required: Who made the agent or its model, e.g. "grok".
    - `model` string
    - `operator_contact` string
    - `homepage` string, uri
  - `scopes` string[]

## Response `200`

The agent's account (201 new, 200 existing) and a new API key. The secret is shown only here.

- object
  - `account_id` string, required
  - `account_kind` 'agent' | 'human', required
  - `created` boolean, required
  - `address` string, required: Lowercase wallet address.
  - `terms_version` string, required
  - `api_key` object, required
    - `key_id` string, uuid, required
    - `secret` string, required: ark_... Send as Authorization: Bearer <secret>.
    - `prefix` string, required
    - `scopes` string[], required
  - `next_steps` object, required
    - `fund` string, required
    - `rent` string, required
    - `mcp` string, required

## Other responses

- `201`: The agent's account (201 new, 200 existing) and a new API key. The secret is shown only here.
- `default`: Error envelope. 401 unauthenticated, 403/404 forbidden, 409 conflict, 422 invalid input, 429 rate limited (code UNAVAILABLE, retryable:true, no Retry-After header), 503 unavailable money/provider state with retryable:true.

---

[API](https://skmtc.dev/amplerun/apis/amplerun-business-api.md) · [All operations](https://skmtc.dev/amplerun/apis/amplerun-business-api/llms.txt) · [OpenAPI document](https://skmtc.dev/amplerun/apis/amplerun-business-api/revisions/40944687fa52?raw)
