---
title: "POST /extension/connect"
method: POST
path: "/extension/connect"
---

# POST /extension/connect

`POST /extension/connect`

## Request

- Base URL: `https://api.useanima.sh/v1`
- URL: `https://api.useanima.sh/v1/extension/connect`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

## Request body

- object: Input for minting a headless extension connection.
  - `agentId` union: Agent identifier. Optional when using an agent API key (resolved automatically); required when using a master key.
    - string
    - string
  - `ttl` '15m' | '1h' | 'session': Override the org tokenTtl for this connection. Shorten-only: a value longer than the org setting (15m < 1h < session) is rejected.

## Response `200`

OK

- object: Headless extension connection details.
  - `agentId` string, required: Agent the connection is bound to.
  - `connectUrl` string, uri, required: Open in a Puppeteer-driven browser to connect the extension.
  - `expiresAt` string, date-time, nullable, required: Token expiry (null for session).
  - `exchangeExpiresAt` string, date-time, required: Single-use code expiry (~60s).
  - `policy` 'session' | 'pre_approved', required: Effective org auth policy. Never prompt_owner — headless connect refuses that policy.

---

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