Get a Published Form

Returns the fields of the published form at this slug, in order, for a client to render. A draft or closed form answers 404.

post/forms/get-published
curl --request POST \
  --url 'https://api.tries.care/forms/get-published' \
  --header 'Content-Type: application/json' \
  --data '{
  "slug": "string"
}'
{
  "slug": "string",
  "title": "string",
  "description": "string",
  "access": "anyone",
  "fields": [
    {
      "key": "string",
      "kind": "text",
      "label": "string",
      "help": "string",
      "required": true,
      "options": [
        {
          "value": "string",
          "label": "string"
        }
      ]
    }
  ]
}

Body Parameters

application/json
  • slugstringrequired

    length ≤ 60

Responses

  • 200PublishedFormViewapplication/json
    • slugstringrequired

      length ≤ 60

    • titlestringrequired
    • descriptionstringnullablerequired
    • accessenum<string>required

      Values:"anyone""signed-in"

    • fieldsobject[]required
      Properties (6)
      • keystringrequired
      • kindenum<string>required

        Values:"text""textarea""email""phone""radio""checkboxes""select""checkbox"

      • labelstringrequired
      • helpstringnullablerequired
      • requiredbooleanrequired
      • optionsobject[]required
        Properties (2)
        • valuestringrequired
        • labelstringrequired
  • 404FormNotFoundErrorapplication/json
    • _tagenum<string>required
    • formstringrequired
  • 500DatabaseErrorapplication/json
    • _tagenum<string>required
    • messagestringrequired