> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get started

> Revor AI API v2 provides prospect discovery, public-web and contact search, customs trade data, Connect account lookup, and one-off outreach. Long-running operations use asynchronous jobs: submit a request, then retrieve its result through the unified jobs endpoint.

Revor AI API v2 provides prospect discovery, public-web and contact search, customs trade data, Connect account lookup, and one-off outreach. Long-running operations use asynchronous jobs: submit a request, then retrieve its result through the unified jobs endpoint.

## Make your first request

Create an API key on the [API keys page](https://revor.ai/my-api-keys), then check your credit balance to verify authentication and account status:

```bash cURL theme={null}
curl "https://revor.ai/api/v2/credits" \
  -H "Authorization: Bearer sk-revor-REPLACE_ME"
```

## Choose a capability

| Goal | Capability | Start here |
| - | - | - |
| Find companies or people from natural-language criteria | Prospect discovery | `POST /prospect-lists` |
| Search public-web information about a company | Public-web search | `POST /research/public-web` |
| Find contacts from an official company domain | Company-contact search | `POST /research/contacts` |
| Discover importers or exporters by product and country | Customs trade data | `POST /customs/companies/search` |
| Analyze imports, exports, counterparties, and trends for a known company | Customs trade data | `POST /customs/company-candidates` |
| Send Email, LinkedIn, or WhatsApp outreach | One-off outreach | Call `GET /connect/accounts` first |
| Find and like a relevant LinkedIn post | LinkedIn smart like | `POST /outreach/linkedin/post-likes` |

Current paths and fields use `websets` / `webset` for prospect discovery. A webset is a prospect list that is generated over time and can be read page by page; callers do not need to know its internal implementation.

## Base URL

```api theme={null}
https://revor.ai/api/v2
```

API v1 Connect and Outreach endpoints remain temporarily compatible. Both versions can use the same API key, but new integrations should use v2 paths and ensure the key has the corresponding permissions.

## Authentication

Use the `Authorization: Bearer` header:

```bash Bearer header theme={null}
curl "https://revor.ai/api/v2/credits" \
  -H "Authorization: Bearer sk-revor-REPLACE_ME"
```

You may also use `x-api-key`:

```bash x-api-key header theme={null}
curl "https://revor.ai/api/v2/credits" \
  -H "x-api-key: sk-revor-REPLACE_ME"
```

> [!WARNING]
>
> Never put an API key in a URL, frontend code, public repository, or log.

## Membership limits and concurrency

The API and MCP share account-wide allowances. Multiple API keys or protocols do not receive separate allowances.

Normal reads, job polling, data-task creation, and outreach actions have separate request limits. Credits, requests per minute, and active-job concurrency are independent controls. See [Rate limits, concurrency, and retries](/docs/api/v2/rate-limits.md) for plan limits, headers, errors, and retry behavior.

## Common response format

Successful responses contain `ok: true` and `request_id`. Lists generally return `items`; single resources and asynchronous jobs generally return `item`.

```json Success theme={null}
{
  "ok": true,
  "request_id": "req_xxx",
  "item": {}
}
```

```json Error theme={null}
{
  "ok": false,
  "error": {
    "code": "invalid_request",
    "message": "invalid_request",
    "request_id": "req_xxx"
  }
}
```

Error responses contain a stable public error code. Keep `request_id` when contacting support or troubleshooting.

## Idempotency keys

`Idempotency-Key` is an optional reliable-retry mechanism. Ordinary requests can omit it. If a caller may retry automatically after a network timeout, generate a unique value for the same business operation:

```http Idempotency-Key header theme={null}
Idempotency-Key: 2d1ed06a-4e63-4e36-9e88-53784bb61b0b
```

* Same path, key, and body: returns the first result without creating a duplicate job.
* Same path and key with a different body: returns `409`.
* Generate a new key for a genuinely new operation; reuse the original key after a network timeout.
* Without a key, every `POST` is independent. Duplicate submissions may create, run, and bill multiple jobs.

Exception: `POST /prospect-lists/{id}/expand` requires `Idempotency-Key` and returns `400 idempotency_key_required` when it is missing.

## Asynchronous jobs and Prefer wait

Research and customs endpoints normally return HTTP `202 Accepted`. Save `item.id`, then poll:

```http GET /api/v2/jobs/{id} theme={null}
GET /api/v2/jobs/{id}
```

To wait briefly during creation, include:

```http Prefer header theme={null}
Prefer: wait=20
```

If the job finishes during the wait window, the creation endpoint returns HTTP `200` with the terminal job. Otherwise it still returns HTTP `202`. A wait timeout does not mean the job failed; continue polling its ID.

> [!NOTE]
>
> A wait timeout does not mean the job failed. Continue polling the job ID.

### Job status versus business-resource status

Jobs and prospect lists have separate statuses:

```text theme={null}
POST /prospect-lists
  ├─ preparation_job: queued - running - succeeded
  └─ prospect list: generating_criteria - searching - verifying - completed
```

The job reports whether one asynchronous operation finished. The prospect-list status reports the stage of discovery. Therefore, `preparation_job.status=succeeded` only means the list started successfully, not that discovery is complete.

## Endpoint reference

| Capability | Method and path | Description |
| - | - | - |
| Connect | `GET /api/v2/connect/accounts` | List connected accounts available for outreach. |
| Outreach | `POST /api/v2/outreach/dispatches` | Send one Email, LinkedIn, or WhatsApp outreach action. |
| Outreach | `POST /api/v2/outreach/linkedin/post-likes` | Find and like one relevant LinkedIn post. |
| Credits | `GET /api/v2/credits` | Get currently available credits. |
| Prospect discovery | `GET /api/v2/prospect-lists` | Page through prospect lists. |
| Prospect discovery | `POST /api/v2/prospect-lists` | Create a company or person prospect list within plan limits. |
| Prospect discovery | `GET /api/v2/prospect-lists/{id}` | Get list-generation progress. |
| Prospect discovery | `GET /api/v2/prospect-lists/{id}/search-plan` | Get discovery criteria and search strategy. |
| Prospect discovery | `GET /api/v2/prospect-lists/{id}/prospects` | Page through matching companies or people. |
| Prospect discovery | `GET /api/v2/prospect-lists/{id}/prospects/stream` | Stream list status, strategy, and item changes. |
| Prospect discovery | `POST /api/v2/prospect-lists/{id}/expand` | Continue discovery on an existing list. |
| Prospect discovery | `GET /api/v2/prospect-lists/{id}/expand/stream` | Stream one specific Find More operation. |
| Jobs | `GET /api/v2/jobs/{id}` | Get outreach, research, customs, or list-preparation jobs. |
| Jobs | `POST /api/v2/jobs/{id}/cancel` | Cancel a job that has not started. |
| Research | `POST /api/v2/research/public-web` | Search public-web sources. |
| Search | `POST /api/v2/search/companies` | Discover company candidates with structured profiles and source evidence. |
| Search | `POST /api/v2/search/people` | Discover people candidates with professional profiles and source evidence. |
| Research | `POST /api/v2/research/contacts` | Search contacts by official company domain. |
| Customs | `POST /api/v2/customs/company-candidates` | Resolve queryable company-name candidates. |
| Customs | `POST /api/v2/customs/companies/search` | Discover importers or exporters by product, country, and date. |
| Customs | `POST /api/v2/customs/trade-reports` | Generate a complete trade report in one job. |
| Customs | `POST /api/v2/customs/counterparties` | Get major counterparties. |
| Customs | `POST /api/v2/customs/categories` | Get major product categories. |
| Customs | `POST /api/v2/customs/trends` | Get trade trends. |
| Customs | `POST /api/v2/customs/countries` | Get trade-country distribution. |

## Detailed documentation

> [card] [Credit balance](/docs/api/v2/credits.md)

> [card] [Rate limits, concurrency, and retries](/docs/api/v2/rate-limits.md)

> [card] [Connect accounts](/docs/api/v2/connect-accounts.md)

> [card] [Send one outreach message](/docs/api/v2/outreach-dispatches.md)

> [card] [Find and like a LinkedIn post](/docs/api/v2/linkedin-post-likes.md)

> [card] [Asynchronous jobs](/docs/api/v2/jobs.md)

> [card] [Prospect discovery](/docs/api/v2/targets.md)

> [card] [Create a prospect list](/docs/api/v2/websets-create.md)

> [card] [List prospect lists](/docs/api/v2/websets-list.md)

> [card] [Get a prospect list](/docs/api/v2/websets-detail.md)

> [card] [Get discovery criteria and strategy](/docs/api/v2/websets-strategy.md)

> [card] [List prospect items](/docs/api/v2/websets-items.md)

> [card] [Stream prospect items](/docs/api/v2/websets-items-stream.md)

> [card] [Find more prospects](/docs/api/v2/websets-find-more.md)

> [card] [Stream a Find More operation](/docs/api/v2/websets-find-more-stream.md)

> [card] [Public-web and company-contact search](/docs/api/v2/research.md)

> [card] [Company and people search](/docs/api/v2/search.md)

> [card] [Customs trade data](/docs/api/v2/customs.md)

## Country-code formats

Country-code length depends on the capability. `research.public-web` uses an ISO 3166-1 alpha-2 `user_location`, such as `US`. Every customs country filter uses ISO 3166-1 alpha-3, such as `USA`, `CHN`, or `RUS`. Do not interchange the two formats; a syntactically valid code of the wrong length will not express the intended filter.

## Recommended workflows

### One-off outreach

**1. Select an account**

Call `GET /connect/accounts?can_send=true` and select an `account_id`.

**2. Send the outreach**

Call `POST /outreach/dispatches` or the LinkedIn-like endpoint. Send `Idempotency-Key` when safe retries are needed.

**3. Poll the job**

Save `item.id` and poll `GET /jobs/{id}`.

**4. Read the result**

For `succeeded`, read `item.result`; for `failed`, read `item.error.code`.

### Prospect discovery

**1. Check credits**

Call `GET /credits` to confirm available credits.

**2. Create a prospect list**

Call `POST /prospect-lists`, then save `webset.id`.

**3. Get a snapshot**

Call `GET /prospect-lists/{id}/prospects?detail=compact&limit=10` for a snapshot and checkpoint.

**4. Stream results**

Open `GET /prospect-lists/{id}/prospects/stream`, apply item and state changes, and stop on `complete`.

> [!NOTE]
>
> `preparation_job.id` only confirms whether the list started; it does not mean prospect discovery is complete.

### Research and customs jobs

**1. Submit the creation request**

Submit the creation request, using `Idempotency-Key` if safe retries are needed.

**2. Save the job ID**

Read `item.id`.

**3. Poll if needed**

If `item.status` is not terminal, poll `GET /jobs/{id}`.

**4. Read the result**

On `succeeded`, read `item.result` and `item.billing`.

## Common errors

| HTTP | Code | Description |
| - | - | - |
| `400` | `invalid_request` / endpoint-specific code | Invalid request parameters. |
| `401` | `api_key_missing` | No API key was provided. |
| `401` | `api_key_invalid` | The API key is invalid. |
| `401` | `api_key_expired` | The API key has expired. |
| `401` | `api_key_revoked` | The API key was revoked. |
| `403` | `permission_denied` | The API key lacks permission. |
| `403` | `membership_tier_insufficient` / `webset_count_not_available_for_tier` | The capability or requested count is unavailable on the current plan. |
| `404` | `task_not_found` / `webset_not_found` | The resource does not exist or belongs to another user. |
| `409` | `idempotency_conflict` | The idempotency key was reused with another body. |
| `409` | `idempotency_key_in_progress` | The identical idempotent request is still being created. |
| `409` | `job_already_running` | The job has started and cannot be safely cancelled. |
| `413` | `request_payload_too_large` | The request body exceeds the endpoint limit. |
| `429` | `api_rate_limit_exceeded` | The shared account limit for this endpoint type was reached; wait for `Retry-After`. |
| `429` | `api_key_rate_limit_exceeded` | The API-key-level limit was reached. |
| `503` | `task_unavailable` | The job service is temporarily unavailable. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.