Skip to main content
Back to Documentation
API Reference

Marqly API

Build powerful integrations with our RESTful API. Access leads, contacts, websites, automations, and more.

Base URL

api.marqly.co.za

Version

v1

Format

JSON

Auth

Bearer Token

Authentication

All API requests require authentication using a Bearer token. Contact our team to request your API key.

// Authentication with API Key
const response = await fetch('https://api.marqly.co.za/v1/leads', {
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  }
});

API Endpoints

Categories

GET/v1/leads

List all leads with optional filtering

POST/v1/leads

Create a new lead

GET/v1/contacts

List all contacts

POST/v1/websites

Create a new website

GET/v1/websites/{id}

Get website details

POST/v1/automations

Create an automation workflow

POST/v1/invoices

Create a new invoice

GET/v1/campaigns

List all email campaigns

Example: Create Lead

Create a new lead with custom fields

// Create a new lead
const response = await fetch('https://api.marqly.co.za/v1/leads', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    name: 'John Smith',
    email: 'john@example.com',
    phone: '+27123456789',
    company: 'Acme Corp',
    value: 50000,
    source: 'website',
    tags: ['hot-lead', 'enterprise']
  })
});

const lead = await response.json();
console.log(lead.id); // "lead_abc123"

Webhooks

Subscribe to real-time events in your Marqly account. We'll send HTTP POST requests to your endpoint when events occur.

lead.created
lead.updated
deal.won
invoice.paid
website.published
automation.completed
// Webhook payload example
{
  "event": "lead.created",
  "timestamp": "2024-02-15T10:30:00Z",
  "data": {
    "id": "lead_abc123",
    "name": "John Smith",
    "email": "john@example.com",
    "value": 50000
  }
}

Rate Limits

API requests are rate limited to ensure fair usage across all customers.

1,000

Requests per minute

50,000

Requests per day

10

Concurrent requests

Need Help?

Our team is here to help with your integration