Give your software APIs for asking people.
Create hosted requests for input, files, approvals, reviews, or human tasks. Fangst returns a URL for the person and sends the structured result back through the API or a signed webhook.
Authenticate with a Bearer token.
Every management endpoint requires
Authorization: Bearer <FANGST_API_TOKEN>. Keep the
token in your software or agent tool configuration. Do not put it
in the hosted URL you give to the respondent.
Set the base URL and token for your Fangst service. The local values below match the repository setup.
export FANGST_BASE_URL=http://127.0.0.1:8787
export FANGST_API_TOKEN=dev-api-token
Create the hosted request.
This request asks for a damage description, photos and a date. The idempotency key makes a safe retry return the original response.
curl --fail --silent --show-error \
-X POST \
-H "Authorization: Bearer ${FANGST_API_TOKEN}" \
-H 'Idempotency-Key: claim-clm_92831-intake-v1' \
-H 'Content-Type: application/json' \
"${FANGST_BASE_URL}/v1/requests" \
--data '{
"title": "Damage report",
"sender": "Example Insurance",
"one_shot": true,
"metadata": {"claim_id": "clm_92831"},
"fields": [
{"key": "description", "type": "textarea", "required": true},
{"key": "photos", "type": "files", "required": true},
{"key": "date", "type": "date"}
],
"webhook": {
"url": "https://example.com/fangst",
"secret": "replace-me"
}
}'
Give the returned URL to the person.
The response contains the request id, its status, the hosted URL
and the metadata you supplied. Your software or agent sends
request.hosted_url through its own email, chat or other
available channel.
The person opens that URL, fills in the fields and uploads the files. A respondent does not need a Fangst account.
{
"request": {
"id": "req_123",
"status": "open",
"title": "Damage report",
"hosted_url": "http://127.0.0.1:8787/f/…",
"metadata": {"claim_id": "clm_92831"}
}
}
Read the submission or receive the webhook.
Poll GET /v1/requests/:id/submissions to list accepted
submissions. When a request has a webhook, Fangst also sends
submission.completed after the submission and its files
have been stored. A webhook requires its signing secret.
Webhook requests include X-Fangst-Delivery-Id,
X-Fangst-Timestamp and X-Fangst-Signature.
The signature is HMAC-SHA256 over
<timestamp>.<exact body>. Delivery retries are recorded,
and a terminal failure can be replayed.
Input and file request endpoints.
Create hosted forms and file requests, read their responses, and inspect or replay webhook delivery. The machine-readable request contract is available as OpenAPI 3.1.
POST/v1/requestsCreate a hosted Request.GET/v1/requests/:idRead the Request and its hosted URL.POST/v1/requests/:id/disableClose the Request.GET/v1/requests/:id/submissionsList its Submissions.GET/v1/submissions/:idRead a Submission.DELETE/v1/submissions/:idDelete a Submission and its uploaded files from active storage.GET/v1/attachments/:id/contentDownload attachment bytes with the Bearer token.GET/v1/deliveries/:idRead Delivery status and immutable attempts.POST/v1/deliveries/:id/replayRequeue a terminally failed Delivery.Approval, review, and human-task endpoints.
Each interaction has its own resource and structured result. AI agents can call these HTTP endpoints directly or use the Fangst MCP tools.
POST/v1/approvalsCreate an approval and receive its hosted URL.GET/v1/approvals/:idRead its decision and receipt.POST/v1/approvals/:id/disableClose an approval link.POST/v1/reviewsCreate a review with existing or generated values.GET/v1/reviews/:idRead the confirmed or corrected values.POST/v1/tasksCreate a hosted human task.GET/v1/tasks/:idRead completion, findings, and evidence.Ask the person. Continue with the result.
Use Fangst from your application or give an authorized AI agent access to the APIs it needs.