# Lovelio API reference

Recruitment automation API. Create jobs, manage candidates, run ad-hoc actions, integrate with your tools.

Generated from the OpenAPI 3.1 document at https://lovelio.ai/api/v1/openapi.json.
API version 1.0.0. 182 paths, 266 operations.

This is the plain-markdown copy of the reference rendered at https://lovelio.ai/docs/api.

## Fetch less than all of this

| URL | What you get |
| --- | --- |
| `https://lovelio.ai/docs/api.md` | Everything: this header plus every operation in full. |
| `https://lovelio.ai/docs/api.md?index=1` | This header plus the endpoint index. No per-operation detail. |
| `https://lovelio.ai/docs/api.md?tag=Jobs` | This header plus one section in full. Comma-separate for several: `?tag=Jobs,Applications`. |
| `https://lovelio.ai/api/v1/openapi.json` | The machine-readable source this file is generated from. |

Tags: System, Accounts, Jobs, Job Ads, Candidates, Candidate Imports, Applications, Interviews, Submissions, Calls, Placements, Job Opportunities, Contractor Documents, Quotas, Opportunities, Marketplace, Webhooks, Batch, Activities, Documents, Tasks, Outreach, Talent Pools, Review Queue, Forms, Referees, Integrations, Chat Integrations, Analytics, Calendar, Scheduled Emails, Workflow Rules, Email Templates, Stages, Distribution, Candidate Evidence, Commands, Clients, Specs, Search.

## Base URL

Docs live on lovelio.ai. The API does not. Every workspace belongs to a region and an API key only works on its own region's host. Calling `lovelio.ai/api/v1/...` returns a JSON error naming all three hosts rather than data.

| Region | Base URL |
| --- | --- |
| Production (US (N. California)) | `https://us.lovelio.ai/api/v1` |
| Production (EU (London)) | `https://eu.lovelio.ai/api/v1` |
| Production (ANZ (Sydney)) | `https://anz.lovelio.ai/api/v1` |

A workspace's exact host is shown in Settings > API keys.

## Authentication

```http
Authorization: Bearer sk_live_...
```

API key, sent as Authorization: Bearer <key>. Three key types: sk_live_ (production), sk_test_ (development - same workspace, same data, marked as a test key; use a separate workspace if you need isolated test data), and sk_trial_ (issued at signup, expires 7 days later - swap to a live key from Settings > API keys). Keys are server-generated, shown once at creation, and scoped per permission (or admin for everything). The regional /api/mcp endpoint also accepts these keys through the Authorization header, with the same scopes and record access. Current key status and scopes are rechecked on every request. Lovelio Connect apps authenticate with the OAuth access token from the connect flow instead (Authorization: Bearer lc_at_...; personal MCP clients use mcp_at_...) - it carries exactly the scopes the agency approved, enforced on every request. Personal actions use the current membership role and record access; direct account administration requires an admin. Consultant OAuth scopes also follow the current agency rule. Additional scopes require fresh consent. Money is gated at FIELD level, not route level: the three scopes placements:financials:read, clients:financials:read and marketplace:financials:read unlock salary, fee, contract rates, expected GP, commission percents, the client fee schedule and split-fee deal amounts. Without them those fields return null and everything else on the record still comes through - a read never 403s for want of a money scope. admin satisfies all three. A key or connection that acts as a person also carries that person's money view: when their user type has "See everyone's billings and GP" switched off (Settings > Permissions), money fields come back null on every record that is not their own (a placement they own or share credit on, a job they own and its placements, their own listings and deals), totals count their own placements only, and a write to money on someone else's placement returns a validation error. A company key with no person behind it sees every figure its scopes allow. A fourth field gate, placements:contracting:read, unlocks the timesheet and payroll hand-off on a contract placement: the client's payment terms and how the contractor is paid (Australia: PAYG or ABN, and the ABN). Requesting any of them puts a Connect app in the elevated review tier. See /docs/agents/build-an-integration.

## Pagination and shared parameters

