{
  "info": {
    "_postman_id": "89f317ca-f71b-4df1-a04b-16e763879498",
    "name": "Leadping API",
    "description": "Runnable starter requests for Leadping's production REST API. See https://leadping.ai/docs/api-authentication before supplying credentials.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{accessToken}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://api.leadping.ai"
    },
    {
      "key": "accessToken",
      "value": ""
    },
    {
      "key": "sourceKey",
      "value": ""
    },
    {
      "key": "trustedFormUrl",
      "value": ""
    },
    {
      "key": "leadId",
      "value": ""
    }
  ],
  "item": [
    {
      "name": "Organization",
      "item": [
        {
          "name": "Get current organization",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/organizations/me",
              "host": ["{{baseUrl}}"],
              "path": ["organizations", "me"]
            },
            "description": "Returns the organization visible to the bearer token."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Leads",
      "item": [
        {
          "name": "List leads",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"pageSize\": 25,\n  \"includeCount\": true\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{baseUrl}}/leads/all/my",
              "host": ["{{baseUrl}}"],
              "path": ["leads", "all", "my"]
            },
            "description": "Lists organization leads using the cursor-based request model."
          },
          "response": []
        },
        {
          "name": "Get lead",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/leads/{{leadId}}",
              "host": ["{{baseUrl}}"],
              "path": ["leads", "{{leadId}}"]
            },
            "description": "Returns one organization lead by identifier."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Lead intake",
      "auth": {
        "type": "bearer",
        "bearer": [
          {
            "key": "token",
            "value": "{{sourceKey}}",
            "type": "string"
          }
        ]
      },
      "item": [
        {
          "name": "Create lead from intake payload",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"firstName\": \"Jordan\",\n  \"lastName\": \"Example\",\n  \"email\": \"jordan@example.com\",\n  \"phone\": \"+15555550123\",\n  \"trustedFormUrl\": \"{{trustedFormUrl}}\",\n  \"externalId\": \"partner-lead-88391\",\n  \"tagNames\": [\"Partner Website\"]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{baseUrl}}/leads/intake",
              "host": ["{{baseUrl}}"],
              "path": ["leads", "intake"]
            },
            "description": "Creates a lead with a source-scoped key. Use controlled test data and a real TrustedForm certificate."
          },
          "response": []
        }
      ]
    }
  ]
}
