Skip to main content
POST
Create Form

Request Parameters

Required Fields

Optional Fields

Form Statuses

Pre-filling Form Data

The data parameter allows you to pre-fill form fields with values. This is useful for importing data from your system or providing a better user experience by reducing the amount of information the contact needs to enter.

How It Works

The keys in the data object must exactly match the field keys defined in your form template. When a contact opens the form, these fields will already contain the provided values. Example: If your form template has fields with keys:
  • company_name
  • address_zip
  • annual_revenue
You can pre-fill them like this:

Finding Field Keys

Field keys are defined in your form template configuration in Penbox. Common examples:
Field keys are case-sensitive and must match exactly. Use the Penbox app or contact your administrator to find the correct field keys for your form template.

Complete Example

cURL

Use Cases

Import from CRM:
Progressive Forms:
Reduce Friction:
Pre-filling data improves form completion rates and reduces errors. Always pre-fill what you know while allowing contacts to modify values if needed.
If you provide a field key that doesn’t exist in the form template, it will be silently ignored. Make sure your field keys match your template configuration.

Branding

Use the branding parameter to apply a specific visual identity to a form — logo, colors, favicon, and related styling in the form experience and email notifications.

Default behavior

When branding is omitted, the form uses your workspace’s default branding — the profile configured under Settings → Branding in Penbox.

How it works

Pass the slug of an existing branding profile in your workspace:
The slug must match a branding profile that already exists in the workspace. If the slug is invalid or not found, the API returns 404.
To use the workspace default branding, omit the branding field entirely. The slug default is only a UI label for the primary workspace profile — it is not a valid API value.

Finding the branding slug

  1. Open Settings → Branding in Penbox.
  2. If your workspace has multiple branding profiles, select the profile you want and note its slug — it is displayed next to the profile selector (for example, slug: partner-brand).
See Branding for how to create and manage branding profiles.

Use cases

White-label partner forms:
Different brands per client segment:
Branding is set at form creation and applies to the form link and related emails for that form. Create separate branding profiles in Penbox when you need distinct visual identities for different clients or product lines.

External Args

Use external_args to store your own metadata with forms for easy tracking:
You can filter by external_args when listing forms:

Response Codes

Created forms are immediately active unless draft: true is specified. Draft forms must be activated by setting draft: false via PATCH.
Use external_args to link Penbox forms back to your system’s entities (orders, customers, tickets, etc.). This makes it easy to track and manage forms in your system.
The active_from and active_until dates control when the form link is accessible. Set active_until to create expiring forms.

Authorizations

Authorization
string
header
required

API token (starts with pnbx_). Create at https://app.penbox.io/workspace/settings/api. Include as: Authorization: Bearer {token}

Body

application/json
flow
object
required
workspace
object
user
object
data
object

Pre-filled form data

external_args
object

Your custom metadata

redirect_url
string<uri>

HTTPS URL to redirect after completion

draft
boolean
default:false

Create as draft (not active)

options
object

Form-specific options

active_from
string<date-time>

ISO 8601 date when form becomes active

active_until
string<date-time>

ISO 8601 date when form expires

owner
object
branding
object

Branding profile to apply to the form. Omit to use the workspace default.

Response

201 - application/json

Form created successfully

id
string<uuid>

Form UUID

created_at
string<date-time>

Creation timestamp

status
enum<string>

Current form status

Available options:
draft,
pending,
completed,
declined,
processed
archived
boolean

Whether the form is archived

archived_at
string<date-time> | null

Timestamp when archived

processed_at
string<date-time> | null

Timestamp when marked as processed

active_from
string<date-time> | null

When the form becomes active

active_until
string<date-time> | null

When the form expires

URLs for accessing the form

user
object

Contact information

owner
object | null

Form owner information

flow
object

Form template information

data
object

Pre-filled form data

external_args
object | null

Custom metadata

options
object | null

Form-specific options

responses
object[]

Array of form responses

notifications
object[]

Array of notifications sent for this form

webhooks
object | null

Webhook URLs with event subscriptions