Paginated list endpoints declare the parameters they support below. For cursor-based lists, read `meta.next_cursor` from a response and pass it back as `after`. Bounded catalogue and configuration lists return their full result and do not take a cursor.

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `limit` | query | integer, 1-100, default 25 | Rows per page. Clamped to the 1-100 range rather than rejected, so asking for 500 returns 100 - read meta.has_more and page with the cursor. Unparseable values fall back to 25. |
| `after` | query | string | meta.next_cursor from the previous page, passed unchanged. Leave it out for the first page. A value Lovelio did not issue is a 422 VALIDATION_ERROR, never page 1 again. |
| `created_after` | query | string (date-time) | Only rows created at or after this ISO 8601 date or datetime (inclusive). Malformed values are a 422, never silently ignored. |
| `created_before` | query | string (date-time) | Only rows created at or before this ISO 8601 date or datetime (inclusive). Malformed values are a 422, never silently ignored. |
| `Idempotency-Key` | header | string | Unique key for one logical mutation, scoped to the account. Completed results expire after 24 hours; uncertain executions retain their safety reservation until reconciled. The key is claimed before side effects. Identical completed retries replay the saved response. Concurrent retries return 409 IDEMPOTENCY_IN_PROGRESS. Changed JSON, form fields, record ids, filenames, content types, or file bytes return 409 IDEMPOTENCY_KEY_REUSED. Random multipart boundaries do not affect matching. |

## Rate limit headers

| Header | Type | Description |
| --- | --- | --- |
| `X-RateLimit-Limit` | integer | Requests allowed per minute |
| `X-RateLimit-Remaining` | integer | Requests remaining in window |
| `X-RateLimit-Reset` | integer | Unix timestamp when window resets |
| `X-Idempotency-Operation-ID` | string (uuid) | Durable operation identity for replay or reconciliation. |

## Guides

- https://lovelio.ai/docs/agents - what an agent can drive end to end
- https://lovelio.ai/docs/agents/top-10-tasks - runnable examples for the ten most common calls
- https://lovelio.ai/docs/agents/build-an-integration - sandbox agency, test API key, live webhook testing
- https://lovelio.ai/docs/agents/error-handling - error envelope, request IDs, retries, idempotency keys
- https://lovelio.ai/docs/agents/webhooks - subscribing and verifying HMAC signatures
- https://lovelio.ai/docs/agents/sdks - single-file TypeScript and Python clients
- https://lovelio.ai/docs/api/changelog - public API release history
- https://lovelio.ai/llms-full.txt - all of the above inlined in one fetch

## Endpoint index

Filtered to: Job Opportunities.

### Job Opportunities

The roles and candidate leads a consultant works on Jobs > Opportunities before a job exists. Not the BD Opportunities below. Agents read them, add them, update them and log contact; only a person converts one to a job or accepts a suggested move.

- `GET /job-opportunities` - List job opportunities
- `GET /job-opportunities/{id}` - Get job opportunity

---

## Job Opportunities

The roles and candidate leads a consultant works on Jobs > Opportunities before a job exists. Not the BD Opportunities below. Agents read them, add them, update them and log contact; only a person converts one to a job or accepts a suggested move.

### GET /job-opportunities

**List job opportunities**

The roles and candidate leads being worked on Jobs > Opportunities, before a job exists. Not BD opportunities (/opportunities). Returns open ones by default, in the order to call them: the most overdue first, then the bigger possible fee. due=today answers "who should I call today". stage=lost or stage=parked lists the quiet ones, the latest first. Won ones are jobs now (GET /jobs), and each still reads by id. Read as the acting user: the same team scope as the tab, and possible_fee only on opportunities they may see money on. To change one, use the create_job_opportunity, update_job_opportunity and log_job_opportunity_contact actions through POST /batch. Converting to a job and settling a suggestion are pressed by a person in Lovelio; agents are refused. Requires jobs:read.

Operation ID: `listJobOpportunities`

Scopes: `jobs:read`

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `limit` | integer, 1-100, default 25 | no | Rows per page. Clamped to the 1-100 range rather than rejected, so asking for 500 returns 100 - read meta.has_more and page with the cursor. Unparseable values fall back to 25. |
| `after` | string | no | meta.next_cursor from the previous page, passed unchanged. Leave it out for the first page. A value Lovelio did not issue is a 422 VALIDATION_ERROR, never page 1 again. |
| `stage` | string (`new`, `talking`, `keen`, `terms`, `lost`, `parked`) | no |  |
| `kind` | string (`role`, `candidate`) | no |  |
| `due` | string (`today`, `week`, `new`, `later`) | no | When the next contact is due. today includes overdue ones. new: never contacted yet. |
| `client_id` | string | no | Filter by client (cli_). |
| `owner_id` | string | no | Filter by the consultant working it (usr_). |

**Responses**

