This method submits data to a form. This method does not honor any validation or default values configured for a field – these checks will need to be performed before sending the data via the API.

The form must be configured to store submissions in the database. An error will be returned if the maximum number of submissions for the account has been reached.

Add a new submission to the specified form

POST /api/v1/submit HTTP/1.1
Host: www.formstack.com

api_key=[[app:key]]&id=111&field_1001=John&field_1002=Smith
curl -X POST -i -d "api_key=[[app:key]]&id=111&field_1001=John&field_1002=Smith" https://www.formstack.com/api/v1/submit

field_x

For this parameter, x must contain the id of the field whose value should be set. For fields with subfields (name, address, etc), use array notation with each item being the subfield and each key being the name of that subfield.

POST /api/v1/submit
Host: formstack.com

api_key=[[app:api_key]]&id=12345&field_12345%5Bfirst%5D=John&field_12345%5Blast%5D=Smith
curl -X POST -i -d "api_key=[[app:api_key]]&id=12345&field_12345%5Bfirst%5D=John&field_12345%5Blast%5D=Smith" https://formstack.com/api/v1/submit

Subfields

For fields that have multiple sub-fields, we store them raw as one field, separated by a key and return character.

first = John\n
last = Smith
street = 1234 Test Drive\n
street2 = Apt 1234\n
city = Test\n
state = IN\n
zip = 12345\n
country = US

File Uploads

Files can be uploaded via the API in a similar way text values are passed, except that file contents must be base64 encoded before transfer. You can also optionally specify the filename to use by prepending it to the data along with a semicolon.

POST /api/v1/submit HTTP/1.1
Host: formstack.com

api_key=[[app:api_key]]&id=111&field_1001=hello.txt;SGVsbG8hIFRoYW5rcyBmb3IgdXNpbmcgdGhlIEZvcm1TcHJpbmcgQVBJLg==
curl -X POST -i -d "api_key=[[app:api_key]]&id=111&field_1001=hello.txt;SGVsbG8hIFRoYW5rcyBmb3IgdXNpbmcgdGhlIEZvcm1TcHJpbmcgQVBJLg==" https://formstack.com/api/v1/submit
Language
Click Try It! to start a request and see the response here!