API Documentation
Integrate Livestock Runner with thousands of external apps via our Zapier-compatible REST API. Use API keys for authentication and automate your farm workflows.
All API requests must include your API key in the X-API-Key header.
X-API-Key: lr_live_your_api_key_here
Generate an API key from your Profile → API Keys section.
For Zapier integration, leave the Allowed Domains field empty when creating your API key.
https://livestockrunner.com/api/zapier
GET /api/zapier/me
Verify your API key works. Returns your user info.
Response 200
{
"id": 1,
"name": "Jane Farmer",
"email": "jane@example.com",
"farm_name": "Green Acres Farm"
}
Subscribe to events and receive real-time webhook notifications when things happen on your farm.
Available Events
| Event Key | Fires When |
|---|---|
animal.created | New animal added (cattle, dog, goat, poultry) |
litter.born | Litter birth date is set |
task.created | New farm task created |
task.completed | Farm task marked complete |
waitlist.new_entry | New waitlist signup |
transaction.created | New income or expense logged |
POST /api/zapier/subscribe
Subscribe to an event. The target_url will receive POST requests when the event fires.
Request Body
{
"target_url": "https://hooks.zapier.com/hooks/catch/123456/abcdef/",
"event": "litter.born"
}
Response 201
{
"id": 42
}
DELETE /api/zapier/subscribe/{id}
Remove a webhook subscription.
Response 204 No Content
GET /api/zapier/triggers/{event}
Returns recent items for the given event type, or sample data if no real data exists. Used by Zapier for deduplication and the Zap editor preview.
Response 200
[
{
"id": 1,
"event": "litter.born",
"name": "Luna x Rex Spring 2026",
"status": "born",
"birth_date": "2026-02-15",
"actual_count": 6,
...
}
]
Create data in Livestock Runner from external apps and automations.
POST /api/zapier/actions/tasks
Create a farm task.
Request Body
{
"title": "Vaccinate new calves",
"type": "health",
"due_date": "2026-03-01",
"priority": "high",
"description": "Spring vaccination round"
}
Response 201
{
"id": 15,
"title": "Vaccinate new calves",
"type": "health",
"due_date": "2026-03-01",
"priority": "high",
"status": "pending",
...
}
POST /api/zapier/actions/transactions
Log an income or expense transaction.
Request Body
{
"type": "income",
"amount": 500.00,
"transaction_category_id": 3,
"transaction_date": "2026-02-27",
"description": "Sold 2 goats",
"payee_payer": "John Doe",
"notes": "Cash payment"
}
Response 201
{
"id": 22,
"type": "income",
"amount": 500.00,
"description": "Sold 2 goats",
...
}
These endpoints return dynamic dropdown values for building Zapier integrations.
| Method | Endpoint | Returns |
|---|---|---|
| GET | /api/zapier/event-types |
Available trigger event types |
| GET | /api/zapier/animal-types |
Supported animal types |
| GET | /api/zapier/task-types |
Available task types |
| GET | /api/zapier/categories |
Your transaction categories |
| Status | Meaning |
|---|---|
401 | Missing or invalid API key |
403 | Zapier not enabled for your account, or free plan restriction |
404 | Resource not found |
422 | Validation error (check response body for details) |
503 | Zapier integration is globally disabled |
All error responses include an "error" field with a human-readable message.
- Zapier integration requires a Starter plan ($79/year) or above.
- Your account admin must enable Zapier integration in Admin Settings.
- API keys used for Zapier should have the Allowed Domains field left empty.