POST Choice Values

Choice Field Values

Allows you to append new choice values to a choice field. This is the only POST operation possible within the Schema APIs and the only way to programmatically change the schema of the site. All other schema changes must be made via the front-end.

Params

NameParam TypeData TypeValues
fieldIdpathint2038
choiceValuesToAppendbodyArray[string]["Choice 3", "Choice 4"]

Request

POST {{host}}/api/rest/v4/schema/choicefieldvalues/{{fieldId}}
Authorization: {{auth}}
 
[
    "Choice 2",
    "Choice 3"
]

Response

Success

HTTP/1.1 200 OK
 

Error

HTTP/1.1 400 Bad Request
{
  "message": "Field with provided id is not of type Choice: 2204"
}