How do I prevent Typeform forms API from returning forms that haven't been published | Community
Skip to main content
Answered

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


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`

Best answer by mathio-tf

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.

View original

4 replies

Liz
Community Team
Forum|alt.badge.img+5
  • Tech Community Advocate
  • 15018 replies
  • June 23, 2023

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!


mathio-tf
Typeform
Forum|alt.badge.img+5
  • Typeform
  • 888 replies
  • Answer
  • June 26, 2023

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.


  • Author
  • Explorer
  • 3 replies
  • June 29, 2023

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


mathio-tf
Typeform
Forum|alt.badge.img+5
  • Typeform
  • 888 replies
  • July 4, 2023

We have just updated the docs 👍


Reply