I am currently adding integrations for different typeform events (triggers & actions) to our platform. I am unable to find the correct API syntax for the event - “Update Dropdown, Multiple Choice or Ranking Question Options”
I am trying to update the options of a multi-choice question via API. Here is the Api details and error message i am getting:
API Endpoint - https://api.typeform.com/forms/:formId
Method - PATCH
Body used -
g
{
"op": "replace",
"path": "/fields",
"value":
{
"id": "Multichoice_Question/Field_id",
"properties":{
"choices":
{ "label": "Red" },
{ "label": "Green" },
{ "label": "Blue" }
]
}
}
]
}
]
error message -
{
"code": "VALIDATION_ERROR",
"description": "The payload is invalid.",
"details":
{
"code": "NOT_ALLOWED_VALUE",
"description": "should be equal to one of the allowed values",
"field": "/0/path",
"in": "body"
}
]
}
How should the body be defined for this API?
I can see that api doc defines certain fixed values which "path" can take. But then how are we supposed to update a multi-choice questions' options using this API?