chatformdocs
API referenceV1

Picture a form's draft

Opens the working draft in a headless browser, as a respondent would first see it, and returns a PNG. Nothing is published. `screen` opens on one question by its ref. Ten a minute per key.

POST
/v1/forms/{id}/preview

Authorization

AuthorizationBearer <token>

A server-side secret key. Never send one from a browser — a request carrying an Origin header is refused for this reason.

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/v1/forms/string/preview" \  -H "Content-Type: application/json" \  -d '{}'
{  "preview_url": "string",  "expires_at": 0,  "device": "phone",  "image": {    "mime_type": "image/png",    "data": "string"  },  "note": "string"}