Beta. Off until Finn turns the Agency API on for your agency. Shapes can still change before general availability.
Overview
The Agency API lets an approved agency run its client workspaces from its own systems: list and create clients, pause and reactivate them, set usage limits across clients, push templates, and read usage per client (also as CSV, for billing your clients).
Base URL: https://api.hirefinn.ai/api/v1. Auth: Authorization: Bearer finn_live_.... See authentication and scopes.
Who can call it
- Only an approved agency's home workspace. Make the key in that workspace (Settings › Integrations › API keys, group "Agency"). The
agency:readandagency:writescopes are offered there and nowhere else. - Never a client workspace. A key made in a client workspace answers
403 agency_client_org, even with agency scopes. A client never manages its siblings. - Any other workspace answers
403 not_agency; an agency that is applied for, suspended or closed answers403 agency_not_approved. - The API is off by default for each agency (
403 agency_api_off). Ask Finn support to turn it on.
Endpoints
| Method | Path | Scope | Rate limit (per API key) |
|---|---|---|---|
GET | /agency | agency:read | 120 per minute, shared by all agency reads |
GET | /agency/clients | agency:read | Read bucket |
POST | /agency/clients | agency:write | 30 per minute, shared by all agency writes |
GET | /agency/clients/{client_id} | agency:read | Read bucket |
POST | /agency/clients/{client_id}/suspend | agency:write | Write bucket |
POST | /agency/clients/{client_id}/resume | agency:write | Write bucket |
GET | /agency/clients/{client_id}/limits | agency:read | Read bucket |
PUT | /agency/clients/{client_id}/limits | agency:write | Write bucket |
PATCH | /agency/clients/{client_id}/limits | agency:write | Write bucket |
GET | /agency/limits | agency:read | Read bucket |
PUT | /agency/limits | agency:write | Write bucket |
GET | /agency/usage | agency:read | Read bucket |
GET | /agency/templates | agency:read | Read bucket |
GET | /agency/template_pushes | agency:read | Read bucket |
POST | /agency/template_pushes | agency:write | Write bucket |
GET | /agency/template_pushes/{push_id} | agency:read | Read bucket |
GET | /agency/signups | agency:read | Read bucket |
POST | /agency/signups/{signup_id}/approve | agency:write | Write bucket |
POST | /agency/signups/{signup_id}/reject | agency:write | Write bucket |
Every write takes an Idempotency-Key header. See idempotency.
Clients and the client cap
POST /agency/clients takes name and owner_email, creates the client workspace and emails its first Owner an invite. It counts against your client cap, checked again under a lock, so two creates at once can never both take the last place. At the cap it answers 409 cap_reached. A client above your plan's included clients may be billed as an extra client place.
Closing a client is not in the API: do it in Settings › Agency.
Limits across clients
PUT /agency/limits sets the same limits on many clients at once: { "client_ids": "all" | [ids], "limits": { ... } }. The limit fields are max_agents, monthly_minutes and monthly_spend_minor; null removes a limit. The answer lists each client's result.
Usage
GET /agency/usage?month=YYYY-MM returns minutes, calls and spend per client for one UTC month. Add client_id for one client, and format=csv for a CSV with one row per client (the same file as Settings › Agency › Usage).
Sign-up requests
When your agency turns on sign-up requests (Settings › Agency), businesses can ask for a workspace at /join/request on your white-label domain. Each request waits as pending. approve creates the client exactly like POST /agency/clients (the sign-up email becomes its Owner); at the cap it answers 409 cap_reached and the request stays pending. reject takes an optional reason.
Errors
| Status | Code | Meaning |
|---|---|---|
403 | agency_api_off | The Agency API is not on for your agency. |
403 | agency_client_org | The key belongs to a client workspace. |
403 | not_agency | The workspace is not an agency's home workspace. |
403 | agency_not_approved | The agency is not approved (applied, suspended or closed). |
409 | cap_reached | You are at your client cap. |
409 | already_decided | Someone already approved or rejected this sign-up request. |
See errors for the shared codes.