Skip to main content
POST
/
forms
Create form
curl --request POST \
  --url https://api.heffl.com/api/v2/forms \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "title": "<string>",
  "description": "<string>",
  "fields": [
    {
      "label": "<string>",
      "description": "<string>",
      "required": true,
      "placeholder": "<string>",
      "values": [
        "<string>"
      ],
      "settings": {}
    }
  ]
}
'
{
  "id": "<string>",
  "title": "<string>",
  "description": "<string>",
  "entity": "<string>",
  "submissionCount": 123,
  "createdById": "<string>",
  "createdByName": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Authorizations

x-api-key
string
header
required

API key for authentication. Get yours at app.heffl.com/settings/developers

Body

application/json
title
string
required

Form title

description
string | null

Form description shown to respondents

fields
object[]

Questions to add to the form's first page. Each becomes an answerable field.

Response

OK

id
string
required

Form ID (frm_ prefix)

title
string
required

Form title

description
string | null
required

Form description shown to respondents

entity
string | null
required

CRM entity this form is associated with (e.g. leads, deals), if any

submissionCount
number
required

Total number of submissions received

createdById
string | null
required

ID of the user who created the form (usr_ prefix)

createdByName
string | null
required

Name of the user who created the form

createdAt
string<date-time>
required

When the form was created

updatedAt
string<date-time> | null
required

When the form was last updated