| Code | Description | Body |
| --- | --- | --- |
| `200` | Paginated job opportunities | { success, data: array of JobOpportunity, meta } |
| `400` | Invalid request. Correct the named field or add the required Idempotency-Key. | Error |
| `401` | AUTHENTICATION_REQUIRED: supply the full key or token on the correct environment and region. The same code covers a credential that is no longer usable: a revoked key and an authorising user whose access an admin has paused. The message says which. | Error |
| `402` | PREMIUM_REQUIRED: the agency has no active plan, so the whole account is closed to people and agents alike until an admin signs in at lovelio.ai and turns it back on. Stop retrying and tell whoever runs the integration. | Error |
| `403` | Access refused. Check the error code and the required permissions. ACCOUNT_SUSPENDED means an admin at Lovelio has made the whole agency dark: nothing will work until that is lifted, and no credential change helps. CONNECTION_PENDING_APPROVAL means a consultant's connection is waiting for an admin at the agency to approve it: the credential is valid, so do not refresh or reconnect; the person gets an email when it is live. PERMISSION_DENIED with the message "This record belongs to someone else" means the credential acts for a consultant whose agency lets an assistant edit only that person's own candidates, jobs, clients and contacts (records with no owner are open): creating records, adding notes and reads still work, and an admin can change it in Settings > Integrations > AI assistants. | Error |
| `405` | METHOD_NOT_ALLOWED: use one of the methods in the Allow header. | Error |
| `422` | An unknown stage, kind or due, stage=won, a malformed client_id or owner_id, or a cursor whose opportunity has moved. | Error |
| `423` | RESTORE_IN_PROGRESS: the agency is being put back to an earlier time, which takes seconds. Nothing was written. Wait for the Retry-After header (60 seconds), then send the same request again. | Error |
| `429` | RATE_LIMIT_EXCEEDED: wait for Retry-After seconds before retrying. DAILY_LIMIT_REACHED: the key has accessed today's allowance of candidates. The allowance is set by the agency (200 a day by default for a key acting for a non-admin, and an agency can raise it, lower it, or choose to be told rather than stop); records already returned today do not count again, and the allowance resets with the person's day. | Error |
| `500` | INTERNAL_ERROR: retry with backoff. An idempotent POST must keep the same key. | Error |

### GET /job-opportunities/{id}

**Get job opportunity**

One job opportunity, Won ones included, with its waiting suggestion and its latest 20 timeline entries. Out of the acting user's scope reads as not found. Requires jobs:read.

Operation ID: `getJobOpportunity`

Scopes: `jobs:read`

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | yes | opp_ id. |

**Responses**

| Code | Description | Body |
| --- | --- | --- |
| `200` | The job opportunity | { success, data: JobOpportunity } |
| `400` | Invalid request. Correct the named field or add the required Idempotency-Key. | Error |
| `401` | AUTHENTICATION_REQUIRED: supply the full key or token on the correct environment and region. The same code covers a credential that is no longer usable: a revoked key and an authorising user whose access an admin has paused. The message says which. | Error |
| `402` | PREMIUM_REQUIRED: the agency has no active plan, so the whole account is closed to people and agents alike until an admin signs in at lovelio.ai and turns it back on. Stop retrying and tell whoever runs the integration. | Error |
| `403` | Access refused. Check the error code and the required permissions. ACCOUNT_SUSPENDED means an admin at Lovelio has made the whole agency dark: nothing will work until that is lifted, and no credential change helps. CONNECTION_PENDING_APPROVAL means a consultant's connection is waiting for an admin at the agency to approve it: the credential is valid, so do not refresh or reconnect; the person gets an email when it is live. PERMISSION_DENIED with the message "This record belongs to someone else" means the credential acts for a consultant whose agency lets an assistant edit only that person's own candidates, jobs, clients and contacts (records with no owner are open): creating records, adding notes and reads still work, and an admin can change it in Settings > Integrations > AI assistants. | Error |
| `404` | No such job opportunity, or not yours to see. | Error |
| `405` | METHOD_NOT_ALLOWED: use one of the methods in the Allow header. | Error |
| `423` | RESTORE_IN_PROGRESS: the agency is being put back to an earlier time, which takes seconds. Nothing was written. Wait for the Retry-After header (60 seconds), then send the same request again. | Error |
| `429` | RATE_LIMIT_EXCEEDED: wait for Retry-After seconds before retrying. DAILY_LIMIT_REACHED: the key has accessed today's allowance of candidates. The allowance is set by the agency (200 a day by default for a key acting for a non-admin, and an agency can raise it, lower it, or choose to be told rather than stop); records already returned today do not count again, and the allowance resets with the person's day. | Error |
| `500` | INTERNAL_ERROR: retry with backoff. An idempotent POST must keep the same key. | Error |

