API Documentation

Integrate Linkyfy into your applications with our REST API.

Introduction

The Linkyfy API is a RESTful API that allows you to programmatically manage projects, campaigns, contacts, templates, and more. All endpoints return JSON responses.

Base URL

https://mailer.linkyfy.ai/api/v1

Authentication

All API requests (except public tracking endpoints) require authentication via the X-API-Key header. You can generate an API key from Settings → API Key in the Linkyfy dashboard.

curl -H "X-API-Key: your-api-key-here" \
     https://mailer.linkyfy.ai/api/v1/projects

Response Format

All successful responses follow this structure:

{
    "success": true,
    "data": { ... }
}

Error responses follow this structure:

{
    "success": false,
    "error": {
        "code": "ERROR_CODE",
        "message": "Human-readable description of the error."
    }
}

Error Codes

CodeHTTP StatusDescription
VALIDATION_ERROR422Request body failed validation. Check the message field for details.
NOT_FOUND404The requested resource does not exist.
UNAUTHORIZED401Missing or invalid API key.
FORBIDDEN403You do not have permission to access this resource.
QUOTA_EXCEEDED429You have exceeded your plan's sending quota.
SUBSCRIPTION_EXPIRED402Your subscription has expired. Renew to continue.
SERVER_ERROR500An internal error occurred. Contact support if it persists.

Rate Limiting

API requests are rate-limited to 60 requests per minute per API key. Rate limit headers are included in every response:

X-RateLimit-Limit: 60
X-RateLimit-Remaining: 58
X-RateLimit-Reset: 1712678400
If you exceed the rate limit, you will receive a 429 Too Many Requests response. Wait until the reset timestamp before retrying.

Projects API

POST /projects Create a new project

Request body:

{
    "name": "Acme Corp Outreach",
    "company_name": "Acme Corporation",
    "website_url": "https://acme.com",
    "description": "Cold outreach campaign for enterprise SaaS leads",
    "from_name": "John Smith",
    "daily_allocation": 100,
    "weekly_limit": 500
}

Response:

{
    "success": true,
    "data": {
        "id": 42,
        "name": "Acme Corp Outreach",
        "company_name": "Acme Corporation",
        "website_url": "https://acme.com",
        "description": "Cold outreach campaign for enterprise SaaS leads",
        "from_name": "John Smith",
        "daily_allocation": 100,
        "weekly_limit": 500,
        "created_at": "2026-04-09T10:30:00Z",
        "updated_at": "2026-04-09T10:30:00Z"
    }
}
GET /projects List all projects

Returns a paginated list of all projects belonging to the authenticated user.

Query parameters: page (default 1), per_page (default 15, max 100)

GET /projects/{id} Get project details

Returns the full project object including settings, limits, and counts.

PUT /projects/{id} Update a project

Update project fields. Only include the fields you want to change.

GET /projects/{id}/domains List project domains

Returns all domains associated with the project, including DNS status and reputation score.

GET /projects/{id}/mailboxes List project mailboxes

Returns all mailboxes associated with the project, including warmup status and daily limits.

GET /projects/{id}/blocklist Get project blocklist

Returns the list of blocked email addresses and domains for this project.

POST /projects/{id}/blocklist Add to blocklist

Request body:

{
    "entries": ["competitor@example.com", "example.org"]
}
DELETE /projects/{id}/blocklist Remove from blocklist

Request body:

{
    "entries": ["competitor@example.com"]
}
GET /projects/{id}/tracking/snippet Get JS tracking snippet

Returns the JavaScript tracking snippet HTML for embedding on your website.

GET /projects/{id}/tracking/stats Get tracking statistics

Returns website tracking data: impressions and registrations grouped by date.

Response:

{
    "success": true,
    "data": {
        "total_impressions": 1243,
        "total_registrations": 87,
        "conversion_rate": 7.0,
        "daily": [
            { "date": "2026-04-08", "impressions": 156, "registrations": 12 },
            { "date": "2026-04-07", "impressions": 203, "registrations": 15 }
        ]
    }
}

Campaigns API

POST /campaigns Create a campaign

Request body:

