---
title: "Attach an agent to the JWT's account (direct or via nonce)"
method: POST
path: "/v1/accounts/me/attach-agent"
tags: ["accounts"]
---

# Attach an agent to the JWT's account (direct or via nonce)

`POST /v1/accounts/me/attach-agent`

## Request

- Base URL: `https://alive-api.alphakek.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://alive-api.alphakek.ai/v1/accounts/me/attach-agent`
- Auth: none declared

Polymorphic dispatch on credential prefix.

`credential=api_key:<alive_sk_...>` — direct dashboard attach.
`credential=nonce:<aa_...>` — claim-URL completion.

## Request body

- AttachAgentRequest: Polymorphic credential — mirrors the `/v1/transfers` shape.
  - `credential` string, required: One of: `api_key:<alive_sk_...>` (direct dashboard attach) or `nonce:<aa_...>` (claim-URL completion).

## Response `200`

Successful Response

- AttachAgentResponse
  - `agent_id` string, required
  - `agent_slug` string, required
  - `account_id` string, required

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-16** `b6d96e7673dc`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/alphakek-ai/apis/aikek-api/changes/v1/accounts/me/attach-agent/post.md)

---

[API](https://skmtc.dev/alphakek-ai/apis/aikek-api.md) - [All operations](https://skmtc.dev/alphakek-ai/apis/aikek-api/llms.txt) - [OpenAPI document](https://skmtc.dev/alphakek-ai/apis/aikek-api/revisions/b6d96e7673dc?raw)
