Skip to content

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 URLhttps://api.syntheticarchetype.com (all routes under /api)
Specopenapi.json, OpenAPI 3.1
AuthAuthorization: Bearer <access token>
FormatJSON 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:

  1. POST /api/oauth/device/code returns device_code, user_code, verification_uri_complete, expires_in and interval.
  2. Open verification_uri_complete in a browser and approve the sign in with your Synthetic Archetype account.
  3. Poll POST /api/oauth/device/token with {"device_code": "..."} every interval seconds. While approval is pending it answers 403 with error: "authorization_pending" (or slow_down); once approved it returns 200 with an access_token.
  4. Send Authorization: Bearer <access_token> on every other request. GET /api/oauth/me confirms who the token belongs to.
bash
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 ​

MethodPathoperationIdWhat it does
GET/healthgetHealthCheck that the API is up
GET/openapi.jsongetOpenApiSpecGet the OpenAPI description

Auth ​

MethodPathoperationIdWhat it does
POST/api/oauth/device/codestartDeviceAuthorizationStart the device login flow
POST/api/oauth/device/tokenpollDeviceTokenPoll for the device login token
POST/api/oauth/validate-tokenvalidateTokenCheck an access token
GET/api/oauth/megetCurrentUserIdShow who the token belongs to

Features ​

MethodPathoperationIdWhat it does
GET/api/featureslistFeaturesList the user's features
POST/api/featurescreateFeatureSave a new feature
GET/api/features/{feature_id}getFeatureGet one feature
PUT/api/features/{feature_id}updateFeatureUpdate a feature
DELETE/api/features/{feature_id}deleteFeatureDelete a feature

Runs ​

MethodPathoperationIdWhat it does
POST/api/plugin/runscreateRunStart a persona-driven validation run
GET/api/plugin/runs/{run_id}getRunGet a run's status and feedback
POST/api/plugin/runs/{run_id}/resultssubmitRunResultsSubmit the results of a run

Personas ​

MethodPathoperationIdWhat it does
GET/api/personalistPersonasList the user's personas
POST/api/persona/generategeneratePersonasGenerate personas from a distribution
POST/api/persona/vibecreateVibePersonaPreview or save a persona from a description
POST/api/persona/customcreatePersonaPresetSave a persona preset (pool spec)
POST/api/persona/pool/createcreatePersonaPoolCreate a persona pool
GET/api/persona/poolslistPersonaPoolsList the user's persona pools
GET/api/persona/pools/{pool_id}getPersonaPoolGet one persona pool with its members
PATCH/api/persona/pools/{pool_id}updatePersonaPoolUpdate or rename a persona pool
DELETE/api/persona/pools/{pool_id}deletePersonaPoolDelete a persona pool

Validation tests ​

MethodPathoperationIdWhat it does
GET/api/validation-tests/{test_id}getValidationTestGet a validation test
GET/api/validation-tests/{test_id}/statusgetValidationTestStatusPoll a validation test's status
GET/api/validation-tests/{test_id}/resultsgetValidationTestResultsGet a hypothesis test's results. Deprecated

UAT ​

MethodPathoperationIdWhat it does
GET/api/uat/testslistUatTestsList the user's UAT tests
POST/api/uat/testscreateUatTestCreate a UAT test
GET/api/uat/tests/{test_id}getUatTestGet a UAT test
PUT/api/uat/tests/{test_id}updateUatTestUpdate a UAT test
DELETE/api/uat/tests/{test_id}deleteUatTestDelete a UAT test
POST/api/uat/tests/{test_id}/runrunUatTestRun a UAT test
GET/api/uat/tests/{test_id}/statusgetUatTestStatusPoll a UAT test's status
GET/api/uat/tests/{test_id}/resultsgetUatTestResultsGet a UAT test's results
GET/api/uat/tests/{test_id}/wait-statuswaitForUatTestStatusWait for the next UAT status event (long poll)

Bootstrap ​

MethodPathoperationIdWhat it does
POST/api/bootstrap/bootstrapTestDraftDraft 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:

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."
}
FieldMeaning
typeA link to this section, the problem type RFC 9457 asks for
status, titleHTTP status and its name
instanceThe path you requested
codeStable machine readable code, such as not_found, method_not_allowed, bad_request, internal_error
detailWhat went wrong for this request
hintHow to recover
docsThis page
errorSame as code, for clients that branch on body.error
messageSame 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.