Skip to main content

API Quickstart

This guide walks you through making your first authenticated API call. By the end, you will have listed your workflows, created a contact, and retrieved conversations — all from the command line.

Prerequisites

  • An Agentix account (sign up)
  • A workspace with at least one workflow
  • cURL installed on your machine (pre-installed on macOS and most Linux distributions)
1
Authenticate
2
Sign in and save your session cookie to a file:
3
curl -X POST https://api.agentixx.io/api/auth/sign-in/email \
  -H "Content-Type: application/json" \
  -c cookies.txt \
  -d '{
    "email": "you@example.com",
    "password": "your-password"
  }'
4
You should receive a JSON response with your user details. The session cookie is saved to cookies.txt.
5
Set Your Workspace ID
6
Find your workspace ID in the dashboard URL (/app/[workspaceId]/overview) and export it as a variable:
7
export TENANT_ID="your-workspace-uuid"
8
List Your Workflows
9
Fetch all workflows in your workspace:
10
curl https://api.agentixx.io/api/workflows \
  -b cookies.txt \
  -H "x-tenant-id: $TENANT_ID"
11
Response:
12
{
  "items": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "Customer Support Bot",
      "status": "published"
    }
  ]
}
13
Create a Contact
14
Add a new contact to your workspace:
15
curl -X POST https://api.agentixx.io/api/contacts \
  -b cookies.txt \
  -H "x-tenant-id: $TENANT_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Jane Doe",
    "phone": "+14155551234"
  }'
16
Response:
17
{
  "id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
  "name": "Jane Doe",
  "phone": "+14155551234"
}
18
List Conversations
19
View recent conversations in your workspace:
20
curl "https://api.agentixx.io/api/conversations?limit=5" \
  -b cookies.txt \
  -H "x-tenant-id: $TENANT_ID"
21
Response:
22
{
  "items": [
    {
      "id": "...",
      "contactId": "...",
      "status": "active"
    }
  ],
  "total": 12
}
You have now made authenticated API calls to list workflows, create a contact, and retrieve conversations. Explore the full API Reference or check out more Code Examples.

Next Steps

Authentication Details

Learn about session lifecycle, brute force protection, and Node.js authentication.

Code Examples

cURL and Node.js examples for workflows, contacts, conversations, runs, and more.