You're a developer. You don't need another landing page. You want to see the API, understand the endpoints, and figure out if this thing actually works for your use case.
Here's that walkthrough. No fluff. Just the API, endpoints, and working code examples.
Authentication
Everything starts with your API key. You get it from the AgentLine dashboard after signing up. It starts with sk_live_.
Every request includes it in the Authorization header:
Authorization: Bearer sk_live_YOUR_KEY_HERE
Base URL for all endpoints: https://api.agentline.cloud
Your First Agent
Before you can make calls, you need an agent. An agent is the AI that handles conversations.
Create one:
curl -X POST https://api.agentline.cloud/v1/agents \ -H "Authorization: Bearer sk_live_YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "My First Agent", "system_prompt": "You are a helpful assistant. Keep responses brief and friendly.", "initial_greeting": "Hi there, how can I help?", "voice_id": "female-2" }'
Response includes your agent ID (agt_xxx). Save it.
Buying a Phone Number
Your agent needs a number. Provision one:
curl -X POST https://api.agentline.cloud/v1/numbers \ -H "Authorization: Bearer sk_live_YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{ "agent_id": "agt_YOUR_AGENT_ID", "country": "US", "number_type": "local" }'
Cost: $2.00 one-time. You get a number back immediately. This number can now make and receive calls and texts.
Making an Outbound Call
Now the good part. Making a call:
curl -X POST https://api.agentline.cloud/v1/calls \ -H "Authorization: Bearer sk_live_YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{ "agent_id": "agt_YOUR_AGENT_ID", "to_number": "+12125551234", "system_prompt": "You are calling to remind them about their appointment tomorrow at 2pm.", "initial_greeting": "Hi, this is a quick reminder about your appointment tomorrow. Do you have a minute?" }'
You'll get back a call ID (call_xxx). The call starts immediately. The AI agent handles the conversation.
Getting the Transcript
After a call completes, grab the transcript:
curl https://api.agentline.cloud/v1/calls/call_YOUR_CALL_ID/transcript \ -H "Authorization: Bearer sk_live_YOUR_KEY"
The response is an array of messages: {role: "agent" | "human", text: "...", timestamp: "..."}.
Checking for Inbound Calls
When someone calls your number, you'll want to know about it. Check the events mailbox:
curl https://api.agentline.cloud/v1/events \ -H "Authorization: Bearer sk_live_YOUR_KEY"
This returns any call.completed events you haven't seen yet. Each event includes the full transcript and call metadata. Events are consumed once: after you read them, they're gone. That's by design so you can poll without getting duplicates.
If you just want to check if there are events without consuming them:
curl https://api.agentline.cloud/v1/events/peek \ -H "Authorization: Bearer sk_live_YOUR_KEY"
Listing Your Calls
Get your call history:
curl "https://api.agentline.cloud/v1/calls?limit=20" \ -H "Authorization: Bearer sk_live_YOUR_KEY"
Filter by status:
curl "https://api.agentline.cloud/v1/calls?status=completed&limit=10" \ -H "Authorization: Bearer sk_live_YOUR_KEY"
Updating Your Agent
Change the system prompt, voice, or greeting anytime:
curl -X PATCH https://api.agentline.cloud/v1/agents/agt_YOUR_AGENT_ID \ -H "Authorization: Bearer sk_live_YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{ "system_prompt": "Updated prompt here", "voice_id": "female-1" }'
Changes take effect on the next call.
Checking Your Balance
Keep an eye on your credit:
curl https://api.agentline.cloud/v1/billing/balance \ -H "Authorization: Bearer sk_live_YOUR_KEY"
Returns your current balance, how many minutes you can afford, and the rate card.
Rate Card
- Outbound calls: $0.10/minute (billed per second)
- Inbound calls: $0.10/minute (billed per second)
- Phone numbers: $2.00/number (one-time)
Building a Real Integration
Here's a minimal Node.js example that makes a call and waits for the transcript:
```javascript const API_KEY = 'sk_live_YOUR_KEY'; const AGENT_ID = 'agt_YOUR_AGENT_ID'; const BASE = 'https://api.agentline.cloud';
async function callAndWait(number, prompt, greeting) { const headers = { 'Authorization': `Bearer ${API_KEY}`, 'Content-Type': 'application/json' };
// Make the call const callRes = await fetch(`${BASE}/v1/calls`, { method: 'POST', headers, body: JSON.stringify({ agent_id: AGENT_ID, to_number: number, system_prompt: prompt, initial_greeting: greeting }) });
const call = await callRes.json(); console.log(`Call started: ${call.call_id}`);
// Poll until completed let status = 'in_progress'; while (status !== 'completed') { await new Promise(r => setTimeout(r, 5000)); const statusRes = await fetch(`${BASE}/v1/calls/${call.call_id}`, { headers }); const callStatus = await statusRes.json(); status = callStatus.status; }
// Get transcript const transcriptRes = await fetch(`${BASE}/v1/calls/${call.call_id}/transcript`, { headers }); const transcript = await transcriptRes.json(); return transcript; } ```
Resources
- Full API docs: agentline.cloud/docs
- Skill file: agentline.cloud/skill.md
- Dashboard: agentline.cloud/dashboard
That's the API. Simple enough to use from curl, powerful enough to build a real phone system on top of. If you can make HTTP requests, you can build with AgentLine.
Start at agentline.cloud.