Browse and search developers

Questions

Update a question

Changes a question’s text, type, settings, options or position.

On this page
  1. Parameters
  2. Request body
  3. Response
  4. Errors
PATCH/v1/forms/{formId}/questions/{questionId}Scope: forms:write
curl -X PATCH "https://api.formitai.com/v1/forms/FORM_ID/questions/QUESTION_ID" \
  -H "Authorization: Bearer $FORMIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "type": "text",
  "title": "How did we do?",
  "description": "string",
  "required": true,
  "position": 0,
  "settings": {},
  "options": [
    {
      "text": "Yes",
      "value": "yes"
    }
  ]
}'

Parameters

Path

  • formIdstringRequired
  • questionIdstringRequired

Request body

  • typestring

    Block type id. List them with GET /v1/block-types.

    1–64 characters

  • titlestring

    1–500 characters

  • descriptionstring

    max 1000 characters

  • requiredboolean
  • positioninteger

    Zero-based. Defaults to the end of the form.

    0–…

  • settingsobject (map)

    Block settings; see the block type schema.

  • optionsarray of object

    Choices for choice blocks.

    max 100 items

    • textstringRequired

      1–200 characters

    • valuestringRequired

      1–100 characters

Response 200

  • idstringRequired
  • namestringRequired
  • descriptionstring or nullRequired
  • publishedbooleanRequired
  • responseCountintegerRequired
  • createdAtstringRequired

    ISO 8601 timestamp

  • updatedAtstringRequired

    ISO 8601 timestamp

  • questionsarray of objectRequired
    • idstringRequired
    • typestringRequired

      Block type id, e.g. short_text, email, multiple_choice.

    • titlestringRequired
    • descriptionstring or nullRequired
    • requiredbooleanRequired
    • positionintegerRequired
    • settingsobject (map)Required
    • optionsarray of objectRequired
      • textstringRequired
      • valuestringRequired
Example response
{
  "id": "item_id",
  "name": "Customer feedback",
  "description": "string",
  "published": true,
  "responseCount": 1,
  "createdAt": "2026-11-25T09:30:00.000Z",
  "updatedAt": "2026-11-25T09:30:00.000Z",
  "questions": [
    {
      "id": "item_id",
      "type": "text",
      "title": "How did we do?",
      "description": "string",
      "required": true,
      "position": 1,
      "settings": {},
      "options": [
        {
          "text": "Yes",
          "value": "yes"
        }
      ]
    }
  ]
}

Errors

  • 400Invalid request: validation_failed with field details, or malformed JSON.
  • 401Missing or invalid API key.
  • 403The key lacks the scope, or its creator lacks the workspace permission.
  • 404Not found in this key’s workspace.
  • 429Rate limit exceeded. Wait for Retry-After seconds.

Ready?

Build your first AI form in minutes.

No credit card. Generate from a prompt, enable follow-ups, and publish a link or embed the same day.