API Endpoints
Complete reference for all Iverton AI API endpoints.
Clients
List Clients
GET /v1/clients
Query Parameters:
| Parameter | Type | Description |
|---|---|---|
| page | integer | Page number |
| limit | integer | Results per page (max 100) |
| status | string | Filter by status |
| search | string | Search by name |
Response:
{
"success": true,
"data": [
{
"id": "cli_123abc",
"name": "Acme Corp",
"email": "contact@acme.com",
"status": "active",
"created_at": "2024-01-15T10:30:00Z"
}
],
"meta": { "page": 1, "limit": 20, "total": 45 }
}
Get Client
GET /v1/clients/:id
Create Client
POST /v1/clients
Body:
{
"name": "New Client",
"email": "client@example.com",
"phone": "+1234567890",
"industry": "Technology"
}
Update Client
PATCH /v1/clients/:id
Delete Client
DELETE /v1/clients/:id
Contacts
List Contacts
GET /v1/contacts
Query Parameters:
| Parameter | Type | Description |
|---|---|---|
| client_id | string | Filter by client |
| tag | string | Filter by tag |
| status | string | Filter by status |
Get Contact
GET /v1/contacts/:id
Create Contact
POST /v1/contacts
Body:
{
"email": "john@example.com",
"first_name": "John",
"last_name": "Doe",
"phone": "+1234567890",
"client_id": "cli_123abc",
"tags": ["prospect", "newsletter"]
}
Update Contact
PATCH /v1/contacts/:id
Delete Contact
DELETE /v1/contacts/:id
Bulk Import
POST /v1/contacts/import
Body:
{
"client_id": "cli_123abc",
"contacts": [
{ "email": "user1@example.com", "first_name": "User", "last_name": "One" },
{ "email": "user2@example.com", "first_name": "User", "last_name": "Two" }
],
"update_existing": true
}
Campaigns
List Campaigns
GET /v1/campaigns
Get Campaign
GET /v1/campaigns/:id
Create Campaign
POST /v1/campaigns
Body:
{
"name": "Summer Sale",
"type": "email",
"client_id": "cli_123abc",
"subject": "Summer Sale - 50% Off!",
"content": "<html>...</html>",
"audience": {
"tags": ["customers"],
"filters": { "status": "active" }
},
"scheduled_at": "2024-06-01T09:00:00Z"
}
Update Campaign
PATCH /v1/campaigns/:id
Delete Campaign
DELETE /v1/campaigns/:id
Send Campaign
POST /v1/campaigns/:id/send
Get Campaign Stats
GET /v1/campaigns/:id/stats
Response:
{
"success": true,
"data": {
"sent": 5000,
"delivered": 4950,
"opened": 2100,
"clicked": 450,
"bounced": 50,
"unsubscribed": 12,
"open_rate": 42.4,
"click_rate": 9.1
}
}
Deals
List Deals
GET /v1/deals
Get Deal
GET /v1/deals/:id
Create Deal
POST /v1/deals
Body:
{
"name": "Enterprise Contract",
"value": 50000,
"currency": "USD",
"stage": "proposal",
"client_id": "cli_123abc",
"contact_id": "con_456def",
"expected_close": "2024-03-15"
}
Update Deal
PATCH /v1/deals/:id
Move Deal Stage
POST /v1/deals/:id/move
Body:
{
"stage": "negotiation"
}
Analytics
Get Overview
GET /v1/analytics/overview
Query Parameters:
| Parameter | Type | Description |
|---|---|---|
| client_id | string | Filter by client |
| start_date | string | Start date (ISO 8601) |
| end_date | string | End date (ISO 8601) |
Get Campaign Analytics
GET /v1/analytics/campaigns
Get Traffic Analytics
GET /v1/analytics/traffic
Get Revenue Analytics
GET /v1/analytics/revenue
AI Content
Generate Content
POST /v1/ai/generate
Body:
{
"type": "email",
"prompt": "Write a promotional email for our summer sale",
"tone": "professional",
"length": "medium",
"client_id": "cli_123abc"
}
Response:
{
"success": true,
"data": {
"content": "Subject: Summer Savings Await...",
"tokens_used": 350
}
}
Improve Content
POST /v1/ai/improve
Translate Content
POST /v1/ai/translate
Automations
List Automations
GET /v1/automations
Get Automation
GET /v1/automations/:id
Create Automation
POST /v1/automations
Update Automation
PATCH /v1/automations/:id
Activate Automation
POST /v1/automations/:id/activate
Pause Automation
POST /v1/automations/:id/pause
Next: Webhooks →