Skip to main content
POST
/
api
/
v1
/
leads
curl -X POST "https://api.orwel.io/api/v1/leads" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "visitor_id": "660e8400-e29b-41d4-a716-446655440001",
    "code": "lead_002",
    "source": "website",
    "properties": {
      "industry": "fintech",
      "company_size": "100-500"
    },
    "location": {
      "city": "New York",
      "country": "USA"
    }
  }'
{
  "data": {
    "id": "bb0e8400-e29b-41d4-a716-446655440006",
    "visitor_id": "660e8400-e29b-41d4-a716-446655440001",
    "workspace_id": "770e8400-e29b-41d4-a716-446655440002",
    "code": "lead_002",
    "source": "website",
    "created_at": "2025-01-15T14:30:00Z",
    "updated_at": "2025-01-15T14:30:00Z",
    "properties": {
      "industry": "fintech",
      "company_size": "100-500"
    },
    "location": {
      "city": "New York",
      "country": "USA"
    },
    "identity_id": null,
    "session_id": null,
    "summary": null,
    "company_id": null
  }
}

Request Body

visitor_id
string
Associated visitor ID (UUID)
code
string
Lead code or identifier
source
string
Source of the lead (e.g., “website”, “referral”, “campaign”)
properties
object
Custom properties as key-value pairs
location
object
Location data (city, country, etc.)
identity_id
string
Associated identity ID (UUID)
session_id
string
Associated session ID (UUID)
company_id
string
Associated company ID (UUID)
curl -X POST "https://api.orwel.io/api/v1/leads" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "visitor_id": "660e8400-e29b-41d4-a716-446655440001",
    "code": "lead_002",
    "source": "website",
    "properties": {
      "industry": "fintech",
      "company_size": "100-500"
    },
    "location": {
      "city": "New York",
      "country": "USA"
    }
  }'
{
  "data": {
    "id": "bb0e8400-e29b-41d4-a716-446655440006",
    "visitor_id": "660e8400-e29b-41d4-a716-446655440001",
    "workspace_id": "770e8400-e29b-41d4-a716-446655440002",
    "code": "lead_002",
    "source": "website",
    "created_at": "2025-01-15T14:30:00Z",
    "updated_at": "2025-01-15T14:30:00Z",
    "properties": {
      "industry": "fintech",
      "company_size": "100-500"
    },
    "location": {
      "city": "New York",
      "country": "USA"
    },
    "identity_id": null,
    "session_id": null,
    "summary": null,
    "company_id": null
  }
}