Create a form
POST
/shops/{shop_id}/formsAuthorization
AuthorizationBearer token (JWT) · headerrequiredPath parameters
shop_idintegerrequiredRequest body
requiredapplication/jsontitlestringrequiredbodystringIntro text shown above the form fields
slugstringdescriptionstringvisiblebooleandefault: true
formatstringdefault: "html"
Allowed:
htmlmarkdownhas_address_fieldsbooleandefault: false
success_messagestringResponses
201Form created
_linksHalLinksidintegershop_idintegertitlestringslugstringbodystringdescriptionstringvisiblebooleanformatstringhas_address_fieldsbooleansuccess_messagestringcreated_onstring<date-time>updated_onstring<date-time>422Validation error
Request
curl -X POST "https://api.onbolder.com/v2/shops/1/forms" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "Contact Us",
"has_address_fields": false
}'const response = await fetch("https://api.onbolder.com/v2/shops/1/forms", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"title": "Contact Us",
"has_address_fields": false
})
});import requests
response = requests.post(
"https://api.onbolder.com/v2/shops/1/forms",
headers={
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
json={
"title": "Contact Us",
"has_address_fields": False
},
)Response
{
"_links": {
"property1": {
"href": "string",
"templated": true,
"method": "get",
"title": "string",
"type": "string"
},
"property2": {
"href": "string",
"templated": true,
"method": "get",
"title": "string",
"type": "string"
}
},
"id": 0,
"shop_id": 0,
"title": "string",
"slug": "string",
"body": "string",
"description": "string",
"visible": true,
"format": "string",
"has_address_fields": true,
"success_message": "string",
"created_on": "2019-08-24T14:15:22Z",
"updated_on": "2019-08-24T14:15:22Z"
}Validation error