typeform-python-sdk
typeform-python-sdk copied to clipboard
Can't update form using patch
Following the docs, I can't get the following to work:
forms = Typeform('<api_key>').forms
result: str = forms.update('abc123', { 'title': 'Hello World, Again' }, patch=True)
I get a 'The payload is invalid.' error telling me it should be an array in body.
Without setting patch to true I did get a successful update.
According to API reference you should use list as data payload:
forms.update('form-id', [{"op": "replace", "path": "/title", "value": "foo"}], patch=True)