putty
API ReferenceEngine

Preview a project with a candidate brand kit

Renders the project with a candidate brand kit and returns a computed-style preview: the `--brand-*` tokens the kit's seam would declare, plus the kit's name, voice, and WCAG contrast report. The kit is applied to a COPY of the project and nothing is written to the project itself, so previewing a kit never counts as applying it and never breaks the brand-seam gate (zero diff outside `src/brand/` and `public/brand/`). No sandbox is started and no model is called. The kit must be owned by the caller; a foreign kit is not found.

POST
/projects/{projectId}/brand-preview

Renders the project with a candidate brand kit and returns a computed-style preview: the --brand-* tokens the kit's seam would declare, plus the kit's name, voice, and WCAG contrast report. The kit is applied to a COPY of the project and nothing is written to the project itself, so previewing a kit never counts as applying it and never breaks the brand-seam gate (zero diff outside src/brand/ and public/brand/). No sandbox is started and no model is called. The kit must be owned by the caller; a foreign kit is not found.

Path Parameters

projectId*string

The project the operation is about.

Request Body

application/json

The kit to render the copy with, and the file to read the styles from.

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/projects/string/brand-preview" \  -H "Content-Type: application/json" \  -d '{    "brandKitId": "string"  }'
{  "projectId": "string",  "brandKitId": "string",  "name": "string",  "tagline": "string",  "voice": [    "string"  ],  "path": "string",  "tokens": [    {      "name": "string",      "value": "string"    }  ],  "appliedToFile": true,  "contrast": {    "passes": true,    "failures": [      {        "foreground": "string",        "background": "string",        "ratio": 0,        "message": "string"      }    ]  }}