Skip to main content

Hey,

Seems like you can only change if a form is published or not through the /settings/is_public attribute on a form itself but I can’t find how to open/close a form from the PATCH /forms/{id} endpoint.

Inspecting the web UI, I can see that it’s doing its things using the PUT /forms/{id}/access-scheduling endpoint but this seems hidden from the public RESTful API.

Am I missing something? ¯\_(ツ)_/¯

Hello @holicamp , you should be able to use the PATCH request from Create API like this:

curl -X PATCH \
-H "Authorization:Bearer <YOUR-TYPEFORM-PERSONAL-TOKEN>" \
-H "Content-Type: application/json" \
-d ' {"op":"replace","path":"/settings/is_public","value":true}]' \
https://api.typeform.com/forms/<FORM-ID> \
-v

Make sure to use correct token and form ID values. Does this work for you?


Hey @mathio thanks for this but I don’t think I explained clearly what I wanted to do.

I knew is_public could be changed from the API. This is basically driving this button within the UI

When is_public is set to true:

When I visit the Typeform, I get a 200 HTTP response and I can access the Typeform no problem.

When is_public is set to false:

When I visit the Typeform, I get a 404 HTTP response and this means my user cannot even access the Typeform.

What I would like to be able to control is this instead:

When a Typeform is open, my users can use the Typeform as usual and I can keep collecting responses.
When a Typeform is closed, my users can see the Typeform is not accepting any more responses and a custom message can be displayed.

Hope this clarifies things for you.


I had this answer on Twitter

> Hi Clem 👋

> Sadly this is not possible at the moment.
> This endpoint is not yet documented, but hopefully soon 🤞

https://twitter.com/picsoung/status/1440117740400906242


It comes from @picsoung so you can definitely consider that official 👨🏼⚖️ 


Hi @picsoung,
is there any documentation or any news according to this request ?

Best regards


We should definitely be able to get the status of form if it is open or not and change it. I don’t understand why this simple feature is missing.


Hi, 

The last answer is 3 months ago, there’s any news about the possibility to publish a form using the API ?

Regards,


Alexis


Any updates about publishing a form using the API?

What about having an attribute into form response indicating the form is currently closed to responses?


Reply