Quickstart | Orwel Docs
Docs

Quickstart

Start using Orwel in about 2 minutes: set it up with AI, or call the API directly.

There are two ways to get going: let an AI assistant wire Orwel for you from a prompt (the fastest path, and where most setups are headed), or work with the API directly.

Set up with AI

Install the Orwel agent skill once. Your assistant (e.g. Claude Code) then knows the whole SDK (install, init, tracking and conversions) and writes correct code from a plain-language prompt.

bash
npx skills add hyperlabs-ai/hyper-skills/orwel

Then just describe what you want. A few examples:

Add Orwel tracking to this project. Key: orwel_pk_xxxxxxxxxxxxxxxx

The skill follows Rule 0 (it reads the key from an environment variable per framework and never hardcodes it) and knows the SDK's validation rules, so generated calls are correct and safe by default. Details on the AI Skill page.

Prefer to wire it by hand? Follow the SDK guide for manual installation and initialization.

Get Your API Key

Your site sends data with the production API key (orwel_pk_...), which the SDK uses. To call the REST API you need an API key (orwel_sk_...), which can read data.

  1. Open Settings, API keys

    Go to your workspace settings in the Orwel dashboard and open API keys.

  2. Create an API key

    Name it, choose the scopes it needs (for example leads:read), and choose server only unless a browser app will call the API from an allowed origin.

  3. Store it securely

    Copy the key (it is shown once) and keep it in an environment variable or a secret manager.

API keys read customer data. Never commit them to version control or ship them in public client side code. See API keys and authentication.

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 orwel_sk_YOUR_KEY"

Response Format

All successful responses follow this structure:

json
{
  "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
  }
}

Response Headers

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 orwel_sk_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "user@example.com",
    "name": "John Doe",
    "traits": {
      "plan": "enterprise",
      "company": "Acme Corp"
    }
  }'

Next Steps