Navigation

Get Form Fields

Retrieve field definitions for a published form

POST /public/forms/getFormFields

Returns the complete field schema for a published form — field labels, types, required flags, placeholder text, hints, validation constraints, dropdown/radio options, and CRM field mappings. Use this to build external form UIs, validate submissions before sending, or understand the expected answer keys for the Submit Form endpoint.

Requires a valid `api_key` in the JSON request body

Parameters

Name In Type Required Description
api_key body string Yes Your Zyntro API key
org_id body string Yes Your organization UUID
member_id body string Yes The member UUID performing the request
brand_id body string Yes Your brand ID
form_id body string Yes The UUID of the form to retrieve fields for
Important: Only **published** forms return field data. If the form is in draft or any other status, the endpoint returns an error. Publish the form in **Sales > Forms** before calling this endpoint.

Request Body

Content-Type: application/json

Example

json
{
    "org_id": "YOUR_ORG_ID",
    "api_key": "YOUR_API_KEY",
    "form_id": "f1a2b3c4-d5e6-7890-abcd-ef1234567890",
    "brand_id": "1",
    "member_id": "YOUR_MEMBER_ID"
}

Code Samples

bash
curl -X POST https://app.zyntrohq.com/public/forms/getFormFields \
  -H "Content-Type: application/json" \
  -d '{
    "api_key": "YOUR_API_KEY",
    "org_id": "YOUR_ORG_ID",
    "member_id": "YOUR_MEMBER_ID",
    "brand_id": "1",
    "form_id": "f1a2b3c4-d5e6-7890-abcd-ef1234567890"
  }'

Response

200 Fields retrieved successfully
json
{
    "data": {
        "fields": [
            {
                "type": "textField",
                "label": "First Name",
                "maps_to": "cont_fname",
                "required": true,
                "answer_key": "first_name",
                "placeholder": "Enter your first name"
            },
            {
                "type": "emailField",
                "label": "Email Address",
                "maps_to": "cont_primary_email",
                "required": true,
                "answer_key": "email",
                "placeholder": "[email protected]"
            },
            {
                "type": "dropdownField",
                "label": "What are you interested in?",
                "options": [
                    {
                        "label": "Enterprise Plan",
                        "value": "enterprise"
                    },
                    {
                        "label": "Starter Plan",
                        "value": "starter"
                    },
                    {
                        "label": "Just Exploring",
                        "value": "exploring"
                    }
                ],
                "required": false,
                "answer_key": "interest"
            },
            {
                "type": "textareaField",
                "label": "Your Message",
                "required": false,
                "answer_key": "message",
                "max_length": 2000,
                "placeholder": "Tell us more..."
            }
        ],
        "form_id": "f1a2b3c4-d5e6-7890-abcd-ef1234567890",
        "form_name": "Contact Us"
    },
    "status": "success"
}
200 Error — form not published
json
{
    "data": [
        "Form is not published"
    ],
    "status": "error"
}
Tip: The `answer_key` for each field is what you use as the key when submitting answers via the **Submit Form** endpoint. It is derived from the field's merge tag (e.g., `first_name`, `email`, `phone`). Use these keys — not the field UUIDs — when building your submission payload.
Info: Non-submittable field types are excluded from the response: `calendarField`, `fileUploadField`, `sectionBreak`, `spacer`, `richText`, and `imageField`. Only fields that accept user input are returned.

Errors

Code Message Resolution
MISSING_FIELD Missing required field: {field}
A required parameter is missing.
Include all five required fields.
INVALID_API_KEY Invalid API Key
No active user matches the key.
Verify your key in **Me > API & Webhooks**.
INACTIVE_USER Inactive user account
The account is deactivated.
Contact your admin.
MEMBER_NOT_FOUND Member not found
The member_id does not exist.
Use a valid member ID.
FORM_NOT_FOUND Form not found
No form with that ID exists in your organization.
Verify the form_id and org_id.
NOT_PUBLISHED Form is not published
The form exists but is not in Published status.
Publish the form in **Sales > Forms** first.

Was this article helpful?

NotebookLM Overviews