{
    "project_id": 42,
    "name": "Q2 Enterprise Outreach",
    "daily_allocation": 50,
    "contact_list_ids": [10, 15],
    "email_mode": "ai_generated",
    "ai_prompt": "Write a professional cold email introducing our SaaS analytics platform to enterprise CTOs. Keep it under 150 words.",
    "follow_ups": [
        { "delay_days": 3, "mode": "ai_generated" },
        { "delay_days": 7, "mode": "ai_generated" }
    ],
    "auto_reply_enabled": true,
    "calendly_link": "https://calendly.com/john/30min",
    "registration_link": "https://acme.com/signup"
}

Response:

{
    "success": true,
    "data": {
        "id": 128,
        "project_id": 42,
        "name": "Q2 Enterprise Outreach",
        "status": "enabled",
        "daily_allocation": 50,
        "email_mode": "ai_generated",
        "auto_reply_enabled": true,
        "total_recipients": 340,
        "created_at": "2026-04-09T11:00:00Z",
        "updated_at": "2026-04-09T11:00:00Z"
    }
}
GET /campaigns List campaigns

Returns paginated campaigns. Filter by project_id and status query parameters.

GET /campaigns/{id} Get campaign details

Returns the full campaign object including flow configuration and recipient count.

PUT /campaigns/{id} Update a campaign

Update campaign fields. Only include the fields you want to change. Cannot update while campaign is actively sending.

POST /campaigns/{id}/enable Enable a campaign

Activates the campaign. Emails will begin sending according to the schedule.

POST /campaigns/{id}/disable Disable a campaign

Pauses the campaign. No new emails will be sent until re-enabled.

GET /campaigns/{id}/statistics Get campaign statistics

Response:

{
    "success": true,
    "data": {
        "campaign_id": 128,
        "campaign_name": "Q2 Enterprise Outreach",
        "status": "enabled",
        "total_recipients": 340,
        "sent": 210,
        "delivered": 205,
        "opened": 98,
        "replied": 23,
        "bounced": 5,
        "spam": 2,
        "open_rate": 47.8,
        "reply_rate": 11.2,
        "bounce_rate": 2.4,
        "daily_breakdown": [
            { "date": "2026-04-09", "sent": 50, "opened": 22, "replied": 5 },
            { "date": "2026-04-08", "sent": 50, "opened": 28, "replied": 7 }
        ]
    }
}
GET /campaigns/{id}/recipients List campaign recipients

Returns paginated list of recipients with their individual send/open/reply status.

POST /campaigns/{id}/recipients Add recipients to campaign

Request body:

{
    "contact_list_ids": [22, 33]
}

Contact Lists API

POST /contact-lists Create a contact list

Request body:

{
    "name": "Enterprise CTOs",
    "contacts": [
        {
            "email": "jane@example.com",
            "first_name": "Jane",
            "last_name": "Doe",
            "company": "TechCorp",
            "position": "CTO"
        },
        {
            "email": "bob@example.com",
            "first_name": "Bob",
            "last_name": "Wilson",
            "company": "DataInc",
            "position": "VP Engineering"
        }
    ]
}

Response:

{
    "success": true,
    "data": {
        "id": 10,
        "name": "Enterprise CTOs",
        "contact_count": 2,
        "created_at": "2026-04-09T12:00:00Z"
    }
}
GET /contact-lists List all contact lists

Returns a paginated list of all contact lists with contact counts.

GET /contact-lists/{id} Get contact list details

Returns the contact list metadata and a paginated list of its contacts.

PUT /contact-lists/{id} Update contact list

Update the contact list name or other metadata.

DELETE /contact-lists/{id} Delete contact list

Permanently deletes the contact list and all its contacts. Cannot be undone.

POST /contact-lists/{id}/contacts Add contacts

Add one or more contacts to an existing list. Duplicate emails are skipped.

PUT /contact-lists/{id}/contacts/{contactId} Update a contact

Update individual contact fields.

DELETE /contact-lists/{id}/contacts/{contactId} Delete a contact

Remove a contact from the list.

Domains API

Domains are managed automatically by Linkyfy on Full Service plans. These endpoints are read-only.
GET /domains List all domains

Returns all domains across all projects with DNS status, reputation score, and project association.

GET /domains/{id} Get domain details

Returns full domain information including DNS records, reputation history, and associated mailboxes.

Mailboxes API

Mailboxes are managed automatically by Linkyfy on Full Service plans. These endpoints are read-only.
GET /mailboxes List all mailboxes

