Skip to content
This repository has been archived by the owner on Jul 3, 2023. It is now read-only.

Can't update form using patch #25

Open
shawnCaza opened this issue Aug 8, 2022 · 1 comment
Open

Can't update form using patch #25

shawnCaza opened this issue Aug 8, 2022 · 1 comment

Comments

@shawnCaza
Copy link
Contributor

shawnCaza commented Aug 8, 2022

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.

@Incred
Copy link

Incred commented Feb 14, 2023

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants