Answered

How do I prevent Typeform forms API from returning forms that haven't been published

  • 23 June 2023
  • 4 replies
  • 73 views

I’m using the forms API `https://api.typeform.com/forms` to retrieve all forms, surveys, polls etc created via Typeform dashboard and display it to my users. But the forms API returns both forms that have been published and forms that have not been published. As a result, users of my application see all forms including forms that have NOT been approved to be published.

How do I prevent this from happening and only allow users see forms that have been published using the Typeform API: `https://api.typeform.com/forms`

icon

Best answer by mathio 26 June 2023, 10:30

View original

4 replies

Userlevel 7
Badge +5

Hi @eaudu Thanks for stopping by the community! I don’t believe we have a way to prevent non-published forms from returning, but @mathio correct me if I’m wrong!

Userlevel 7
Badge +5

Hello @eaudu 

each form has a boolean property that indicates if the form has been published:

"settings": {
"is_public": false,
},

You can filter your typeforms based on this property. I dont think there is another way.

Thanks @mathio . It would be really helpful if Typeform updates their documentation as the response for the retrieve forms endpoint here doesn’t include:

"settings": {
"is_public": false,
},

in it’s response schema

Userlevel 7
Badge +5

We have just updated the docs 👍

Reply