Beta. These endpoints are switched on per organization. While they are off for yours, each one answers
403 headless_off. Ask Finn support to turn them on.
Overview
Some steps need a person or a file: connecting an app, paying for a top-up, uploading a document, hearing a Finn on the phone, looking at a draft. These endpoints let an integration or an AI agent do those steps without the dashboard:
- Hand-offs answer a link for a person to open (connect an app, pay a top-up, sign up for WhatsApp), then let you poll the result.
- Uploads answer a storage URL to PUT a file to, then register the file where it belongs.
- Test calls ring a number with a Finn and return the transcript and a verdict.
- Previews answer a link a person can open to see an agent, a form or an email template.
They are the API behind the MCP server's get_handoff_status, get_upload_url, finish_upload, run_test_call, get_test_call and get_preview_link tools.
Base URL: https://api.hirefinn.ai/api/v1. See authentication and scopes.
Credential
Org API keys and member tokens (a personal MCP key or an AI app's OAuth access token) both work. Hand-offs and logo uploads need an org key or a member who is a workspace Owner or Admin; other members get 403 forbidden.
Hand-offs
| Method | Path | Scope | What it does |
|---|---|---|---|
GET | /handoffs | admin:read | List hand-offs. |
POST | /handoffs | admin:write | Start a hand-off link. |
GET | /handoffs/{handoff_id} | admin:read | Poll a hand-off. |
POST /handoffs takes a kind:
kind | Send | Link lasts | Poll |
|---|---|---|---|
connect | provider (a catalog key, such as hubspot) and an optional label, or connection_id to reconnect | 30 minutes | GET /handoffs/{handoff_id} shows the connection settle. |
checkout | credits (whole number) or amount_minor, not both, and an optional currency. Needs checkout links on too (403 headless_checkout_off otherwise). | 30 minutes | A link paid just before it lapsed is still credited when polled. |
whatsapp_signup | Nothing else | 24 hours | Not available yet (status_polling: "not_available"). |
The url is in the create answer only. It is never stored, and a replay with the same Idempotency-Key answers without it (url_returned: "once"). An open hand-off past its expiry reads as expired.
Uploads
| Method | Path | Scope | What it does |
|---|---|---|---|
POST | /uploads | crm:docs:write | Get an upload URL. |
GET | /uploads/{upload_id} | crm:read | Get an upload. |
POST | /uploads/{upload_id}/complete | crm:docs:write | Register an uploaded file. |
The scope follows the upload's purpose:
purpose | Scope | Files | target |
|---|---|---|---|
contact_file | crm:docs:write | Documents, images and spreadsheets | { contact_id } or { phone }, optional doc_type |
knowledge_document | finn:write | pdf, doc, docx, txt up to 25 MB | { finn_id } |
import_csv | crm:import | csv or xlsx up to 20 MB | None. Use the file with /crm/imports once it is uploaded. |
logo | admin:write | png, jpeg, gif, webp up to 2 MB | None. Org key or Owner or Admin only. |
PUT the bytes to upload_url with upload_headers within 10 minutes, then call POST /uploads/{upload_id}/complete. Finn checks the type and size and registers the file. Calling complete again on a completed upload answers the upload as it is.
Test calls
| Method | Path | Scope | What it does |
|---|---|---|---|
POST | /test_calls | voice:write | Ring a number with a Finn (test call). |
GET | /test_calls/{test_call_id} | voice:read | Get a test call. |
Before anything else, to_number is checked against your organization's test-call allow-list (422 destination_not_allowed) and the daily test-call cap (429 test_call_limit). Then the call is held for a person to approve (hold action test_call.create) unless your organization relaxed outward actions. An org key's call is held too, unless to_number is on the organization's verified list. A held call answers 202 with an approval_id; poll GET /approvals/{id}. See requests held for approval.
Poll GET /test_calls/{test_call_id} for the status, duration, transcript, post-call analysis and a verdict: connected, no_answer, failed or in_progress, with reasons.
Previews
| Method | Path | Scope | What it does |
|---|---|---|---|
POST | /previews | finn:read | Get a preview link. |
DELETE | /previews/{preview_id} | crm:read | Revoke a preview link. |
POST /previews takes a kind (agent, form or email_template) and an id, and needs that kind's read scope: finn:read for an agent, crm:read for the others. An agent with an active share link answers that link (via: "share_link"). Otherwise it is a signed link that lasts 10 minutes (via: "signed", with a preview_id). DELETE /previews/{preview_id} kills a signed link at once; its next open answers 410. Revoking a link that is already dead answers 200 with was_live: false. A member who isn't an Owner or Admin can revoke only their own previews.
Idempotency
POST /handoffs, POST /uploads, POST /uploads/{upload_id}/complete and POST /test_calls need an Idempotency-Key header (400 idempotency_key_required). POST /previews is a read and needs none. See idempotency.
Example: ring your phone with a Finn
curl -X POST https://api.hirefinn.ai/api/v1/test_calls \
-H "Authorization: Bearer $FINN_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: test-call-frontdesk-001" \
-d '{
"finn_id": "1b2c3d4e-5f6a-4b7c-8d9e-0f1a2b3c4d5e",
"to_number": "+919800000001"
}'
201 Created when the call starts:
{
"object": "test_call",
"id": "8e7d6c5b-4a3f-4e2d-9c1b-0a9f8e7d6c5b",
"status": "initiated",
"finn_id": "1b2c3d4e-5f6a-4b7c-8d9e-0f1a2b3c4d5e",
"to_number": "+919800000001",
"warnings": ["no goodbye step"]
}
202 Accepted when it is held: "status": "pending_approval" with approval_id, approve_url, expires_at and "action": "test_call.create". Nothing has rung yet.
| Field | Type | Required | Notes |
|---|---|---|---|
finn_id | string | Yes | The Finn to test. |
to_number | string | Yes | E.164. Must be on your test-call allow-list. |
from_number | string | No | One of your numbers. |
Rate limits
120 reads and 30 writes per minute per credential, across all endpoints on this page. See rate limits.
Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_request | A field isn't valid, for example kind, provider, credits, purpose, size_bytes or to_number. |
| 400 | idempotency_key_required | A create without an Idempotency-Key. |
| 401 | api_key_required, invalid_api_key | The credential is missing, unknown or revoked. |
| 403 | headless_off | These endpoints aren't turned on for your organization. |
| 403 | headless_checkout_off | A checkout hand-off while checkout links are off. |
| 403 | insufficient_scope | The credential lacks the scope. |
| 403 | forbidden | A hand-off or logo upload by a member below Owner or Admin. |
| 404 | handoff_not_found, upload_not_found, test_call_not_found, preview_not_found | No such item in your organization. |
| 404 | contact_not_found, finn_not_found | The target or finn_id isn't in your organization. |
| 409 | upload_expired, upload_closed | The upload can't be completed any more. Start a new one. |
| 409 | call_refused | The voice service refused the test call. |
| 422 | destination_not_allowed | to_number isn't one your organization may test-call. |
| 423 | ai_apps_paused | An admin paused all AI apps. Writes are refused; reads still work. |
| 429 | rate_limited, test_call_limit | Over the rate limit, or the daily test-call cap. |
| 503 | unavailable | The organization's settings couldn't be read, or this environment isn't ready for hand-offs and uploads. Try again shortly. |