Forms
Create Form
Create a new form; requires forms-write ability.
POST
/
open
/
forms
Copy
curl --request POST \
--url https://api.opnform.com/open/forms \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"workspace_id": 123,
"title": "<string>",
"visibility": "public",
"tags": [
"<string>"
],
"language": "<string>",
"custom_domain": "<string>",
"theme": "default",
"font_family": "<string>",
"color": "<string>",
"dark_mode": "light",
"width": "centered",
"size": "sm",
"border_radius": "none",
"layout_rtl": true,
"uppercase_labels": true,
"cover_picture": "<string>",
"logo_picture": "<string>",
"no_branding": true,
"transparent_background": true,
"submit_button_text": "<string>",
"submitted_text": "<string>",
"redirect_url": "<string>",
"re_fillable": true,
"re_fill_button_text": "<string>",
"confetti_on_submission": true,
"show_progress_bar": true,
"closes_at": "2023-11-07T05:31:56Z",
"closed_text": "<string>",
"max_submissions_count": 2,
"max_submissions_reached_text": "<string>",
"auto_save": true,
"auto_focus": true,
"enable_partial_submissions": true,
"editable_submissions": true,
"editable_submissions_button_text": "<string>",
"password": "<string>",
"use_captcha": true,
"captcha_provider": "recaptcha",
"can_be_indexed": true,
"seo_meta": {},
"custom_code": "<string>",
"database_fields_update": [
"<any>"
],
"properties": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "<string>",
"name": "<string>",
"help": "<string>",
"hidden": true,
"required": true,
"placeholder": "<string>",
"width": "full"
}
]
}'
Copy
{
"id": 123,
"slug": "<string>",
"title": "<string>",
"visibility": "public",
"tags": [
"<string>"
],
"language": "<string>",
"custom_domain": "<string>",
"theme": "default",
"font_family": "<string>",
"color": "<string>",
"dark_mode": "light",
"width": "centered",
"size": "sm",
"border_radius": "none",
"layout_rtl": true,
"uppercase_labels": true,
"cover_picture": "<string>",
"logo_picture": "<string>",
"no_branding": true,
"transparent_background": true,
"submit_button_text": "<string>",
"submitted_text": "<string>",
"redirect_url": "<string>",
"re_fillable": true,
"re_fill_button_text": "<string>",
"confetti_on_submission": true,
"show_progress_bar": true,
"closes_at": "2023-11-07T05:31:56Z",
"closed_text": "<string>",
"max_submissions_count": 2,
"max_submissions_reached_text": "<string>",
"auto_save": true,
"auto_focus": true,
"enable_partial_submissions": true,
"editable_submissions": true,
"editable_submissions_button_text": "<string>",
"password": "<string>",
"use_captcha": true,
"captcha_provider": "recaptcha",
"can_be_indexed": true,
"seo_meta": {},
"custom_code": "<string>",
"database_fields_update": [
"<any>"
],
"properties": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "<string>",
"name": "<string>",
"help": "<string>",
"hidden": true,
"required": true,
"placeholder": "<string>",
"width": "full"
}
]
}
Create Form
Create a new form within a workspace.
Authentication & Scope
Requires a Personal Access Token with the forms-write
ability.
Request
Copy
POST /open/forms HTTP/1.1
Host: api.opnform.com
Content-Type: application/json
Authorization: Bearer <token>
Body Parameters
Field | Type | Required | Description |
---|---|---|---|
workspace_id | number | Yes | ID of the workspace that will own the form. |
title | string | Yes | Human-readable title shown in the dashboard. |
visibility | string | Yes | One of public , draft , or closed . |
language | string | Yes | Two-letter ISO language code (e.g. en ). |
properties | array | Yes | Array of form blocks (see FormProperty schema). |
…other fields | mixed | No | See the Form schema for the full list of attributes. |
Example request:
Copy
{
"workspace_id": 1,
"title": "Event Registration",
"visibility": "public",
"language": "en",
"properties": [
{
"id": "field-1",
"type": "short_text",
"name": "First name",
"required": true
}
]
}
Response
201 Created
– Returns the full Form
object.
Copy
{
"id": 99,
"slug": "event-registration",
"title": "Event Registration",
"visibility": "public",
"properties": [...]
}
403 Forbidden
– The token does not include the forms-write
ability.
Authorizations
Personal Access Token
Body
application/json
Response
201
application/json
Form created
The response is of type object
.
Copy
curl --request POST \
--url https://api.opnform.com/open/forms \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"workspace_id": 123,
"title": "<string>",
"visibility": "public",
"tags": [
"<string>"
],
"language": "<string>",
"custom_domain": "<string>",
"theme": "default",
"font_family": "<string>",
"color": "<string>",
"dark_mode": "light",
"width": "centered",
"size": "sm",
"border_radius": "none",
"layout_rtl": true,
"uppercase_labels": true,
"cover_picture": "<string>",
"logo_picture": "<string>",
"no_branding": true,
"transparent_background": true,
"submit_button_text": "<string>",
"submitted_text": "<string>",
"redirect_url": "<string>",
"re_fillable": true,
"re_fill_button_text": "<string>",
"confetti_on_submission": true,
"show_progress_bar": true,
"closes_at": "2023-11-07T05:31:56Z",
"closed_text": "<string>",
"max_submissions_count": 2,
"max_submissions_reached_text": "<string>",
"auto_save": true,
"auto_focus": true,
"enable_partial_submissions": true,
"editable_submissions": true,
"editable_submissions_button_text": "<string>",
"password": "<string>",
"use_captcha": true,
"captcha_provider": "recaptcha",
"can_be_indexed": true,
"seo_meta": {},
"custom_code": "<string>",
"database_fields_update": [
"<any>"
],
"properties": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "<string>",
"name": "<string>",
"help": "<string>",
"hidden": true,
"required": true,
"placeholder": "<string>",
"width": "full"
}
]
}'
Copy
{
"id": 123,
"slug": "<string>",
"title": "<string>",
"visibility": "public",
"tags": [
"<string>"
],
"language": "<string>",
"custom_domain": "<string>",
"theme": "default",
"font_family": "<string>",
"color": "<string>",
"dark_mode": "light",
"width": "centered",
"size": "sm",
"border_radius": "none",
"layout_rtl": true,
"uppercase_labels": true,
"cover_picture": "<string>",
"logo_picture": "<string>",
"no_branding": true,
"transparent_background": true,
"submit_button_text": "<string>",
"submitted_text": "<string>",
"redirect_url": "<string>",
"re_fillable": true,
"re_fill_button_text": "<string>",
"confetti_on_submission": true,
"show_progress_bar": true,
"closes_at": "2023-11-07T05:31:56Z",
"closed_text": "<string>",
"max_submissions_count": 2,
"max_submissions_reached_text": "<string>",
"auto_save": true,
"auto_focus": true,
"enable_partial_submissions": true,
"editable_submissions": true,
"editable_submissions_button_text": "<string>",
"password": "<string>",
"use_captcha": true,
"captcha_provider": "recaptcha",
"can_be_indexed": true,
"seo_meta": {},
"custom_code": "<string>",
"database_fields_update": [
"<any>"
],
"properties": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "<string>",
"name": "<string>",
"help": "<string>",
"hidden": true,
"required": true,
"placeholder": "<string>",
"width": "full"
}
]
}
Assistant
Responses are generated using AI and may contain mistakes.