Get Recent Leads

Retrieve the 5 most recent leads for providing sample data in the Zap Editor. Returns formatted lead data including contact information and status.

GET
/api/webhooks/zapier/leads

Authorization

bearerAuth
AuthorizationBearer <token>

Bearer token authentication for Zapier API access

In: header

Query Parameters

org_id*string

Organization ID

user_id*string

User ID

Response Body

application/json

application/json

application/json

curl -X GET "https://webhooks.sophiie.ai/api/webhooks/zapier/leads?org_id=org_1234&user_id=usr_1234"
[
  {
    "id": "123 - 2023-01-01T00:00:00.000Z",
    "originalId": "123",
    "firstName": "John",
    "lastName": "Doe",
    "email": "john.doe@example.com",
    "phone": "+1234567890",
    "suburb": "Downtown",
    "businessName": "Acme Corp",
    "address": "123 Main St, Downtown, NY 10001",
    "status": "active",
    "createdAt": "2023-01-01T00:00:00.000Z",
    "updatedAt": "2023-01-01T00:00:00.000Z"
  }
]
{
  "success": false,
  "message": "invalid_token",
  "error": {
    "status": 401,
    "message": "invalid_token"
  }
}
{
  "success": false,
  "message": "Oops! Something went wrong",
  "error": {
    "status": 500,
    "message": "Oops! Something went wrong"
  }
}