{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/v2/form.json","auth":"required","basic_auth":false,"examples":{"codes":[]},"params":[{"name":"name","type":"string","default":"","desc":"The form name","required":true,"in":"body","ref":"","_id":"543470f45b10711400c6c1ed"},{"name":"db","type":"boolean","default":"1","desc":"Flag to disable or enable submissions to be saved in our database","required":false,"in":"body","ref":"","_id":"543470f45b10711400c6c1ec"},{"name":"template","type":"string","default":"","desc":"Template ID for the template you want to use","required":false,"in":"body","ref":"","_id":"543470f45b10711400c6c1eb"},{"name":"num_columns","type":"int","default":"","desc":"Number (1-4) of columns the form layout will have","required":false,"in":"body","ref":"","_id":"543470f45b10711400c6c1ea"},{"name":"label_position","type":"string","default":"top","desc":"Sets the default field label position. Possible values are: \"top\" or \"left\"","required":false,"in":"body","ref":"","_id":"543470f45b10711400c6c1e9"},{"name":"submit_button_title","type":"string","default":"Submit Form","desc":"Sets the submit button title","required":false,"in":"body","ref":"","_id":"543470f45b10711400c6c1e8"},{"name":"password","type":"string","default":"","desc":"Sets a password for the form","required":false,"in":"body","ref":"","_id":"543470f45b10711400c6c1e7"},{"name":"use_ssl","type":"boolean","default":"0","desc":"Flag to disable or enable SSL (only available on accounts that have security features)","required":false,"in":"body","ref":"","_id":"543470f45b10711400c6c1e6"},{"name":"timezone","type":"string","default":"US/Eastern","desc":"Sets the timezone for the form","required":false,"in":"body","ref":"","_id":"543471a85b10711400c6c1fe"},{"name":"language","type":"string","default":"en","desc":"Sets the language for the form - use ISO 639-1 language codes","required":false,"in":"body","ref":"","_id":"543471a85b10711400c6c1fd"},{"name":"active","type":"boolean","default":"1","desc":"Flag to make the form active/inactive","required":false,"in":"body","ref":"","_id":"543471a85b10711400c6c1fc"},{"name":"disabled_message","type":"string","default":"","desc":"The message to show when the form is inactive","required":false,"in":"body","ref":"","_id":"543471a85b10711400c6c1fb"},{"name":"fields","type":"array_mixed","default":"","desc":"Array of Field resources","required":false,"in":"body","ref":"","_id":"543471a85b10711400c6c1fa"},{"name":"notifications","type":"array_mixed","default":"","desc":"Array of Notification Email resources","required":false,"in":"body","ref":"","_id":"543471a85b10711400c6c1f9"},{"name":"confirmation","type":"array_mixed","default":"","desc":"Array of Confirmation Email resources","required":false,"in":"body","ref":"","_id":"543471a85b10711400c6c1f8"},{"name":"webhooks","type":"string","default":"","desc":"Array of Webhook resources","required":false,"in":"body","ref":"","_id":"543471a85b10711400c6c1f7"}],"results":{"codes":[{"status":201,"name":"Success","code":"{\n  \"id\": \"12345\",\n  \"fields\": {\n    235232,\n    2355233\n  },\n  \"notifications\": {\n    153235\n  }\n}","language":"json"},{"name":"Forbidden action","status":403,"language":"json","code":"{\n  \"status\": \"error\",\n  \"error\": \"The action was forbidden by form permissions\"\n}"},{"language":"json","code":"{\n  \"status\": \"error\",\n  \"error\": \"A form name was not specified\"\n}","name":"Name argument missing","status":400},{"code":"{\n  \"status\": \"error\",\n  \"error\": \"The account has reached its maximum number of forms.\"\n}","name":"Maxiumum form limit reached","status":400,"language":"json"},{"status":500,"language":"json","code":"{\n  \"status\": \"error\",\n  \"error\": \"Could not create form: Error specific message\"\n}","name":"Error creating form"},{"language":"json","code":"{\n  \"status\": \"error\",\n  \"error\": \"Could not save the access rights: Error specific message\"\n}","name":"Error saving form access","status":500}]},"settings":"5e2b1ec0f26a2c00510363e5","try":false,"method":"post"},"next":{"description":"","pages":[]},"title":"/form","type":"endpoint","slug":"form-post","excerpt":"Create a new form in your account","body":"Create a new form in your account\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"POST /api/v2/form.json HTTP/1.1\\nHost: www.formstack.com\\nAuthorization: Bearer [[app:oauth_token]]\\nAccept: application/json\\nContent-Type: application/json\\n\\nname=Test%20Form&submit_button_title=Save%20Form&use_ssl=1\",\n      \"language\": \"http\"\n    },\n    {\n      \"code\": \"curl -X POST -i -H \\\"Accept: application/json\\\" -H \\\"Content-Type: application/json\\\" -H \\\"Authorization: Bearer [[app:oauth_token]]\\\" -d \\\"name=Test%20Form&submit_button_title=Save%20Form&use_ssl=1\\\" https://www.formstack.com/api/v2/form.json\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]","updates":[],"order":7,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"543470f45b10711400c6c1e5","githubsync":"","is_link":false,"project":"543469460ef9c00800164f0e","version":{"version":"2.0","version_clean":"2.0.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["54346a2b0ef9c00800164f29","543473445b10711400c6c21a","543473500ef9c00800164fde","54347c625b10711400c6c301","5434918d0ef9c008001651ff","5434b72c008ec22200d86ae7","5435990c495d5d0800f3a510","5b6af3dffc81e4000383db74"],"_id":"54346a2a0ef9c00800164f28","releaseDate":"2014-10-07T22:33:14.982Z","createdAt":"2014-10-07T22:33:14.982Z","forked_from":"543469460ef9c00800164f11","project":"543469460ef9c00800164f0e","__v":8},"createdAt":"2014-10-07T23:02:12.435Z","editedParams":true,"__v":2,"category":{"sync":{"isSync":false,"url":""},"pages":["5435626c5ff8a51a006e4110","543553953513400800a14736","543555cc3513400800a14752","54355bcc35740020002a1b3b","5434928b0ef9c0080016520e","54347c8e5b10711400c6c30a","54346f750ef9c00800164fa0","543470f45b10711400c6c1e5","543477b70ef9c0080016505b","543478fb5b10711400c6c29f","54347d105b10711400c6c318","54347df00ef9c008001650d2","54347edf5b10711400c6c336","54357a175e1b2020004380dc","543483520ef9c0080016512a","543484820ef9c0080016513a","5434887e5b10711400c6c3cd","543488c05b10711400c6c3d2","54348ac85b10711400c6c401","5434959c0ef9c0080016522d","543497030ef9c00800165244","543498ae5b10711400c6c4f6","54349b7f0ef9c00800165293","54349c070ef9c00800165298","54349dbf0ef9c008001652ad","5434ab8e0ef9c00800165384","5434abbb0ef9c0080016538f","5434ac495b10711400c6c626","5434ada40ef9c008001653a8","5434af0a0ef9c008001653bc","5434af5f0ef9c008001653c8","5434b00a5b10711400c6c66b","5434b0d15b10711400c6c68c","5434b1ee0ef9c00800165406","5434b26d0ef9c0080016541c","5434b3560ef9c00800165427","5434b3b40ef9c0080016545a","5434b49f008ec22200d86ab9","5434b51f008ec22200d86aca","5434b5a80ef9c0080016546f","5434b5f4008ec22200d86ad8","5434b676008ec22200d86add","5434b6e6008ec22200d86ae5"],"title":"REST API","slug":"rest-api","order":1,"from_sync":false,"reference":false,"_id":"5434918d0ef9c008001651ff","version":"54346a2a0ef9c00800164f28","__v":30,"project":"543469460ef9c00800164f0e","createdAt":"2014-10-08T01:21:17.804Z"},"editedParams2":true,"parentDoc":null,"user":"543469060ef9c00800164f01"}

post/form

Create a new form in your account

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

name:
required
string
The form name
db:
boolean1
Flag to disable or enable submissions to be saved in our database
template:
string
Template ID for the template you want to use
num_columns:
integer
Number (1-4) of columns the form layout will have
label_position:
stringtop
Sets the default field label position. Possible values are: "top" or "left"
submit_button_title:
stringSubmit Form
Sets the submit button title
password:
string
Sets a password for the form
use_ssl:
boolean0
Flag to disable or enable SSL (only available on accounts that have security features)
timezone:
stringUS/Eastern
Sets the timezone for the form
language:
stringen
Sets the language for the form - use ISO 639-1 language codes
active:
boolean1
Flag to make the form active/inactive
disabled_message:
string
The message to show when the form is inactive
fields:
array of mixed
Array of Field resources
notifications:
array of mixed
Array of Notification Email resources
confirmation:
array of mixed
Array of Confirmation Email resources
webhooks:
string
Array of Webhook resources

Result Format


Documentation

Create a new form in your account [block:code] { "codes": [ { "code": "POST /api/v2/form.json HTTP/1.1\nHost: www.formstack.com\nAuthorization: Bearer [[app:oauth_token]]\nAccept: application/json\nContent-Type: application/json\n\nname=Test%20Form&submit_button_title=Save%20Form&use_ssl=1", "language": "http" }, { "code": "curl -X POST -i -H \"Accept: application/json\" -H \"Content-Type: application/json\" -H \"Authorization: Bearer [[app:oauth_token]]\" -d \"name=Test%20Form&submit_button_title=Save%20Form&use_ssl=1\" https://www.formstack.com/api/v2/form.json", "language": "shell" } ] } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}