API and automation
API organization resource reference
Reference the organization, projects, usage, and members endpoints.
Resource endpoints
| Method | Endpoint | Scope | Returns |
|---|---|---|---|
| GET | /api/v1/org | usage:read | Workspace identity, effective plan, balance, seats, member count. |
| GET | /api/v1/projects | projects:read | Paginated projects and task counts. |
| GET | /api/v1/usage | usage:read | Credit balance and spend grouped by member, day, and reason. |
| GET | /api/v1/members | members:read | Members, email, role, and joined time. |
Usage windows
GET /usage defaults to the current billing cycle. Pass days=30 or days=90 for a rolling window. total_spent comes from positive debit entries in the organization credit ledger; balance is the current organization credit balance.
Examplebash
curl 'https://trigcode.com/api/v1/usage?days=30' \
+ -H 'Authorization: Bearer tck_live_REPLACE_WITH_YOUR_KEY'Data handling
- Dates are JSON ISO timestamps.
- Plan is the current expiry-aware effective plan.
- Project and task list results include pagination metadata.
- Member responses contain workspace-visible identity fields; protect API keys accordingly.
- Unknown resources inside another organization return not found rather than crossing the tenant boundary.