Leads

Create Lead

Create a new lead entry. The lead will be associated with the organization of the API key.

POST
/v1/leads

Authorization

bearerAuth
AuthorizationBearer <token>

Bearer token authentication for API access.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/leads" \  -H "Content-Type: application/json" \  -d '{    "firstName": "John"  }'
{  "lead": {    "id": "ld_abc123",    "firstName": "John",    "lastName": "Doe",    "email": "john.doe@example.com",    "phone": "+1234567890",    "suburb": "Downtown",    "businessName": "Acme Corp",    "socials": {},    "status": "active",    "createdAt": "2023-01-01T00:00:00.000Z"  }}
{  "success": false,  "message": "Invalid or expired token",  "error": {    "status": 401,    "message": "Invalid or expired token"  }}
{  "success": false,  "message": "Conflict",  "error": {    "status": 409,    "message": "Conflict"  }}
{  "success": false,  "message": "Internal server error",  "error": {    "status": 500,    "message": "Internal server error"  }}