{
    "variable": [
        {
            "id": "baseUrl",
            "key": "baseUrl",
            "type": "string",
            "name": "string",
            "value": "http:\/\/localhost:8000"
        }
    ],
    "info": {
        "name": "EvenLeads API Documentation",
        "_postman_id": "02b10c96-134e-472e-98ed-13980afa105e",
        "description": "API for managing campaigns, leads, and sync operations in EvenLeads.",
        "schema": "https:\/\/schema.getpostman.com\/json\/collection\/v2.1.0\/collection.json"
    },
    "item": [
        {
            "name": "Account",
            "description": "\nAPI endpoints for account information and usage",
            "item": [
                {
                    "name": "Get account usage and limits",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/account\/usage",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/account\/usage"
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Retrieve current usage statistics and plan limits for EvenLeads features."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\n  \"success\": true,\n  \"data\": {\n    \"user\": {\n      \"id\": 1,\n      \"name\": \"John Doe\",\n      \"email\": \"john@example.com\"\n    },\n    \"plan\": {\n      \"name\": \"Professional\",\n      \"interval\": \"monthly\"\n    },\n    \"limits\": {\n      \"campaigns\": {\n        \"current\": 3,\n        \"max\": 5,\n        \"percentage\": 60\n      },\n      \"leads_storage\": {\n        \"current\": 1250,\n        \"max\": 5000,\n        \"percentage\": 25\n      },\n      \"leads_per_sync\": {\n        \"max\": 100\n      },\n      \"ai_replies_per_month\": {\n        \"current\": 45,\n        \"max\": 500,\n        \"percentage\": 9,\n        \"resets_at\": \"2025-02-01T00:00:00.000000Z\"\n      },\n      \"manual_syncs_per_month\": {\n        \"current\": 12,\n        \"max\": 100,\n        \"percentage\": 12,\n        \"resets_at\": \"2025-02-01T00:00:00.000000Z\"\n      },\n      \"keywords_per_campaign\": {\n        \"max\": 20\n      },\n      \"automated_sync_interval_minutes\": {\n        \"value\": 60\n      }\n    }\n  }\n}",
                            "name": ""
                        }
                    ]
                }
            ]
        },
        {
            "name": "Authentication",
            "description": "\nAPI endpoints for authentication",
            "item": [
                {
                    "name": "Validate API Key",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/auth\/validate",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/auth\/validate"
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Validates if an API key is valid and returns associated user information."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\n  \"success\": true,\n  \"message\": \"API key is valid\",\n  \"data\": {\n    \"user\": {\n      \"id\": 1,\n      \"name\": \"John Doe\",\n      \"email\": \"john@example.com\"\n    },\n    \"api_key\": {\n      \"name\": \"My API Key\",\n      \"created_at\": \"2025-01-01T00:00:00.000000Z\",\n      \"last_used_at\": \"2025-01-15T12:30:00.000000Z\"\n    }\n  }\n}",
                            "name": ""
                        },
                        {
                            "header": [],
                            "code": 401,
                            "body": "{\n  \"success\": false,\n  \"message\": \"Invalid API key.\"\n}",
                            "name": ""
                        }
                    ]
                }
            ]
        },
        {
            "name": "Campaigns",
            "description": "\nAPI endpoints for managing campaigns",
            "item": [
                {
                    "name": "List all campaigns",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/campaigns",
                            "query": [
                                {
                                    "key": "page",
                                    "value": "1",
                                    "description": "Page number for pagination.",
                                    "disabled": false
                                },
                                {
                                    "key": "per_page",
                                    "value": "15",
                                    "description": "Number of items per page (max 100).",
                                    "disabled": false
                                },
                                {
                                    "key": "status",
                                    "value": "active",
                                    "description": "Filter by status (active, paused, completed).",
                                    "disabled": false
                                },
                                {
                                    "key": "platform",
                                    "value": "reddit",
                                    "description": "Filter by platform (reddit, facebook, etc).",
                                    "disabled": false
                                }
                            ],
                            "raw": "{{baseUrl}}\/api\/v1\/campaigns?page=1&per_page=15&status=active&platform=reddit"
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Get a paginated list of all campaigns for the authenticated user."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\n  \"success\": true,\n  \"data\": {\n    \"campaigns\": [\n      {\n        \"id\": 1,\n        \"name\": \"Web Development Services\",\n        \"offering\": \"Custom web development\",\n        \"website_url\": \"https:\/\/example.com\",\n        \"platforms\": [\"reddit\", \"facebook\"],\n        \"status\": \"active\",\n        \"keywords\": [\"web development\", \"website\"],\n        \"strong_matches_count\": 15,\n        \"partial_matches_count\": 8,\n        \"new_leads_count\": 5,\n        \"last_sync_at\": \"2025-01-15T10:30:00.000000Z\",\n        \"next_sync_at\": \"2025-01-15T11:30:00.000000Z\",\n        \"created_at\": \"2025-01-01T00:00:00.000000Z\",\n        \"updated_at\": \"2025-01-15T10:30:00.000000Z\"\n      }\n    ],\n    \"pagination\": {\n      \"current_page\": 1,\n      \"per_page\": 15,\n      \"total\": 25,\n      \"last_page\": 2\n    }\n  }\n}",
                            "name": ""
                        }
                    ]
                },
                {
                    "name": "Get a single campaign",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/campaigns\/:id",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/campaigns\/:id",
                            "variable": [
                                {
                                    "id": "id",
                                    "key": "id",
                                    "value": "1",
                                    "description": "The campaign ID."
                                }
                            ]
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Retrieve detailed information about a specific campaign including all settings, matches, and sync history."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\n  \"success\": true,\n  \"data\": {\n    \"id\": 1,\n    \"name\": \"Web Development Services\",\n    \"offering\": \"Custom web development\",\n    \"website_url\": \"https:\/\/example.com\",\n    \"portfolio_path\": \"\/portfolio\",\n    \"platforms\": [\"reddit\", \"facebook\"],\n    \"facebook_groups\": [\"group1\", \"group2\"],\n    \"keywords\": [\"web development\", \"website\"],\n    \"include_keywords\": [\"need\", \"looking for\"],\n    \"ai_settings\": {\n      \"tone\": \"professional\",\n      \"length\": \"medium\"\n    },\n    \"include_call_to_action\": true,\n    \"status\": \"active\",\n    \"strong_matches_count\": 15,\n    \"partial_matches_count\": 8,\n    \"new_leads_count\": 5,\n    \"last_sync_at\": \"2025-01-15T10:30:00.000000Z\",\n    \"next_sync_at\": \"2025-01-15T11:30:00.000000Z\",\n    \"created_at\": \"2025-01-01T00:00:00.000000Z\",\n    \"updated_at\": \"2025-01-15T10:30:00.000000Z\"\n  }\n}",
                            "name": ""
                        },
                        {
                            "header": [],
                            "code": 404,
                            "body": "{\n  \"success\": false,\n  \"message\": \"Campaign not found\"\n}",
                            "name": ""
                        }
                    ]
                },
                {
                    "name": "Create a new campaign",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/campaigns",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/campaigns"
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\"name\":\"Web Development Services\",\"offering\":\"Custom web development and design services\",\"website_url\":\"https:\\\/\\\/example.com\",\"portfolio_path\":\"\\\/portfolio\",\"platforms\":[\"reddit\",\"facebook\"],\"facebook_groups\":[\"group1\",\"group2\"],\"keywords\":[\"web development\",\"website\"],\"negative_keywords\":[\"architecto\"],\"include_keywords\":[\"need\",\"looking for\"],\"ai_settings\":{\"tone\":\"professional\",\"length\":\"medium\"},\"include_call_to_action\":true,\"status\":\"active\"}"
                        },
                        "description": "Create a new campaign. You can only create campaigns for social platforms your account is connected with."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 201,
                            "body": "{\n  \"success\": true,\n  \"message\": \"Campaign created successfully\",\n  \"data\": {\n    \"id\": 1,\n    \"name\": \"Web Development Services\",\n    \"status\": \"active\",\n    \"created_at\": \"2025-01-15T12:00:00.000000Z\"\n  }\n}",
                            "name": ""
                        },
                        {
                            "header": [],
                            "code": 422,
                            "body": "{\n  \"success\": false,\n  \"message\": \"Validation failed\",\n  \"errors\": {\n    \"platforms\": [\"You are not connected to facebook. Please connect your account first.\"]\n  }\n}",
                            "name": ""
                        }
                    ]
                },
                {
                    "name": "Update a campaign",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/campaigns\/:id",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/campaigns\/:id",
                            "variable": [
                                {
                                    "id": "id",
                                    "key": "id",
                                    "value": "1",
                                    "description": "The campaign ID."
                                }
                            ]
                        },
                        "method": "PUT",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\"name\":\"Updated Campaign Name\",\"offering\":\"Updated offering description\",\"website_url\":\"https:\\\/\\\/example.com\",\"portfolio_path\":\"\\\/portfolio\",\"platforms\":[\"reddit\"],\"facebook_groups\":[\"group1\"],\"keywords\":[\"web dev\",\"website\"],\"negative_keywords\":[\"architecto\"],\"include_keywords\":[\"need\"],\"ai_settings\":{\"tone\":\"casual\"},\"include_call_to_action\":false,\"status\":\"paused\"}"
                        },
                        "description": "Update an existing campaign. Same validation rules as creation apply."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\n  \"success\": true,\n  \"message\": \"Campaign updated successfully\",\n  \"data\": {\n    \"id\": 1,\n    \"name\": \"Updated Campaign Name\",\n    \"updated_at\": \"2025-01-15T12:30:00.000000Z\"\n  }\n}",
                            "name": ""
                        },
                        {
                            "header": [],
                            "code": 404,
                            "body": "{\n  \"success\": false,\n  \"message\": \"Campaign not found\"\n}",
                            "name": ""
                        }
                    ]
                },
                {
                    "name": "Delete a campaign",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/campaigns\/:id",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/campaigns\/:id",
                            "variable": [
                                {
                                    "id": "id",
                                    "key": "id",
                                    "value": "1",
                                    "description": "The campaign ID."
                                }
                            ]
                        },
                        "method": "DELETE",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Soft delete a campaign and all its associated data."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\n  \"success\": true,\n  \"message\": \"Campaign deleted successfully\"\n}",
                            "name": ""
                        },
                        {
                            "header": [],
                            "code": 404,
                            "body": "{\n  \"success\": false,\n  \"message\": \"Campaign not found\"\n}",
                            "name": ""
                        }
                    ]
                }
            ]
        },
        {
            "name": "Leads",
            "description": "\nAPI endpoints for managing leads",
            "item": [
                {
                    "name": "List all leads",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/leads",
                            "query": [
                                {
                                    "key": "page",
                                    "value": "1",
                                    "description": "Page number for pagination.",
                                    "disabled": false
                                },
                                {
                                    "key": "per_page",
                                    "value": "15",
                                    "description": "Number of items per page (max 100).",
                                    "disabled": false
                                },
                                {
                                    "key": "campaign_id",
                                    "value": "1",
                                    "description": "Filter by campaign ID.",
                                    "disabled": false
                                },
                                {
                                    "key": "status",
                                    "value": "new",
                                    "description": "Filter by status (new, contacted, closed).",
                                    "disabled": false
                                },
                                {
                                    "key": "match_type",
                                    "value": "strong",
                                    "description": "Filter by match type (strong, partial).",
                                    "disabled": false
                                },
                                {
                                    "key": "platform",
                                    "value": "reddit",
                                    "description": "Filter by platform (reddit, facebook, etc).",
                                    "disabled": false
                                },
                                {
                                    "key": "min_confidence",
                                    "value": "7",
                                    "description": "Minimum confidence score (0-10).",
                                    "disabled": false
                                },
                                {
                                    "key": "max_confidence",
                                    "value": "10",
                                    "description": "Maximum confidence score (0-10).",
                                    "disabled": false
                                },
                                {
                                    "key": "search",
                                    "value": "website",
                                    "description": "Search in title and description.",
                                    "disabled": false
                                },
                                {
                                    "key": "sort_by",
                                    "value": "created_at",
                                    "description": "Sort by field (created_at, confidence_score, synced_at).",
                                    "disabled": false
                                },
                                {
                                    "key": "sort_order",
                                    "value": "desc",
                                    "description": "Sort order (asc, desc).",
                                    "disabled": false
                                }
                            ],
                            "raw": "{{baseUrl}}\/api\/v1\/leads?page=1&per_page=15&campaign_id=1&status=new&match_type=strong&platform=reddit&min_confidence=7&max_confidence=10&search=website&sort_by=created_at&sort_order=desc"
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Get a paginated list of all leads with comprehensive filtering options."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\n  \"success\": true,\n  \"data\": {\n    \"leads\": [\n      {\n        \"id\": 1,\n        \"campaign_id\": 1,\n        \"campaign_name\": \"Web Development Services\",\n        \"platform\": \"reddit\",\n        \"platform_id\": \"abc123\",\n        \"title\": \"Looking for web developer\",\n        \"description\": \"Need someone to build a website\",\n        \"url\": \"https:\/\/reddit.com\/r\/example\/comments\/abc123\",\n        \"author\": \"john_doe\",\n        \"subreddit\": \"webdev\",\n        \"facebook_group\": null,\n        \"comments_count\": 5,\n        \"confidence_score\": 8,\n        \"match_type\": \"strong\",\n        \"status\": \"new\",\n        \"matched_keywords\": [\"website\", \"web developer\"],\n        \"synced_at\": \"2025-01-15T10:30:00.000000Z\",\n        \"contacted_at\": null,\n        \"created_at\": \"2025-01-15T10:30:00.000000Z\",\n        \"updated_at\": \"2025-01-15T10:30:00.000000Z\"\n      }\n    ],\n    \"pagination\": {\n      \"current_page\": 1,\n      \"per_page\": 15,\n      \"total\": 150,\n      \"last_page\": 10\n    }\n  }\n}",
                            "name": ""
                        }
                    ]
                },
                {
                    "name": "Get a single lead",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/leads\/:id",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/leads\/:id",
                            "variable": [
                                {
                                    "id": "id",
                                    "key": "id",
                                    "value": "1",
                                    "description": "The lead ID."
                                }
                            ]
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Retrieve detailed information about a specific lead including AI generations and campaign details."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\n  \"success\": true,\n  \"data\": {\n    \"id\": 1,\n    \"campaign\": {\n      \"id\": 1,\n      \"name\": \"Web Development Services\",\n      \"offering\": \"Custom web development\"\n    },\n    \"platform\": \"reddit\",\n    \"platform_id\": \"abc123\",\n    \"title\": \"Looking for web developer\",\n    \"description\": \"Need someone to build a website for my startup\",\n    \"url\": \"https:\/\/reddit.com\/r\/example\/comments\/abc123\",\n    \"author\": \"john_doe\",\n    \"subreddit\": \"webdev\",\n    \"facebook_group\": null,\n    \"comments_count\": 5,\n    \"confidence_score\": 8,\n    \"match_type\": \"strong\",\n    \"status\": \"new\",\n    \"matched_keywords\": [\"website\", \"web developer\"],\n    \"ai_generations\": [\n      {\n        \"id\": 1,\n        \"generated_message\": \"Hi! I'd love to help with your project...\",\n        \"created_at\": \"2025-01-15T10:35:00.000000Z\"\n      }\n    ],\n    \"synced_at\": \"2025-01-15T10:30:00.000000Z\",\n    \"contacted_at\": null,\n    \"created_at\": \"2025-01-15T10:30:00.000000Z\",\n    \"updated_at\": \"2025-01-15T10:30:00.000000Z\"\n  }\n}",
                            "name": ""
                        },
                        {
                            "header": [],
                            "code": 404,
                            "body": "{\n  \"success\": false,\n  \"message\": \"Lead not found\"\n}",
                            "name": ""
                        }
                    ]
                },
                {
                    "name": "Delete a lead",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/leads\/:id",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/leads\/:id",
                            "variable": [
                                {
                                    "id": "id",
                                    "key": "id",
                                    "value": "1",
                                    "description": "The lead ID."
                                }
                            ]
                        },
                        "method": "DELETE",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Permanently delete a lead from your account."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\n  \"success\": true,\n  \"message\": \"Lead deleted successfully\"\n}",
                            "name": ""
                        },
                        {
                            "header": [],
                            "code": 404,
                            "body": "{\n  \"success\": false,\n  \"message\": \"Lead not found\"\n}",
                            "name": ""
                        }
                    ]
                },
                {
                    "name": "Bulk delete leads",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/leads\/bulk-delete",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/leads\/bulk-delete"
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\"lead_ids\":[1,2,3]}"
                        },
                        "description": "Delete multiple leads at once by providing an array of lead IDs."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\n  \"success\": true,\n  \"message\": \"Successfully deleted 3 leads\"\n}",
                            "name": ""
                        },
                        {
                            "header": [],
                            "code": 422,
                            "body": "{\n  \"success\": false,\n  \"message\": \"Validation failed\",\n  \"errors\": {\n    \"lead_ids\": [\"The lead ids field is required.\"]\n  }\n}",
                            "name": ""
                        }
                    ]
                },
                {
                    "name": "Update lead status",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/leads\/:id\/status",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/leads\/:id\/status",
                            "variable": [
                                {
                                    "id": "id",
                                    "key": "id",
                                    "value": "1",
                                    "description": "The lead ID."
                                }
                            ]
                        },
                        "method": "PATCH",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\"status\":\"contacted\"}"
                        },
                        "description": "Update the status of a lead (new, contacted, closed)."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\n  \"success\": true,\n  \"message\": \"Lead status updated successfully\",\n  \"data\": {\n    \"id\": 1,\n    \"status\": \"contacted\",\n    \"contacted_at\": \"2025-01-15T12:00:00.000000Z\"\n  }\n}",
                            "name": ""
                        },
                        {
                            "header": [],
                            "code": 404,
                            "body": "{\n  \"success\": false,\n  \"message\": \"Lead not found\"\n}",
                            "name": ""
                        }
                    ]
                }
            ]
        },
        {
            "name": "Sync",
            "description": "\nAPI endpoints for syncing campaigns",
            "item": [
                {
                    "name": "Trigger manual sync for a campaign",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/sync\/campaign\/:id",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/sync\/campaign\/:id",
                            "variable": [
                                {
                                    "id": "id",
                                    "key": "id",
                                    "value": "1",
                                    "description": "The campaign ID to sync."
                                }
                            ]
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Manually trigger a sync operation for a specific campaign to fetch new leads immediately."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\n  \"success\": true,\n  \"message\": \"Sync started successfully\",\n  \"data\": {\n    \"campaign_id\": 1,\n    \"campaign_name\": \"Web Development Services\",\n    \"status\": \"queued\",\n    \"queued_at\": \"2025-01-15T12:00:00.000000Z\"\n  }\n}",
                            "name": ""
                        },
                        {
                            "header": [],
                            "code": 404,
                            "body": "{\n  \"success\": false,\n  \"message\": \"Campaign not found\"\n}",
                            "name": ""
                        },
                        {
                            "header": [],
                            "code": 429,
                            "body": "{\n  \"success\": false,\n  \"message\": \"Campaign was synced recently. Please wait before syncing again.\",\n  \"data\": {\n    \"last_sync_at\": \"2025-01-15T11:55:00.000000Z\",\n    \"next_available_sync\": \"2025-01-15T12:10:00.000000Z\"\n  }\n}",
                            "name": ""
                        }
                    ]
                },
                {
                    "name": "Sync all active campaigns",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/sync\/all",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/sync\/all"
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Trigger a sync operation for all active campaigns belonging to the authenticated user."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\n  \"success\": true,\n  \"message\": \"Sync started for 3 campaigns\",\n  \"data\": {\n    \"total_campaigns\": 3,\n    \"queued_campaigns\": [\n      {\n        \"id\": 1,\n        \"name\": \"Web Development Services\"\n      },\n      {\n        \"id\": 2,\n        \"name\": \"Design Services\"\n      },\n      {\n        \"id\": 3,\n        \"name\": \"SEO Consulting\"\n      }\n    ],\n    \"queued_at\": \"2025-01-15T12:00:00.000000Z\"\n  }\n}",
                            "name": ""
                        },
                        {
                            "header": [],
                            "code": 404,
                            "body": "{\n  \"success\": false,\n  \"message\": \"No active campaigns found\"\n}",
                            "name": ""
                        }
                    ]
                },
                {
                    "name": "Get sync history for a campaign",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/sync\/history\/:id",
                            "query": [
                                {
                                    "key": "page",
                                    "value": "1",
                                    "description": "Page number for pagination.",
                                    "disabled": false
                                },
                                {
                                    "key": "per_page",
                                    "value": "15",
                                    "description": "Number of items per page (max 100).",
                                    "disabled": false
                                }
                            ],
                            "raw": "{{baseUrl}}\/api\/v1\/sync\/history\/:id?page=1&per_page=15",
                            "variable": [
                                {
                                    "id": "id",
                                    "key": "id",
                                    "value": "1",
                                    "description": "The campaign ID."
                                }
                            ]
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Retrieve the sync history for a specific campaign with details about each sync operation."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\n  \"success\": true,\n  \"data\": {\n    \"campaign_id\": 1,\n    \"campaign_name\": \"Web Development Services\",\n    \"sync_history\": [\n      {\n        \"id\": 1,\n        \"started_at\": \"2025-01-15T10:00:00.000000Z\",\n        \"completed_at\": \"2025-01-15T10:05:00.000000Z\",\n        \"status\": \"completed\",\n        \"leads_found\": 5,\n        \"errors\": null,\n        \"duration_seconds\": 300\n      }\n    ],\n    \"pagination\": {\n      \"current_page\": 1,\n      \"per_page\": 15,\n      \"total\": 50,\n      \"last_page\": 4\n    }\n  }\n}",
                            "name": ""
                        },
                        {
                            "header": [],
                            "code": 404,
                            "body": "{\n  \"success\": false,\n  \"message\": \"Campaign not found\"\n}",
                            "name": ""
                        }
                    ]
                },
                {
                    "name": "Get running sync for a campaign",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/sync\/campaign\/:campaignId\/running",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/sync\/campaign\/:campaignId\/running",
                            "variable": [
                                {
                                    "id": "campaignId",
                                    "key": "campaignId",
                                    "value": "1",
                                    "description": "The campaign ID."
                                }
                            ]
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Retrieve the currently running or queued sync for a specific campaign.\nReturns null if no sync is currently active."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\n  \"success\": true,\n  \"data\": {\n    \"sync_id\": 123,\n    \"campaign_id\": 1,\n    \"status\": \"running\",\n    \"sync_mode\": \"fast\",\n    \"started_at\": \"2025-01-15T12:00:00.000000Z\"\n  }\n}",
                            "name": ""
                        },
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\n  \"success\": true,\n  \"data\": null,\n  \"message\": \"No sync currently running for this campaign\"\n}",
                            "name": ""
                        },
                        {
                            "header": [],
                            "code": 404,
                            "body": "{\n  \"success\": false,\n  \"message\": \"Campaign not found\"\n}",
                            "name": ""
                        }
                    ]
                },
                {
                    "name": "Get sync details by ID",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/sync\/:syncId",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/sync\/:syncId",
                            "variable": [
                                {
                                    "id": "syncId",
                                    "key": "syncId",
                                    "value": "123",
                                    "description": "The sync history ID."
                                }
                            ]
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Retrieve detailed information about a specific sync operation by its sync history ID."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\n  \"success\": true,\n  \"data\": {\n    \"sync_id\": 123,\n    \"campaign_id\": 1,\n    \"campaign_name\": \"Web Development Services\",\n    \"status\": \"completed\",\n    \"sync_mode\": \"fast\",\n    \"sync_type\": \"manual\",\n    \"platform\": \"reddit\",\n    \"started_at\": \"2025-01-15T12:00:00.000000Z\",\n    \"completed_at\": \"2025-01-15T12:05:00.000000Z\",\n    \"posts_found\": 25,\n    \"leads_created\": 5,\n    \"error_message\": null,\n    \"metadata\": {\n      \"keywords_used\": [\"web development help\", \"need developer\"],\n      \"subreddits_searched\": [\"webdev\", \"forhire\"]\n    }\n  }\n}",
                            "name": ""
                        },
                        {
                            "header": [],
                            "code": 404,
                            "body": "{\n  \"success\": false,\n  \"message\": \"Sync not found\"\n}",
                            "name": ""
                        }
                    ]
                }
            ]
        }
    ],
    "auth": {
        "type": "apikey",
        "apikey": [
            {
                "key": "in",
                "value": "header",
                "type": "string"
            },
            {
                "key": "key",
                "value": "X-API-Key",
                "type": "string"
            }
        ]
    }
}