---
title: "invite Agent Connection"
method: POST
path: "/agent-connections/{address}/invitation"
tags: ["Agent Connections"]
---

# invite Agent Connection

`POST /agent-connections/{address}/invitation`

## Request

- Base URL: `https://api.primitive.dev/v1`
- URL: `https://api.primitive.dev/v1/agent-connections/{address}/invitation`
- Auth: HTTP bearer

Explicitly reconnect an existing agent. Set pending_only:true for Continue setup: the locked connection must still be pending or the server returns 409 connection_already_claimed without deleting any credential. Generic reconnect revokes old credentials and returns a new single-use invitation. An uncertain response must not be automatically retried.

## Path parameters

- `address` string, email, required

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `pending_only` boolean

## Response `200`

Success

- object
  - `success` unknown, required
  - `data` object, required
    - `connection` AgentConnection, required
      - `id` string
      - `shopping_function_id` string, nullable
      - `address` string, email, required
      - `name` string, required
      - `owner_address` string, email, required
      - `owner_member_address` string, email, nullable, required
      - `status` 'pending' | 'claimed' | 'connected' | 'revoked', required
      - `created_at` string, date-time, required
      - `updated_at` string, date-time, required
      - `claimed_at` string, date-time, nullable, required
      - `verified_at` string, date-time, nullable, required
      - `last_seen_at` string, date-time, nullable, required
      - `revoked_at` string, date-time, nullable
      - `presence` object, nullable
        - `last_checked_at` string, date-time, required
        - `expires_at` string, date-time, required
        - `valid_for_ms` integer, required
      - `ownership_kind` 'personal' | 'shared' | 'legacy_unknown', required
      - `owner_user_id` string, nullable, required
      - `owner_active` boolean, nullable, required
      - `hidden` boolean
      - `hidden_reason` 'idle' | 'manual', nullable
      - `hidden_at` string, date-time, nullable
      - `keep_visible` boolean
      - `last_activity_at` string, date-time, nullable
    - `invitation` object, required
      - `claim_url` string, uri, required
      - `expires_at` string, date-time, required

## Other responses

- `400`: Invalid request parameters
- `401`: Invalid or missing API key
- `403`: Authenticated caller lacks permission for the operation
- `404`: Resource not found
- `409`: The request conflicts with the current state of the resource
- `429`: Rate limit exceeded. The `ratelimit-*` headers describe the limiter that rejected this request, with its own limit and window, not the API budget that successful responses report. A limiter that reports only a wait sends `Retry-After` alone.
- `503`: connection_cleanup_pending: the disconnected connection's old credential is still being removed. Nothing was changed and the cleanup progress is kept; retry after the Retry-After interval.

## Changes

> 32 revisions in range; 1 not diffed.

- **2026-11-03** `bce409c97acb`: 217 warning
  - added the new `access_mode_unavailable` enum value to the `error/code` response property for the response status `400`
  - added the new `access_mode_unavailable` enum value to the `error/code` response property for the response status `401`
  - added the new `access_mode_unavailable` enum value to the `error/code` response property for the response status `403`
  - added the new `access_mode_unavailable` enum value to the `error/code` response property for the response status `404`
  - …213 more
  - …this revision’s changelog is incomplete
- **2026-10-21** `0360ea8d4f3d`: 91 warning
  - added the new `agent_changed` enum value to the `error/code` response property for the response status `400`
  - added the new `agent_changed` enum value to the `error/code` response property for the response status `401`
  - added the new `agent_changed` enum value to the `error/code` response property for the response status `403`
  - added the new `agent_changed` enum value to the `error/code` response property for the response status `404`
  - …87 more
- …earlier changes not shown

[Operation history](https://skmtc.dev/primitive/apis/primitive-api/changes/agent-connections/:address/invitation/post.md)

---

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