Get Your API Key
First, you need to obtain your API key from the Orwel dashboard.
Navigate to Settings
Go to your workspace settings in the Orwel dashboard
Generate API Key
Click on “API Keys” and generate a new key. You can create both production and development keys.
Store Securely
Copy your API key and store it securely. Never expose it in client-side code.
API keys are sensitive credentials. Never commit them to version control or expose them in client-side code.
Make Your First Request
Let’s fetch your workspace leads using cURL:
curl -X GET "https://api.orwel.io/api/v1/leads?limit=10" \
-H "Authorization: Bearer YOUR_API_KEY"
All successful responses follow this structure:
{
"data": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"visitor_id": "660e8400-e29b-41d4-a716-446655440001",
"workspace_id": "770e8400-e29b-41d4-a716-446655440002",
"code": "lead_001",
"source": "website",
"created_at": "2025-01-15T10:30:00Z",
"properties": {
"industry": "technology"
}
}
],
"pagination": {
"limit": 10,
"offset": 0,
"total": 150
}
}
Every response includes useful headers:
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1642252800
X-Workspace-Id: 770e8400-e29b-41d4-a716-446655440002
Create a Resource
Let’s create a new visitor identity:
curl -X POST "https://api.orwel.io/api/v1/identities" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"name": "John Doe",
"traits": {
"plan": "enterprise",
"company": "Acme Corp"
}
}'
Next Steps
Authentication
Learn about API key types and security
API Reference
Explore all available endpoints
Rate Limiting
Understand rate limits
Error Handling
Handle errors gracefully