HydraCore
API by router

Platform forms public

Get Form Public

Get form definition + any existing draft for the token's respondent.

This is what the form renderer calls on load. Returns form config (fields, settings) + draft answers if resuming.

GET
/v1/public/forms/{form_slug}

Path Parameters

form_slugForm Slug

Response Body

curl -X GET "https://loading/v1/public/forms/string"
null
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Save Draft

Save partial form progress (auto-save on field completion).

Workers on mobile get interrupted — this lets them resume from the same link.

PATCH
/v1/public/forms/{form_slug}/draft

Path Parameters

form_slugForm Slug
answersAnswers

Empty Object

current_field_index?Current Field Index
Default0

Response Body

curl -X PATCH "https://loading/v1/public/forms/string/draft" \  -H "Content-Type: application/json" \  -d '{    "answers": {}  }'
null
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Submit Form

Submit a completed form. Creates an entity record if linked to a definition.

Idempotent: concurrent submits are serialised via FOR UPDATE row lock. Already-completed submissions return the existing result.

POST
/v1/public/forms/{form_slug}/submit

Path Parameters

form_slugForm Slug
answersAnswers

Empty Object

Response Body

curl -X POST "https://loading/v1/public/forms/string/submit" \  -H "Content-Type: application/json" \  -d '{    "answers": {}  }'
null
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Get Upload Url

Get a presigned R2 upload URL for a file/photo form field.

Client uploads directly to R2 via PUT to the returned URL. The media_id is stored in the answers dict on draft save/submit.

POST
/v1/public/forms/{form_slug}/upload-url

Path Parameters

form_slugForm Slug
content_typeContent Type

MIME type of the file

field_idField Id

Form field ID requesting upload

Lengthlength <= 100
filenameFilename

Original filename

Lengthlength <= 255

Response Body

curl -X POST "https://loading/v1/public/forms/string/upload-url" \  -H "Content-Type: application/json" \  -d '{    "content_type": "string",    "field_id": "string",    "filename": "string"  }'
null
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}