Skip to navigation

Create Form

View as Markdown

Creates a form. Needs a key with Website Content: Read and Write (website-content:write).

FieldTypeRules
namestringRequired, max 180.
slugstringRequired on upsert, optional on create (generated from the name). Max 110, lowercase letters, digits and single dashes. It is part of the form’s public URL. A slug any form ever used, including a deleted one, returns 422 on create.
statusstringDraft (the default), Active or Paused. Only an Active form accepts submissions.
headingstring|nullMax 255.
message, thankyoustring|nullMax 2000.
submit_labelstring|nullMax 60.
redirect_urlstring|nullA URL to send the visitor to after submitting.
notify_emailsstring[]|nullUp to 20 addresses told about each submission.
notify_tribebooleanDefault false.
create_personbooleanDefault true: a submission creates or updates a contact.
fieldsarrayRequired on create and upsert, up to 100.
fields.*.keystringRequired, max 60, letters, digits, _ and -. Unique within the form.
fields.*.labelstringRequired, max 255.
fields.*.typestringRequired: short-text, long-text, number-text, switch-input, select-list, multi-select, rating, nps, date-input, email-input, phone-input or file-upload.
fields.*.helpstring|nullMax 500.
fields.*.placeholderstring|nullMax 255.
fields.*.requiredboolean
fields.*.optionsarrayFor select-list and multi-select: up to 200 {label, value} pairs.
fields.*.maxinteger2–10, the top of a rating scale.
fields.*.max_filesinteger1–10, for file-upload.
fields.*.maps_tostring|nullfirst_name, last_name, email or phone: the contact detail this field fills in.

If a form with the same slug already exists, this returns 422. Use Upsert Form when you do not know whether it exists.

Headers

GorillaDash-Api-KeystringOptional
Gorilla Dash API Key
GorillaDash-Api-SecretstringOptional
Gorilla Dash API Secret

Request

This endpoint expects an object.
slugstringRequired
namestringRequired
statusstringRequired
notify_emailslist of stringsRequired
fieldslist of objectsRequired

Response

Created
successboolean
statusinteger
dataobject

Errors

403
Forbidden Error