Skip to main content
All Collections endpoints sit under /api/brands/{brand}/collections/ with moduleAccess:collections middleware. Authenticate with EF-Access-Key.
Collections are dynamic form schemas. Each collection has a set of typed fields, and every form submission creates an entry validated against that schema.

List Collections

GET /api/brands/{brand}/collections
per_page
number
Results per page (1–100, default: 25)
q
string
Search by name or code
sort
string
newest (default), oldest, created_at, updated_at
cURL
curl https://app.elasticfunnels.io/api/brands/{brand_id}/collections \
  -H "EF-Access-Key: your_api_key_here"
{
  "current_page": 1,
  "data": [
    {
      "id": 3,
      "code": "contact-form",
      "name": "Contact Form",
      "public_export": false,
      "total_entries": 142
    }
  ],
  "per_page": 25,
  "total": 3,
  "last_page": 1
}

List Collections (Unpaginated)

Returns id, name, code only — useful for dropdowns.
GET /api/brands/{brand}/collections/all
[
  { "id": 3, "name": "Contact Form", "code": "contact-form" },
  { "id": 4, "name": "Lead Capture", "code": "lead-capture" }
]

Get Collection

Returns the full collection schema including all field definitions.
GET /api/brands/{brand}/collections/{collection}
collection
string
required
Collection numeric ID or code slug
cURL
curl https://app.elasticfunnels.io/api/brands/{brand_id}/collections/contact-form \
  -H "EF-Access-Key: your_api_key_here"
{
  "id": 3,
  "code": "contact-form",
  "name": "Contact Form",
  "public_export": false,
  "total_entries": 142,
  "on_new_entry": "send_admin_email",
  "send_to_email": "admin@example.com",
  "recaptcha_enabled": false,
  "recaptcha_site_key": null,
  "recaptcha_secret_key": null,
  "ticket_source_id": null,
  "fields": [
    {
      "id": 1,
      "code": "full_name",
      "name": "Full Name",
      "type": "text",
      "placeholder": "Enter your name",
      "options": null,
      "required": true,
      "searchable": true,
      "private": false,
      "public_encrypt": false,
      "public_exclude": false,
      "order": 0,
      "default_value": null
    },
    {
      "id": 2,
      "code": "email",
      "name": "Email",
      "type": "email",
      "placeholder": "you@example.com",
      "required": true,
      "order": 1
    }
  ]
}

Get Collection Fields

GET /api/brands/{brand}/collections/{collection}/fields
Returns the raw field list for a collection (numeric ID only for this route).

Create Collection

POST /api/brands/{brand}/collections
name
string
required
Collection name (max 255 chars)
fields
array
required
Array of field definition objects (at least one)
fields[].name
string
required
Field label (max 255)
fields[].type
string
required
text, email, number, checkbox, password, textarea, select, or hidden
fields[].required
boolean
Whether the field is required on submission
fields[].placeholder
string
Input placeholder (max 255)
fields[].options
array
Required when type is select — array of option strings (at least one)
fields[].default_value
string
Default value for the field (max 255)
fields[].order
number
Display order (integer, min 0)
fields[].searchable
boolean
Whether entries can be searched by this field
fields[].private
boolean
Hide field from public-facing builder views
public_export
boolean
Allow public CSV download of entries
on_new_entry
string
send_admin_email, send_email_to, or create_new_ticket
send_to_email
string
Required when on_new_entry is send_email_to. Valid email address.
cURL
curl -X POST https://app.elasticfunnels.io/api/brands/{brand_id}/collections \
  -H "EF-Access-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Lead Capture",
    "on_new_entry": "send_admin_email",
    "fields": [
      { "name": "Full Name", "type": "text",  "required": true,  "order": 0 },
      { "name": "Email",     "type": "email", "required": true,  "order": 1 },
      { "name": "Source",    "type": "select","required": false, "order": 2,
        "options": ["Facebook", "Google", "Organic"] }
    ]
  }'
{
  "id": 5,
  "code": "lead-capture",
  "name": "Lead Capture",
  "total_entries": 0,
  "fields": [ /* ... */ ]
}

Update Collection

PUT /api/brands/{brand}/collections/{collection}
collection
number
required
Collection numeric ID
Same body as Create. To update an existing field, include its id; to delete a field, pass "deleted": true on the field object.

Delete Collection

DELETE /api/brands/{brand}/collections/{collection}
{ "success": true }

List Entries

GET /api/brands/{brand}/collections/{collection}/entries
collection
number
required
Collection numeric ID
per_page
number
Results per page (default: 30)
q
string
Search entry titles
cURL
curl "https://app.elasticfunnels.io/api/brands/{brand_id}/collections/3/entries?per_page=50" \
  -H "EF-Access-Key: your_api_key_here"
{
  "data": [
    {
      "id": "es-doc-abc123",
      "title": "Jane Doe",
      "full_name": "Jane Doe",
      "email": "jane@example.com",
      "source": "Facebook",
      "created_at": "2024-12-10T09:00:00Z",
      "updated_at": "2024-12-10T09:00:00Z"
    }
  ],
  "current_page": 1,
  "total": 142
}

Get Entry

GET /api/brands/{brand}/collections/{collection}/entries/{entry}
Returns a single entry with all field values flattened to top-level keys.

Create Entry

POST /api/brands/{brand}/collections/{collection}/entries
The request body is validated dynamically against the collection’s field schema. Field codes (e.g. email, full_name) become the body keys. Required fields and type rules are enforced per field definition.
{field_code}
string | number | boolean
One key per collection field, using the field’s code as the key. Type rules: email → valid email, number → numeric, checkbox → boolean, select → must be one of the defined options, all others → string.
cURL
curl -X POST https://app.elasticfunnels.io/api/brands/{brand_id}/collections/3/entries \
  -H "EF-Access-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "full_name": "Jane Doe",
    "email": "jane@example.com",
    "source": "Facebook"
  }'
{
  "message": "Entry created successfully",
  "data": {
    "full_name": "Jane Doe",
    "email": "jane@example.com",
    "source": "Facebook"
  },
  "id": "es-doc-abc123"
}

Update Entry

PUT /api/brands/{brand}/collections/{collection}/entries/{entry}
Same body as Create — only provided fields are merged into the existing entry.

Delete Entry

DELETE /api/brands/{brand}/collections/{collection}/entries/{entry}

Bulk Delete Entries

DELETE /api/brands/{brand}/collections/{collection}/entries/bulk-delete
ids
array
required
Array of entry IDs to delete

Export Entries

Queue a CSV export of all entries in a collection. The results are emailed to the specified address.
POST /api/brands/{brand}/collections/{collection}/export
email
string
required
Email address to send the export to
fields
array
required
Array of field codes to include in the export
new_only
boolean
Export only new entries since last export
cURL
curl -X POST https://app.elasticfunnels.io/api/brands/{brand_id}/collections/3/export \
  -H "EF-Access-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"email": "admin@example.com", "fields": ["full_name", "email", "source"]}'
{
  "message": "Export started. You will receive an email when it is ready."
}