Create KoboToolbox Form
kobo_create_formCreate a survey form from a flat question list, including sections, skip logic, and local validation, then deploy it to start collecting submissions.
Instructions
Create a new form (survey) from a list of questions, and optionally deploy it immediately so it can start collecting submissions.
The question list is FLAT: sections and repeats are expressed with begin_group/end_group and begin_repeat/end_repeat rows, which must be balanced.
Args:
name (string): form/project title
description (string, optional): short description
questions (array): ordered list of questions. Each has:
type: see the type enum. Use 'phonenumber' (NOT 'phone_number') for a phone field.
name: internal field name, unique across the whole form
label: question text (string, or {language: text} for a multilingual form)
required, hint, choices, relevant, constraint, constraint_message, calculation, default, appearance, read_only, parameters
deploy (boolean, default true): deploy immediately vs. leave as draft
Returns: the new form's uid, deployment status, and — once deployed — the public collect links.
Examples:
Sections and skip logic: questions=[ {type:"begin_group",name:"identification",label:"Identification",appearance:"field-list"}, {type:"text",name:"nom",label:"Nom de l'établissement",required:true}, {type:"select_one",name:"categorie",label:"Catégorie",choices:[{name:"maquis",label:"Maquis"},{name:"autre",label:"Autre"}]}, {type:"text",name:"categorie_autre",label:"Précisez",relevant:"${categorie} = 'autre'"}, {type:"integer",name:"annee",label:"Année",constraint:". >= 1950 and . <= 2030",constraint_message:"Année invalide"}, {type:"end_group",name:"identification"} ]
Repeating data: begin_repeat "plats" ... end_repeat, one row per dish.
Don't use when: you want to change an existing form (use kobo_patch_form for a targeted edit, kobo_update_form to replace everything)
Error Handling:
The question list is validated locally first: unknown types, duplicate names, unbalanced groups, selects without choices and bad choice codes are reported precisely, before any request reaches Kobo.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Title of the form/project (e.g. 'Suivi des parcelles de cacao') | |
| deploy | No | If true, immediately deploy the form so it can start collecting submissions | |
| questions | Yes | Ordered, flat list of questions. Nesting is expressed with begin_group/end_group and begin_repeat/end_repeat rows, which must be balanced. | |
| description | No | Optional short description of the form's purpose |