LemuAIDocs

Getting Started · 1 min read · For developers

Quickstart

Make your first LemuAI API calls in five minutes: create a key, add a contact, send an order event and start a call.

Open in ChatGPTOpen in ClaudeMarkdown

Everything goes to https://app.lemuai.com/api/v1 with your key in the X-API-Key header and JSON bodies. The examples below read the key from the LEMU_API_KEY environment variable.

1. Create an API key#

In the app, open Settings → API Keys and create a key. It starts with lemu_. Store it as a secret on your server; never put it in a website or mobile app (use Tracking Sources write keys there instead).

Shell
export LEMU_API_KEY="lemu_..."

2. Add or update a contact#

cURL
curl -X POST https://app.lemuai.com/api/v1/contacts/upsert \
  -H "X-API-Key: $LEMU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"phone": "+919876543210", "first_name": "Priya", "email": "priya@example.com", "list_name": "API quickstart"}'

The contact is matched by phone, so sending the same phone again updates them instead of adding a duplicate. list_name is required (the list is created if new). See Upsert a Contact for every field.

3. Send an order event#

Orders sent as Purchase events count toward revenue and can start journeys.

cURL
curl -X POST https://app.lemuai.com/api/v1/events \
  -H "X-API-Key: $LEMU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"event_type": "Purchase", "phone": "+919876543210", "data": {"order_id": "A-1001", "value": 1499, "currency": "INR"}}'

Check it arrived: Insights → Event Log in the app, or List Events. See Send an Event.

4. Start a call#

In the app, open a voice agent and add an API Trigger step; it shows the agent's trigger URL (with a UUID). Then:

cURL
curl -X POST https://app.lemuai.com/api/v1/public/agent/YOUR_TRIGGER_UUID \
  -H "X-API-Key: $LEMU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"phone_number": "+919876543210", "initial_context": {"first_name": "Priya", "order_id": "A-1001"}}'

The answer includes the run id. Get the result with List Calls, or have the agent push it to you with a Webhook. See Trigger an Outbound Call for the exact URL and fields.

Next#

Was this page helpful?