REST API Reference
Build integrations and custom applications with the Agency OS AI REST API.
Overview
The REST API allows programmatic access to all Agency OS AI features:
- Manage clients, projects, tasks, and invoices
- Track time entries
- Handle support tickets
- Automate workflows
Base URL
https://yoursite.com/wp-json/agency-os-ai/v1/
Authentication
All API requests require WordPress cookie authentication or a REST API nonce:
Headers:
Content-Type: application/json
X-WP-Nonce: {nonce}
Or with Cookie:
Cookie: wordpress_logged_in_{hash}={token}
Endpoints
Clients
List all clients. Params: status, search, page, per_page
Get single client.
Create client.
Update client.
Delete client.
Projects
List projects. Params: client_id, status, search
Get project tasks.
Create project.
Tasks
List tasks. Params: project_id, stage_id, assignee_id, priority, status
Update task.
Invoices
List invoices. Params: client_id, status, from_date, to_date
Create invoice from time entries.
Email invoice to client.
Time Entries
List time entries. Params: project_id, user_id, billable, from_date, to_date
Get unbilled entries. Params: client_id, project_id
Tickets
List tickets. Params: status, priority, client_id, assignee_id
Add reply to ticket.
Workflows
List workflows with stages.
Get workflow stages.
Response Format
All responses are JSON:
// Success
{
"success": true,
"data": { ... }
}
// Error
{
"success": false,
"message": "Error description",
"code": "error_code"
}
Rate Limits
API requests are limited to:
- Requests per minute: 100
- Requests per hour: 1000