> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tattoo.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Private Agent Authentication (PAT live / adapters staged)

> PAT prefixes, scopes, private OpenAPI, and the authenticated /mcp agent host (TAT-158). Verify/introspect/MCP host are live on api.tattooapi.com; product adapters remain staged.

> [!WARNING]
>
> This page documents the **TattooAPI half** of private artist/studio Agent MCP (TAT-158). As of Railway deploy `a70bd1b8` (cafe `d1dd9c7f`), `POST /api/v1/auth/pats/verify`, `POST /api/v1/auth/pats/introspect`, and `GET|POST /api/mcp` are live on `api.tattooapi.com`. Issuance/revoke and full artist/studio product adapters remain staged. Public partner `X-API-Key` credentials are **not** interchangeable with these PATs.

## PAT format

| Mode | Prefix | Example shape |
| - | - | - |
| Test | `tat_test_` | `tat_test_<base64url>` |
| Live | `tat_live_` | `tat_live_<base64url>` |

TattooAPI stores only a SHA-256 (or HMAC-SHA256 when `PAT_HASH_SECRET` is set) hash. The full token is returned **once** at issuance.

## Scopes

| Scope | Purpose |
| - | - |
| `portfolio:read` | Owner-scoped portfolio context |
| `portfolio:write` | Owner portfolio mutations (when product adapters enable them) |
| `profile:read` | Bound artist/studio profile |
| `availability:read` | Free/busy style availability |
| `bookings:read` | Booking reads |
| `booking_rate:read` | Booking-rate / deposit rule reads |
| `leads:write` | Create leads for the bound subject |
| `quotes:read` | Read quote drafts |
| `quotes:write` | Create/update quote drafts |

## Endpoints

* `POST /api/v1/auth/pats` — issue
* `POST /api/v1/auth/pats/verify` — verify (+ optional `requiredScopes`)
* `POST /api/v1/auth/pats/revoke` — revoke by id
* `POST /api/v1/auth/pats/introspect` — active metadata
* `GET|POST /api/mcp` — authenticated Agent MCP host

Machine contract: [Private Agent OpenAPI](https://docs.tattoo.dev/openapi-private-agent.md) (JSON embedded; raw `.json` asset upload unavailable via Mintlify Admin MCP).

## MCP tools

| Tool | Role |
| - | - |
| `list_contexts` | Artist/studio bindings for this PAT |
| `search_operations` | Discover allowed operations |
| `describe_operation` | Schema + scopes + safety |
| `execute_operation` | Run against the bound tenant |

Call with `Authorization: Bearer tat_test_...` (or `tat_live_...`).

## Public vs private

Public partner keys (`X-API-Key` from partners.tattoo.dev) continue to use the permissions on [Authentication](https://docs.tattoo.dev/authentication.md). They must not reach private PAT routes or `/api/mcp` agent tools.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.