Public form endpoints
Reading a published form and submitting a response.
| Method | Path | Summary |
|---|---|---|
| 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 t… |
| POST | /v1/app/forms/public/:slug/submit | Submit 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/:slugA 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
| Name | Type | Description |
|---|---|---|
slugrequired | string |
Response 200
| Field | Type | Description |
|---|---|---|
form | object | |
form.title | string | |
form.accent_color | any | |
closed | boolean |
Example response
JSON
{
"form": {
"title": "Example title",
"accent_color": null
},
"closed": false
}Errors
| Status | Message |
|---|---|
| 404 | Form 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"JavaScript
const res = await fetch('https://<your-org>.brambleit.cloud/api/v1/app/forms/public/example', {
method: 'GET',
headers: { 'X-API-Key': process.env.BRAMBLE_KEY },
});
const data = await res.json();Python
import os, requests
r = requests.get(
"https://<your-org>.brambleit.cloud/api/v1/app/forms/public/example",
headers={"X-API-Key": os.environ["BRAMBLE_KEY"]},
)
r.raise_for_status()
data = r.json()PowerShell
$headers = @{ 'X-API-Key' = $env:BRAMBLE_KEY }
Invoke-RestMethod -Method GET -Uri 'https://<your-org>.brambleit.cloud/api/v1/app/forms/public/example' -Headers $headers#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
| Name | Type | Description |
|---|---|---|
slugrequired | string |
Request body
multipart/form-data with the file, plus these fields:
| Name | Type | Description |
|---|---|---|
answers | array of any |
Response 201
| Field | Type | Description |
|---|---|---|
ok | boolean |
Example response
JSON
{
"ok": true
}Errors
| Status | Message |
|---|---|
| 404 | Form not found |
| 401 | You must be signed in to submit this form |
| 409 | You'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":[]}'JavaScript
const res = await fetch('https://<your-org>.brambleit.cloud/api/v1/app/forms/public/example/submit', {
method: 'POST',
headers: { 'X-API-Key': process.env.BRAMBLE_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({"answers":[]}),
});
const data = await res.json();Python
import os, requests
r = requests.post(
"https://<your-org>.brambleit.cloud/api/v1/app/forms/public/example/submit",
headers={"X-API-Key": os.environ["BRAMBLE_KEY"]},
json={"answers":[]},
)
r.raise_for_status()
data = r.json()PowerShell
$headers = @{ 'X-API-Key' = $env:BRAMBLE_KEY }
$body = '{"answers":[]}'
Invoke-RestMethod -Method POST -Uri 'https://<your-org>.brambleit.cloud/api/v1/app/forms/public/example/submit' -Headers $headers -ContentType 'application/json' -Body $bodyWas this page helpful?
Thanks for your feedback.