v1

latestOpenAPI 3.0.3AGPL-3.0-or-later2026-07-172717248.3 KB
api

Add a new option to a question

Returns a DataResponse containing the added options This endpoint allows CORS requests

post/ocs/v2.php/apps/forms/api/v3/forms/{formId}/questions/{questionId}/options

Path parameters

formIdinteger required

id of the form

questionIdinteger required

id of the question

Headers

OCS-APIRequestboolean required

Required to be true for the API request to pass

Request body

optionTextsstring[] required

the new option text

optionTypestring nullable

the new option type (e.g. 'row'), defaults to 'choice'

Response

the created option