Endpoints
| Method | Path | Description |
|---|---|---|
GET | /v1/clients | List all clients |
POST | /v1/clients | Create a client |
GET | /v1/clients/:id | Get a client |
PATCH | /v1/clients/:id | Update a client |
POST | /v1/clients/:id/invite | Send portal invite |
GET | /v1/clients/:id/projects | List client’s projects |
GET | /v1/clients/:id/invoices | List client’s invoices |
List Clients
GET /v1/clients
curl https://api.nextoriahub.com/v1/clients \
-H "Authorization: Bearer YOUR_API_KEY"
{
"data": [
{
"id": "client_xyz789",
"name": "Acme Corp",
"email": "hello@acmecorp.com",
"company": "Acme Corporation Inc.",
"portal_access": true,
"portal_last_seen": "2026-02-28T09:15:00Z",
"total_billed": 45000,
"outstanding_balance": 8500,
"active_projects": 2,
"created_at": "2025-06-01T00:00:00Z"
}
],
"meta": {
"total": 34,
"limit": 20
}
}
Create a Client
POST /v1/clients
{
"name": "Jane Doe",
"email": "jane@globexcorp.com",
"company": "Globex Corporation",
"phone": "+1 555 000 0000",
"address": {
"line1": "123 Main St",
"city": "Springfield",
"state": "IL",
"postal_code": "62701",
"country": "US"
},
"notes": "Primary contact for all Globex projects."
}
name, email
Response: 201 Created
Send Portal Invite
POST /v1/clients/:id/invite
{
"project_ids": ["proj_abc123", "proj_def456"],
"message": "Welcome to our client portal! You can track your projects and invoices here.",
"expires_at": "2026-06-01T00:00:00Z"
}
{
"invited": true,
"invite_sent_at": "2026-03-01T10:00:00Z",
"portal_url": "https://portal.youragency.com"
}
Client Object
interface Client {
id: string; // "client_xyz789"
name: string;
email: string;
company: string | null;
phone: string | null;
address: Address | null;
notes: string | null;
portal_access: boolean;
portal_last_seen: string | null;
total_billed: number; // Lifetime billed, in minor currency units
outstanding_balance: number;
active_projects: number;
created_at: string;
updated_at: string;
}
interface Address {
line1: string;
line2?: string;
city: string;
state: string;
postal_code: string;
country: string; // ISO 3166-1 alpha-2
}