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"
}
}'
const response = await fetch('https://api.orwel.io/api/v1/leads', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
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'
}
})
});
const data = await response.json();
import requests
import json
headers = {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
payload = {
'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'
}
}
response = requests.post(
'https://api.orwel.io/api/v1/leads',
headers=headers,
data=json.dumps(payload)
)
data = response.json()
{
"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
}
}
Leads
Create Lead
Create a new lead in your workspace
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"
}
}'
const response = await fetch('https://api.orwel.io/api/v1/leads', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
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'
}
})
});
const data = await response.json();
import requests
import json
headers = {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
payload = {
'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'
}
}
response = requests.post(
'https://api.orwel.io/api/v1/leads',
headers=headers,
data=json.dumps(payload)
)
data = response.json()
{
"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
Associated visitor ID (UUID)
Lead code or identifier
Source of the lead (e.g., “website”, “referral”, “campaign”)
Custom properties as key-value pairs
Location data (city, country, etc.)
Associated identity ID (UUID)
Associated session ID (UUID)
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"
}
}'
const response = await fetch('https://api.orwel.io/api/v1/leads', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
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'
}
})
});
const data = await response.json();
import requests
import json
headers = {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
payload = {
'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'
}
}
response = requests.post(
'https://api.orwel.io/api/v1/leads',
headers=headers,
data=json.dumps(payload)
)
data = response.json()
{
"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
}
}
⌘I