typeform-python-sdk icon indicating copy to clipboard operation
typeform-python-sdk copied to clipboard

Can't update form using patch

Open shawnCaza opened this issue 2 years ago • 1 comments

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.

shawnCaza avatar Aug 08 '22 19:08 shawnCaza

According to API reference you should use list as data payload: forms.update('form-id', [{"op": "replace", "path": "/title", "value": "foo"}], patch=True)

Incred avatar Feb 14 '23 15:02 Incred