Synthetic Archetype API
The Synthetic Archetype API is the HTTP API behind the Claude Code plugin and the web portal. Agents and scripts can call it directly to read features, build personas and record or fetch validation runs.
| Base URL | https://api.syntheticarchetype.com (all routes under /api) |
| Spec | openapi.json, OpenAPI 3.1 |
| Auth | Authorization: Bearer <access token> |
| Format | JSON in, JSON out |
For agents
Load the OpenAPI spec first. Every operation has a unique operationId, a description written for tool selection, typed parameters and response schemas, so it can be turned into function calling tools directly.
Authentication
The API uses the OAuth 2.0 device authorization grant (RFC 8628), the same flow /archetype:setup runs:
POST /api/oauth/device/codereturnsdevice_code,user_code,verification_uri_complete,expires_inandinterval.- Open
verification_uri_completein a browser and approve the sign in with your Synthetic Archetype account. - Poll
POST /api/oauth/device/tokenwith{"device_code": "..."}everyintervalseconds. While approval is pending it answers403witherror: "authorization_pending"(orslow_down); once approved it returns200with anaccess_token. - Send
Authorization: Bearer <access_token>on every other request.GET /api/oauth/meconfirms who the token belongs to.
curl -s -X POST https://api.syntheticarchetype.com/api/oauth/device/code
curl -s -X POST https://api.syntheticarchetype.com/api/oauth/device/token \
-H 'Content-Type: application/json' -d '{"device_code":"<device_code>"}'
curl -s https://api.syntheticarchetype.com/api/oauth/me \
-H 'Authorization: Bearer <access_token>'Endpoints
Grouped by tag. GET aliases kept for older clients (device code, validate token) and the POST alias for renaming a pool are in the spec but left out here.
Meta
| Method | Path | operationId | What it does |
|---|---|---|---|
GET | /health | getHealth | Check that the API is up |
GET | /openapi.json | getOpenApiSpec | Get the OpenAPI description |
Auth
| Method | Path | operationId | What it does |
|---|---|---|---|
POST | /api/oauth/device/code | startDeviceAuthorization | Start the device login flow |
POST | /api/oauth/device/token | pollDeviceToken | Poll for the device login token |
POST | /api/oauth/validate-token | validateToken | Check an access token |
GET | /api/oauth/me | getCurrentUserId | Show who the token belongs to |
Features
| Method | Path | operationId | What it does |
|---|---|---|---|
GET | /api/features | listFeatures | List the user's features |
POST | /api/features | createFeature | Save a new feature |
GET | /api/features/{feature_id} | getFeature | Get one feature |
PUT | /api/features/{feature_id} | updateFeature | Update a feature |
DELETE | /api/features/{feature_id} | deleteFeature | Delete a feature |
Runs
| Method | Path | operationId | What it does |
|---|---|---|---|
POST | /api/plugin/runs | createRun | Start a persona-driven validation run |
GET | /api/plugin/runs/{run_id} | getRun | Get a run's status and feedback |
POST | /api/plugin/runs/{run_id}/results | submitRunResults | Submit the results of a run |
Personas
| Method | Path | operationId | What it does |
|---|---|---|---|
GET | /api/persona | listPersonas | List the user's personas |
POST | /api/persona/generate | generatePersonas | Generate personas from a distribution |
POST | /api/persona/vibe | createVibePersona | Preview or save a persona from a description |
POST | /api/persona/custom | createPersonaPreset | Save a persona preset (pool spec) |
POST | /api/persona/pool/create | createPersonaPool | Create a persona pool |
GET | /api/persona/pools | listPersonaPools | List the user's persona pools |
GET | /api/persona/pools/{pool_id} | getPersonaPool | Get one persona pool with its members |
PATCH | /api/persona/pools/{pool_id} | updatePersonaPool | Update or rename a persona pool |
DELETE | /api/persona/pools/{pool_id} | deletePersonaPool | Delete a persona pool |
Validation tests
| Method | Path | operationId | What it does |
|---|---|---|---|
GET | /api/validation-tests/{test_id} | getValidationTest | Get a validation test |
GET | /api/validation-tests/{test_id}/status | getValidationTestStatus | Poll a validation test's status |
GET | /api/validation-tests/{test_id}/results | getValidationTestResults | Get a hypothesis test's results. Deprecated |
UAT
| Method | Path | operationId | What it does |
|---|---|---|---|
GET | /api/uat/tests | listUatTests | List the user's UAT tests |
POST | /api/uat/tests | createUatTest | Create a UAT test |
GET | /api/uat/tests/{test_id} | getUatTest | Get a UAT test |
PUT | /api/uat/tests/{test_id} | updateUatTest | Update a UAT test |
DELETE | /api/uat/tests/{test_id} | deleteUatTest | Delete a UAT test |
POST | /api/uat/tests/{test_id}/run | runUatTest | Run a UAT test |
GET | /api/uat/tests/{test_id}/status | getUatTestStatus | Poll a UAT test's status |
GET | /api/uat/tests/{test_id}/results | getUatTestResults | Get a UAT test's results |
GET | /api/uat/tests/{test_id}/wait-status | waitForUatTestStatus | Wait for the next UAT status event (long poll) |
Bootstrap
| Method | Path | operationId | What it does |
|---|---|---|---|
POST | /api/bootstrap/ | bootstrapTestDraft | Draft a UAT or validation test from a conversation |
The OpenAPI spec has the full request and response schemas for each operation.
Errors
Unknown paths, wrong methods, malformed JSON and unexpected server errors return an RFC 9457 problem document with Content-Type: application/problem+json:
{
"type": "https://docs.syntheticarchetype.com/api#errors",
"title": "Not Found",
"status": 404,
"detail": "No route matches GET /api/nope.",
"instance": "/api/nope",
"code": "not_found",
"hint": "Check the path and method against the API description at /openapi.json (also served at /api/openapi.json).",
"docs": "https://docs.syntheticarchetype.com/api",
"error": "not_found",
"message": "No route matches GET /api/nope."
}| Field | Meaning |
|---|---|
type | A link to this section, the problem type RFC 9457 asks for |
status, title | HTTP status and its name |
instance | The path you requested |
code | Stable machine readable code, such as not_found, method_not_allowed, bad_request, internal_error |
detail | What went wrong for this request |
hint | How to recover |
docs | This page |
error | Same as code, for clients that branch on body.error |
message | Same text as detail, for clients that show body.message |
Errors that an endpoint raises itself (for example a missing field) keep their documented {"error": "...", "message": "..."} shape; the spec lists both per operation. Either way, branch on error and show message.
Related
- Plugin Guide: the
/archetype:*commands built on this API - LLM Quickstart: a prompt that makes a coding agent set everything up
- llms.txt: an index of these docs for agents