-
amirostalAsked on May 8, 2025 at 4:31 AM
I managed to create a form using the API with python, but cannot manage to add questions.
I have double-checked my form ID and my API key, and that my API key has full access permissions.
This is my code:import requests
form_id = "MY_FORM_ID" # Using my actual Form ID
api_key = "MY_API_KEY" # Using my actual API key
url = f"https://api.jotform.com/form/{form_id}/questions?apiKey={api_key}"
new_question = {
"questions": [
{
"type": "control_textbox",
"text": "What is your favorite color?",
"order": 1,
"name": "favoriteColor"
}
]
}
response = requests.post(url, json=new_question)
print(response.json())
And this is the response I get:
{'responseCode': 400, 'message': 'Question not created!', 'content': '', 'duration': '171.25ms', 'info': 'https://api.jotform.com/docs#form-id-questions'}
Thank you! -
Jovito JotForm SupportReplied on May 8, 2025 at 7:23 AM
Hi Amir,
Thanks for reaching out to Jotform Support. It seems that you are creating questions using Python. You can reach out to our dedicated team so they can assist you better on how to achieve your requirement. You can fill out this form and one of our support team will reach out to you.
Let us know if you have any other questions.