Skip to content

Forms

Dynamic forms — the S-Launch platform's mechanism for collecting structured user input. A form is authored in the Form Builder, served to a (potentially unauthenticated) end-user via the Form Viewer, and the resulting Submissions are stored for downstream processing (often by a Factory blueprint).

ResourceWhat it isLives at
Form BuilderAuthoring surface — create, edit, delete form definitions./api/formbuilder/*
Form ViewerPublic/runtime surface — open a form and submit it./api/form/*
SubmissionsStored submission records — list, read, delete./api/form/history/*

Scopes

ScopeReach
formbuilder:readReading form definitions and their thumbnails.
formbuilder:writeAuthoring forms in the builder.
forms:readOpening a form for display.
forms:submitSubmitting data and uploading files to a form.
form_submissions:readReading submission records.
form_submissions:writeDeleting submission records.

The split between formbuilder:* (authoring) and forms:* (consumption) is intentional: a role that should never edit forms (e.g., a customer-facing submission token) can carry forms:submit without formbuilder:write.

Workflow: Open, Submit, and Read a Submission

bash
# 1. Open the form definition (by URL or ID) — returns the schema the viewer renders.
FORM=$(curl "https://<tenant>.s-launch.com/api/form/my-intake-form" \
  -H "Authorization: Bearer $TOKEN")
FORM_ID=$(echo $FORM | jq -r '.id')

# 2. (Optional) Upload any file attachments referenced by the form.
curl -X POST "https://<tenant>.s-launch.com/api/form/$FORM_ID/upload" \
  -H "Authorization: Bearer $TOKEN" \
  -F "file=@./brief.pdf"

# 3. Submit the form's structured payload.
SUBMISSION=$(curl -X POST "https://<tenant>.s-launch.com/api/form/$FORM_ID" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"answers":{"name":"Alice","email":"alice@example.com"}}')

# 4. Inspect the submission record.
SUBMISSION_ID=$(echo $SUBMISSION | jq -r '.id')
curl "https://<tenant>.s-launch.com/api/form/history/$SUBMISSION_ID" \
  -H "Authorization: Bearer $TOKEN"

The exact submission body shape is governed by FormSubmissionWriteCreate; the response by FormSubmissionRead.

See also

S-Launch