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

GET /clients

List all clients. Params: status, search, page, per_page

GET /clients/{id}

Get single client.

POST /clients

Create client.

PUT /clients/{id}

Update client.

DELETE /clients/{id}

Delete client.

Projects

GET /projects

List projects. Params: client_id, status, search

GET /projects/{id}/tasks

Get project tasks.

POST /projects

Create project.

Tasks

GET /tasks

List tasks. Params: project_id, stage_id, assignee_id, priority, status

PUT /tasks/{id}

Update task.

Invoices

GET /invoices

List invoices. Params: client_id, status, from_date, to_date

POST /invoices/create-from-time-entries

Create invoice from time entries.

POST /invoices/{id}/send

Email invoice to client.

Time Entries

GET /time-entries

List time entries. Params: project_id, user_id, billable, from_date, to_date

GET /time-entries/unbilled

Get unbilled entries. Params: client_id, project_id

Tickets

GET /tickets

List tickets. Params: status, priority, client_id, assignee_id

POST /tickets/{id}/replies

Add reply to ticket.

Workflows

GET /workflows

List workflows with stages.

GET /workflows/{id}/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

Related Documentation