## Schemas

Objects referenced by the operations above.

### Error

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `success` | boolean (`false`) | yes |  |
| `data` | any | yes | Usually null. Some errors include structured recovery details, such as remaining draft fields. |
| `meta` | Meta | yes |  |
| `error` | object | yes |  |
| `error.code` | string | yes |  |
| `error.message` | string | yes |  |
| `error.field` | string | no |  |
| `error.docs` | string (uri) | yes |  |
| `error.request_id` | string | yes | Same request ID as meta.request_id. |

### JobOpportunity

A role or a candidate lead being worked on Jobs > Opportunities before a job exists. Not a BD opportunity (/opportunities). Lovelio never moves its stage by itself: it suggests a move with the evidence, and a person accepts it in Lovelio.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | no | opp_ id. |
| `kind` | string (`role`, `candidate`) | no | role: a client may have a job. candidate: a person to place, with a role in mind. |
| `title` | string | no | The role's title, or the person's name on a candidate opportunity. |
| `role_title` | string \| null | no | The role being worked towards. A candidate opportunity needs one before it can become a job. |
| `stage` | string (`new`, `talking`, `keen`, `terms`, `won`, `lost`, `parked`) | no | won means it became a job (converted_job_id). |
| `client` | object \| null | no |  |
| `client.id` | string | no | cli_ id. |
| `client.name` | string \| null | no |  |
| `contact` | object \| null | no | The person to call. |
| `contact.id` | string | no | cct_ id. |
| `contact.name` | string \| null | no |  |
| `contact.phone` | string \| null | no |  |
| `contact.email` | string \| null | no |  |
| `candidate_id` | string \| null | no | cnd_ id, on a candidate opportunity. |
| `owner_id` | string \| null | no | usr_ id of the consultant working it. |
| `salary_min` | number \| null | no |  |
| `salary_max` | number \| null | no |  |
| `currency` | string \| null | no |  |
| `possible_fee` | object \| null | no | Priced from the client's fee terms on every read. Requires the clients:financials:read scope - null without it. Null when there is no client, salary or terms to price it, and always null when money_hidden. |
| `possible_fee.amount` | number \| null | no |  |
| `possible_fee.percent` | number \| null | no |  |
| `possible_fee.basis_figure` | number \| null | no | The figure the percent is taken of. |
| `money_hidden` | boolean | no | True when the possible fee is withheld: the key lacks clients:financials:read, or the opportunity is someone else's and the acting user's user type sees only their own. |
| `source` | string (`manual`, `call`, `email`, `careers_watch`, `key_movement`, `float`, `agent`) | no |  |
| `source_detail` | string \| null | no |  |
| `last_contact_at` | string (date-time) \| null | no |  |
| `next_contact` | object \| null | no | When to make the next contact, in the agency's timezone. Null once Won, Lost or Parked. |
| `next_contact.due_on` | string (date) | no |  |
| `next_contact.section` | string (`today`, `week`, `new`, `later`) | no |  |
| `next_contact.days_until` | integer | no | Negative when overdue. |
| `reason_to_call` | string | no | The one fact to know before calling: what has happened since the last contact, else when that was. |
| `suggestion` | object \| null | no | A stage move real contact points at, waiting for a person to accept or dismiss it in Lovelio. Agents can read it; only a person settles it. |
| `suggestion.id` | string | no | opq_ id. |
| `suggestion.to_stage` | string (`talking`, `keen`, `terms`, `won`) | no | won means convert to a job. |
| `suggestion.label` | string | no | What accepting it does, for example Move to Keen. |
| `suggestion.quote` | string \| null | no | The contact's own words. |
| `suggestion.evidence` | string | no | The evidence in one line: the quote, or the call or email it came from. |
| `suggestion.said_by` | string \| null | no |  |
| `suggestion.said_at` | string (date-time) | no |  |
| `suggestion.source_type` | string (`email`, `call`, `logged_call`) | no |  |
| `suggestion.job` | string \| null | no | On a convert: the job it would open. |
| `suggestion.blocked` | string \| null | no | On a convert: what it still needs before a person can accept it. |
| `converted_job_id` | string \| null | no | job_ id, once Won. |
| `stage_changed_at` | string (date-time) | no |  |
| `created_at` | string (date-time) | no |  |

### Meta

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `request_id` | string | yes |  |
| `count` | integer | no |  |
| `has_more` | boolean | no |  |
| `next_cursor` | string \| null | no |  |