Returns all mailboxes with warmup status, current daily limit, and domain association.

GET /mailboxes/{id} Get mailbox details

Returns full mailbox information including warmup schedule, sending history, and reputation data.

Templates API

POST /templates Create a template

Request body:

{
    "name": "Cold intro - SaaS",
    "subject": "Quick question, {{first_name}}",
    "body": "Hi {{first_name}},\n\nI noticed {{company}} is scaling fast..."
}
GET /templates List templates

Returns all templates. Filter with archived=true to include archived templates.

GET /templates/{id} Get template

Returns the full template with subject, body, and metadata.

PUT /templates/{id} Update template

Update template name, subject, or body.

DELETE /templates/{id} Delete template

Permanently deletes the template.

POST /templates/{id}/archive Archive template

Moves the template to the archive. Archived templates are hidden from the default list.

POST /templates/{id}/unarchive Unarchive template

Restores an archived template to the active list.

Unibox API

GET /unibox/threads List threads

Returns paginated conversation threads. Filter by project_id, campaign_id, or tag.

GET /unibox/threads/{id}/messages Get thread messages

Returns all messages in a thread in chronological order.

POST /unibox/threads/{id}/reply Reply to a thread

Request body:

{
    "body": "Thanks for your interest! Let me schedule a call..."
}
Sending a manual reply disables scheduled auto-replies for this thread.
POST /unibox/threads/{id}/tag Tag a thread

Request body:

{
    "tag": "hot-lead"
}
POST /unibox/threads/{id}/auto-reply/cancel Cancel scheduled auto-reply

Cancels the next scheduled auto-reply for this thread.

PUT /unibox/threads/{id}/auto-reply Edit scheduled auto-reply

Request body:

{
    "body": "Updated auto-reply content here..."
}

Settings API

GET /settings Get user settings

Returns the authenticated user's profile, work schedule, timezone, and preferences.

PUT /settings Update settings

Update profile, work schedule, or forwarding email. Only include fields you want to change.

POST /settings/api-key/regenerate Regenerate API key

Generates a new API key and invalidates the current one. The new key is returned in the response.

This action is irreversible. All applications using the old key will stop working.

Plan & Payments API

GET /plan Get current plan

Returns the user's current plan type, usage, and billing cycle information.

PUT /plan Change plan

Request body:

{
    "plan_type": "full_service"
}

Plan types: full_service, own_smtp

GET /payments Payment history

Returns paginated list of past payments with invoice details.

Notifications API

GET /notifications List notifications

Returns paginated notifications. Filter with unread=true to show only unread.

POST /notifications/{id}/read Mark as read

Marks a single notification as read.

POST /notifications/read-all Mark all as read

Marks all unread notifications as read.

Tracking API

Tracking endpoints are public and do not require authentication. They are called by the JS tracking snippet embedded on your website.
POST /tracking/impression Record a page impression

Request body:

{
    "project_id": 42,
    "visitor_id": "abc123-unique-visitor-id",
    "page_url": "https://acme.com/pricing",
    "referrer": "https://google.com"
}
POST /tracking/registration Record a registration conversion

Request body:

{
    "project_id": 42,
    "visitor_id": "abc123-unique-visitor-id",
    "email": "newuser@example.com"
}

User SMTP API

These endpoints are only available for users on the Own SMTP plan.
POST /projects/{id}/smtp Add SMTP configuration

Request body:

{
    "smtp_host": "smtp.yourdomain.com",
    "smtp_port": 465,
    "smtp_encryption": "ssl",
    "smtp_username": "sender@yourdomain.com",
    "smtp_password": "your-password",
    "imap_host": "imap.yourdomain.com",
    "imap_port": 993,
    "imap_encryption": "ssl",
    "from_name": "John Smith",
    "from_email": "sender@yourdomain.com",
    "is_reply_mailbox": false
}
GET /projects/{id}/smtp List SMTP configurations

Returns all SMTP/IMAP configurations for the project. Passwords are masked.

PUT /projects/{id}/smtp/{smtpId} Update SMTP configuration

Update SMTP/IMAP settings. Only include fields you want to change.

DELETE /projects/{id}/smtp/{smtpId} Remove SMTP configuration

Removes an SMTP configuration. Cannot remove the last configuration or the reply mailbox while campaigns are active.


Need help with the API? Contact our support team or see the User Manual.