{"_id":"553594c963cc650d00312931","category":{"_id":"553591cd63cc650d00312927","pages":["553591ce63cc650d00312928","553594c963cc650d00312931","5535985e63cc650d00312936","55365baa86514f0d00bc2f96","5536daf0a519b10d001f7df8","5536db65c16ee70d007568a8","5536dc26c16ee70d007568ac","5536de1453b6430d0042dfeb","5536e535bbb4a70d00a53529","553ab2a336d0100d004b35b1","554172c94841af0d00b4234f"],"version":"553591cd63cc650d00312925","__v":11,"project":"55357364e02d480d0003c6d3","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-04-20T23:52:42.707Z","from_sync":false,"order":1,"slug":"formz","title":"Formz"},"project":"55357364e02d480d0003c6d3","__v":2,"editedParams":true,"user":"55356ede6040a20d00454508","editedParams2":true,"version":{"_id":"553591cd63cc650d00312925","project":"55357364e02d480d0003c6d3","__v":13,"forked_from":"55357365e02d480d0003c6d6","createdAt":"2015-04-20T23:54:53.134Z","releaseDate":"2015-04-20T23:54:53.134Z","categories":["553591cd63cc650d00312926","553591cd63cc650d00312927","5536e4d39f7f2d0d00b1cd54","5536e55c20d5ca0d0001580a","5536e6bf7fe60f0d000fd1c0","5536f5bba171250d00c00556","553a974369c2630d00a8562e","553a97c60074c80d00621c2a","553a98332af5f20d000fc32a","553a9b9869c2630d00a85642","556e0f23d02e0b190042f13d","563249b1dcc27a1700823650","5639113f049e420d00476b03","59a5dd94aaa11d003334edb4"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"2.0.0","version":"2"},"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-04-21T00:07:37.804Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"settings":"","examples":{"codes":[{"code":"{\n  \"name\": \"Test Form\",\n  \"overrideDefaultFormName\": true,  /* See Default Form Name below for more detail */\n  \"assignment\": { /* See Assigning a Form section below for more detail */\n    \"id\": \"c2759dfe-ecff-49d2-b79f-71314193bf85\", \n    \"type\": \"User\"\n  },\n  \"templateId\": \"02692b82-acca-42a1-8935-d22f26715bac\",\n  \"fields\": { /* Field info: http://developers.goformz.com/docs/form-field-reference  */\n    \"Reported Problem\": {\n      \"text\": \"this is a problem\"\n    },\n    \"Total Cost\": {\n      \"text\": \"$17,976.83\"\n    },\n    \"PO #\": {\n      \"value\": \"2345\"\n    },\n    \"Tax Rate\": {\n      \"value\": \".09\"\n    },\n    \"Discount\": {\n      \"text\": \"$5,497.50\"\n    }\n  }\n}","language":"json","name":null}]},"method":"post","results":{"codes":[{"name":"","code":"{\n  \"id\": \"f532d7e5-6861-488a-bdee-a4df0173899e\",\n  \"url\": \"http://api.goformz.com/v2/formz/f532d7e5-6861-488a-bdee-a4df0173899e\"\n}","language":"json","status":201}]},"auth":"required","params":[{"_id":"5535951163cc650d00312933","ref":"","in":"body","required":true,"desc":"Basic details about how to create the form.","default":"","type":"object","name":"body"}],"url":"/formz"},"isReference":false,"order":1,"body":"The `Content-Type` header in the HTTP request headers should be set to `application/json`.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Content-Type: application/json;\",\n      \"language\": \"http\"\n    }\n  ]\n}\n[/block]\nIf successful, the server will respond with a HTTP Status Code of 201 (Created).\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Default Form Name\"\n}\n[/block]\nGoFormz form names are automatically set by rules defined during template setup.\n(For more information see: http://support.goformz.com/customer/en/portal/articles/2490138-setting-the-default-form-name)\n\nThe \"overrideDefaultFormName\" property allows an API user to override the automatic form name functionality. This property is optional and defaults to \"false\".\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Assigning a Form\"\n}\n[/block]\nCurrently assignment via the API can only be done upon form creation.  The form contains a property named “assignment”,  the value of this property is an object.  Formz can be assigned to either a User or a Group.  When assigning a form, two properties must be set on the assignment object, `type` and `id`.\n\n**Type property permissible values:**\n- User\n- Group\n\n**Id property**\nIf the Type is a User then the Id property refers to the Id of the User Resource,  If the Type is a Group, then the Id property refers to the Id of the Group Resource.\n\nSample Assignment: \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"\\\"assignment\\\": {\\n    \\\"id\\\": \\\"7f4b9467-7cd1-4e06-846e-fe3f9d8b2986\\\",\\n    \\\"type\\\": \\\"User\\\"\\n  }\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n</br><a href=\"https://api.goformz.com/docs/api/explorer/index#!/Formz/Formz_Post\" target=\"_blank\"><img src=\"https://files.readme.io/9Z82WIZnS7mZmco8oi4u_TryItNow3.png\" style=\"margin-left:15px\" width=\"128\" height=\"42\" ></a>","excerpt":"","slug":"create-a-form","type":"endpoint","title":"Create a Form"}

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

body:
required
object
Basic details about how to create the form.

Examples


Result Format


Documentation

The `Content-Type` header in the HTTP request headers should be set to `application/json`. [block:code] { "codes": [ { "code": "Content-Type: application/json;", "language": "http" } ] } [/block] If successful, the server will respond with a HTTP Status Code of 201 (Created). [block:api-header] { "type": "basic", "title": "Default Form Name" } [/block] GoFormz form names are automatically set by rules defined during template setup. (For more information see: http://support.goformz.com/customer/en/portal/articles/2490138-setting-the-default-form-name) The "overrideDefaultFormName" property allows an API user to override the automatic form name functionality. This property is optional and defaults to "false". [block:api-header] { "type": "basic", "title": "Assigning a Form" } [/block] Currently assignment via the API can only be done upon form creation. The form contains a property named “assignment”, the value of this property is an object. Formz can be assigned to either a User or a Group. When assigning a form, two properties must be set on the assignment object, `type` and `id`. **Type property permissible values:** - User - Group **Id property** If the Type is a User then the Id property refers to the Id of the User Resource, If the Type is a Group, then the Id property refers to the Id of the Group Resource. Sample Assignment: [block:code] { "codes": [ { "code": "\"assignment\": {\n \"id\": \"7f4b9467-7cd1-4e06-846e-fe3f9d8b2986\",\n \"type\": \"User\"\n }", "language": "json" } ] } [/block] </br><a href="https://api.goformz.com/docs/api/explorer/index#!/Formz/Formz_Post" target="_blank"><img src="https://files.readme.io/9Z82WIZnS7mZmco8oi4u_TryItNow3.png" style="margin-left:15px" width="128" height="42" ></a>