Generic Links API
API endpoints for creating and managing generic links.
Overview
Generic Links are public landing pages with email capture forms. Use the API to create, list, and manage generic links for lead generation.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
GET | /api/v1/generic-links | List all generic links |
GET | /api/v1/generic-links/:id | Get a specific generic link |
POST | /api/v1/generic-links | Create a generic link |
PATCH | /api/v1/generic-links/:id | Update a generic link |
DELETE | /api/v1/generic-links/:id | Delete a generic link |
GET | /api/v1/generic-links/:id/submissions | List submissions |
List Generic Links
GET /api/v1/generic-links
Retrieve all generic links, optionally filtered by lead magnet.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
lead_magnet_id | string | Filter by lead magnet |
page | number | Page number (default: 1) |
per_page | number | Items per page (default: 20, max: 100) |
Response
json
Get Generic Link
GET /api/v1/generic-links/:id
Retrieve a specific generic link by ID.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Generic link ID |
Response
json
Create Generic Link
POST /api/v1/generic-links
Create a new generic link for a lead magnet.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
lead_magnet_id | string | Yes | ID of the lead magnet |
slug | string | No | URL slug (auto-generated if not provided) |
title | string | No | Landing page headline |
description | string | No | Landing page description |
collect_name | boolean | No | Collect name field (default: false) |
require_verification | boolean | No | Require email verification (default: false) |
thumbnail_url | string | No | Custom thumbnail image URL |
Example Request
json
Response
json
Error Responses
| Status | Code | Description |
|---|---|---|
| 400 | invalid_lead_magnet | Lead magnet doesn't exist |
| 400 | slug_taken | Slug already in use |
| 403 | limit_reached | Generic link limit for plan |
| 422 | validation_error | Invalid field values |
Update Generic Link
PATCH /api/v1/generic-links/:id
Update an existing generic link.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Generic link ID |
Request Body
All fields optional:
| Field | Type | Description |
|---|---|---|
slug | string | URL slug |
title | string | Landing page headline |
description | string | Landing page description |
collect_name | boolean | Collect name field |
require_verification | boolean | Require email verification |
thumbnail_url | string | Custom thumbnail URL |
active | boolean | Enable/disable link |
Example Request
json
Response
Returns the updated generic link object.
Delete Generic Link
DELETE /api/v1/generic-links/:id
Delete a generic link. This also deletes all associated submissions.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Generic link ID |
Response
json
Deleting a generic link is permanent and removes all submission data.
List Submissions
GET /api/v1/generic-links/:id/submissions
Retrieve all submissions for a generic link.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Generic link ID |
Query Parameters
| Parameter | Type | Description |
|---|---|---|
page | number | Page number (default: 1) |
per_page | number | Items per page (default: 50, max: 100) |
since | string | Filter submissions after date (ISO 8601) |
until | string | Filter submissions before date (ISO 8601) |
Response
json
Generic Link Object
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier |
lead_magnet_id | string | Associated lead magnet |
slug | string | URL slug |
url | string | Full public URL |
title | string | Landing page headline |
description | string | Landing page description |
thumbnail_url | string | Thumbnail image URL |
collect_name | boolean | Whether name is collected |
require_verification | boolean | Whether email verification required |
submission_count | number | Total submissions |
view_count | number | Total landing page views |
active | boolean | Whether link is active |
lead_magnet | object | Embedded lead magnet (detail view) |
created_at | string | Creation timestamp |
updated_at | string | Last update timestamp |
Submission Object
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier |
generic_link_id | string | Parent generic link |
email | string | Submitted email |
name | string | Submitted name (if collected) |
verified | boolean | Email verified |
viewed | boolean | Content viewed |
view_count | number | Times viewed |
submitted_at | string | Submission timestamp |
first_viewed_at | string | First view timestamp |
last_viewed_at | string | Last view timestamp |
Code Examples
Create Generic Link (JavaScript)
javascript
Fetch Submissions (Python)
python
Related
- Webhooks - Get notified of new submissions
- Lead Magnets API - Manage lead magnets
- Analytics API - Detailed engagement data