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}/formRequired scope:
form:writeBase URL:
https://dokki.one
Request body
config— optional object withtitle, optionaldescription, andfields. Each field usescolumnId, optionallabelanddescription, plusenabledandrequired.is_active— optional boolean.isActiveis also accepted.rotate_webhook_token— optional boolean.rotateWebhookTokenis 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 lacksform:write, write access, or manage access.404— resource is unavailable to the caller.
