{
  "info": {
    "name": "Door Knock Pro API",
    "description": "REST API for Door Knock Pro (DKP). Lets external systems read and write\nleads, appointments, territories, users, activity and knock history,\nand subscribe to outbound webhooks.\n\n## Authentication\n\nTwo-layer auth model:\n\n1. **API Key** (company-level) — sent as `X-Api-Key: dkp_...` on every request.\n   Identifies the company, enforces abilities, IP allowlist, and rate limits.\n\n2. **User Access Token** (per-user, optional) — sent as `Authorization: Bearer <token>`.\n   Obtained via `POST /v1/auth/login`. Identifies the specific user making the request.\n   Self-contained signed token (8h expiry, no server-side state).\n\n### Server-to-server mode\n\nIf no user token is provided, actions are attributed to a virtual\n\"service account\" (e.g. \"Zapier Integration\"). The API key alone is\nsufficient for server-to-server integrations.\n\n### Rate limits\n\n- 60 requests/minute per API key (company-level)\n- 100 requests/minute per user token (prevents one user from exhausting the company quota)\n\nAll endpoints are scoped to the company that owns the API key.\nCross-tenant access is impossible by design.\n",
    "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://app.doorknockpro.com/api",
      "type": "string"
    },
    {
      "key": "apiKey",
      "value": "",
      "type": "string"
    },
    {
      "key": "accessToken",
      "value": "",
      "type": "string"
    }
  ],
  "event": [
    {
      "listen": "prerequest",
      "script": {
        "type": "text/javascript",
        "exec": [
          "if (pm.variables.get(\"apiKey\")) {",
          "    pm.request.headers.add({ key: \"X-Api-Key\", value: pm.variables.get(\"apiKey\") });",
          "}"
        ]
      }
    }
  ],
  "item": [
    {
      "name": "Auth",
      "item": [
        {
          "name": "Authenticate a user (returns access token)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "disabled": false
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/auth/login",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "auth",
                "login"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{}\\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Authenticates a user within the company identified by the API key.\nReturns a short-lived access token (8h) to use on subsequent requests.\n"
          }
        },
        {
          "name": "Invalidate the current access token",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/auth/logout",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "auth",
                "logout"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Identity",
      "item": [
        {
          "name": "Get the authenticated user, company and current token",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/me",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "me"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Leads",
      "item": [
        {
          "name": "List leads",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/leads",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "leads"
              ]
            }
          }
        },
        {
          "name": "Create a lead",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "disabled": false
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/leads",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "leads"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{}\\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Show a lead",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/leads/{id}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "leads",
                ":id"
              ]
            }
          }
        },
        {
          "name": "Update a lead",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "disabled": false
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/leads/{id}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "leads",
                ":id"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{}\\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Soft-delete a lead",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/leads/{id}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "leads",
                ":id"
              ]
            }
          }
        },
        {
          "name": "Activity history for a single lead",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/leads/{id}/history",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "leads",
                ":id",
                "history"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Appointments",
      "item": [
        {
          "name": "List appointments",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/appointments",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "appointments"
              ]
            }
          }
        },
        {
          "name": "Create an appointment",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "disabled": false
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/appointments",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "appointments"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{}\\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Show an appointment",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/appointments/{id}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "appointments",
                ":id"
              ]
            }
          }
        },
        {
          "name": "Update an appointment",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "disabled": false
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/appointments/{id}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "appointments",
                ":id"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{}\\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Soft-delete an appointment",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/appointments/{id}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "appointments",
                ":id"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Territories",
      "item": [
        {
          "name": "List territories",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/territories",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "territories"
              ]
            }
          }
        },
        {
          "name": "Show a territory",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/territories/{id}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "territories",
                ":id"
              ]
            }
          }
        },
        {
          "name": "Search leads within a territory",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/territories/{id}/leads",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "territories",
                ":id",
                "leads"
              ]
            },
            "description": "Returns leads whose GPS coordinates fall inside the territory's boundary polygon. Supports optional filters."
          }
        }
      ]
    },
    {
      "name": "Users",
      "item": [
        {
          "name": "List company users / reps",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/users",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "users"
              ]
            }
          }
        },
        {
          "name": "Show a user",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/users/{id}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "users",
                ":id"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Lookups",
      "item": [
        {
          "name": "List teams",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/teams",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "teams"
              ]
            }
          }
        },
        {
          "name": "List configured lead statuses",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/lead-statuses",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "lead-statuses"
              ]
            }
          }
        },
        {
          "name": "List property types",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/property-types",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "property-types"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Webhooks",
      "item": [
        {
          "name": "List event types you can subscribe to",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/webhooks/events",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "webhooks",
                "events"
              ]
            }
          }
        },
        {
          "name": "List webhook endpoints",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/webhooks",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "webhooks"
              ]
            }
          }
        },
        {
          "name": "Create a webhook endpoint (signing secret is returned once)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "disabled": false
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/webhooks",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "webhooks"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{}\\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Show a webhook endpoint",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/webhooks/{id}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "webhooks",
                ":id"
              ]
            }
          }
        },
        {
          "name": "Update endpoint or rotate its signing secret",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "disabled": false
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/webhooks/{id}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "webhooks",
                ":id"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{}\\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Delete a webhook endpoint",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/webhooks/{id}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "webhooks",
                ":id"
              ]
            }
          }
        },
        {
          "name": "Queue a synthetic webhook.ping delivery",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/webhooks/{id}/test",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "webhooks",
                ":id",
                "test"
              ]
            }
          }
        },
        {
          "name": "List recent webhook delivery attempts",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/webhooks/deliveries",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "webhooks",
                "deliveries"
              ]
            }
          }
        },
        {
          "name": "Replay a delivery",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/webhooks/deliveries/{id}/replay",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "webhooks",
                "deliveries",
                ":id",
                "replay"
              ]
            }
          }
        }
      ]
    }
  ]
}