Dokki API logo
POST
/api/v1/resources/{resource_id}/form

Create form

POST /api/v1/resources/{resource_id}/form

Create a collection form for a table, or update its existing form.

Endpoint

  • Method: POST

  • Path: /api/v1/resources/{resource_id}/form

  • Required scope: form:write

  • Base URL: https://dokki.one

Request body

  • config — optional object with title, optional description, and fields. Each field uses columnId, optional label and description, plus enabled and required.

  • is_active — optional boolean. isActive is also accepted.

  • rotate_webhook_token — optional boolean. rotateWebhookToken is also accepted.

The resource must be a table. Creating or changing a form requires current write and manage access to that table. A new form is inactive unless is_active is set.

Request example

curl -X POST "https://dokki.one/api/v1/resources/$TABLE_RESOURCE_ID/form" \
  -H "Authorization: Bearer $DOKKI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "is_active": true,
    "config": {
      "title": "Request intake",
      "fields": [
        { "columnId": "requester", "label": "Your name", "enabled": true, "required": true }
      ]
    }
  }'

Response

Returns 201 when it creates a form and 200 when it updates one. The response contains resource, access, and the form record, including the sensitive public-form and webhook tokens. Store those tokens only in a secure server-side secret store.

Errors

  • 400 — resource is not a table or a supplied field has an invalid type.

  • 401 — missing or invalid API key.

  • 403 — API key lacks form:write, write access, or manage access.

  • 404 — resource is unavailable to the caller.