chatformdocs
API referenceV1

Read a form: its public config, or the document behind it

Without `view`, this answers the published form exactly as a respondent receives it. A form with no published version has only a draft, so that is what comes back instead -- the same body as `view=document`, with `status` saying which you are looking at. Pass `view=document` to read the draft of a form that is already live.

GET
/v1/forms/{id}

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

Query Parameters

view?string

document returns the editable working draft, which is the only view a form has before it is published.

Default"public"

Value in

  • "public"
  • "document"

Response Body

application/json

application/json

curl -X GET "https://example.com/v1/forms/string"
{  "id": "string",  "slug": "string",  "status": "string",  "doc": {    "schemaVersion": 0,    "title": "string",    "description": "string",    "blocks": [      {        "property1": null,        "property2": null      }    ],    "endings": [      {        "property1": null,        "property2": null      }    ],    "endingRules": [      null    ],    "logic": [      null    ],    "layout": {      "property1": {        "x": 0,        "y": 0      },      "property2": {        "x": 0,        "y": 0      }    },    "variables": [      null    ],    "hiddenFields": [      null    ],    "settings": {      "property1": null,      "property2": null    },    "theme": {      "property1": null,      "property2": null    },    "embed": {      "property1": null,      "property2": null    },    "property1": null,    "property2": null  },  "property1": null,  "property2": null}