Public form endpoints

Reading a published form and submitting a response.

MethodPathSummary
GET/v1/app/forms/public/:slugA published form's structure/theme (404 if draft/closed) optionalAuth so alreadySubmitted can be reported for one-response-per-user forms without requiring t…
POST/v1/app/forms/public/:slug/submitSubmit a response. FormData shape: answers = JSON string { [fieldId]: value|value[] }, plus one file part per file-type field named file_<fieldId>

#A published form's structure/theme (404 if draft/closed) optionalAuth so alreadySubmitted can be reported for one-response-per-user forms without requiring t…

GET/v1/app/forms/public/:slug

A published form's structure/theme (404 if draft/closed) optionalAuth so alreadySubmitted can be reported for one-response-per-user forms without requiring the caller to be signed in for forms that don't need it.

Address
https://<your-org>.brambleit.cloud/api/v1/app/forms/public/:slug
Requires
Signed-in session, X-API-Key, or a Bramble app access token (Authorization: Bearer).

Path parameters

NameTypeDescription
slugrequiredstring

Response 200

FieldTypeDescription
formobject
form.titlestring
form.accent_colorany
closedboolean
Example response
JSON
{
  "form": {
    "title": "Example title",
    "accent_color": null
  },
  "closed": false
}

Errors

StatusMessage
404Form not found

Example request

Bash
curl -X GET 'https://<your-org>.brambleit.cloud/api/v1/app/forms/public/example' \
  -H "X-API-Key: $BRAMBLE_KEY"

#Submit a response. FormData shape: `answers` = JSON string { [fieldId]: value|value[] }, plus one file part per file-type field named `file_<fieldId>`

POST/v1/app/forms/public/:slug/submit
Address
https://<your-org>.brambleit.cloud/api/v1/app/forms/public/:slug/submit
Requires
Signed-in session, X-API-Key, or a Bramble app access token (Authorization: Bearer).

Path parameters

NameTypeDescription
slugrequiredstring

Request body

multipart/form-data with the file, plus these fields:

NameTypeDescription
answersarray of any

Response 201

FieldTypeDescription
okboolean
Example response
JSON
{
  "ok": true
}

Errors

StatusMessage
404Form not found
401You must be signed in to submit this form
409You've already submitted a response to this form

Example request

Bash
curl -X POST 'https://<your-org>.brambleit.cloud/api/v1/app/forms/public/example/submit' \
  -H "X-API-Key: $BRAMBLE_KEY" \
  -H "Content-Type: application/json" \
  -d '{"answers":[]}'