# API reference (/developers/api-reference)

> Conventions shared by every Luso8 REST endpoint, and an index of the resources you can work with.

> **Preview:** The reference below is generated from the Luso8 OpenAPI schema. Endpoints and fields may still change before general availability; breaking changes will be announced in advance.

The Luso8 REST API is organized around resources such as contacts, deals and tickets. It uses standard HTTP methods, JSON request and response bodies, and conventional status codes. Browse the sidebar for every endpoint, with parameters, response schemas and an interactive playground.

## Base URL [#base-url]

```text
https://api.luso8.rexplore.ai/api/v1
```

All paths in the reference are absolute, for example `GET /api/v1/contacts`.

## Authentication [#authentication]

Send a workspace API key as a bearer token or in `X-API-Key`. See [Authentication](/developers/authentication).

```bash
curl https://api.luso8.rexplore.ai/api/v1/tickets \
  -H "Authorization: Bearer $LUSO8_API_KEY"
```

Each endpoint lists its **required scope**, for example `tickets:read` for `GET` requests and `tickets:write` for everything else. A key without it receives `403 Missing scope: tickets:write`.

## Requests and responses [#requests-and-responses]

| Convention | Details |
| --- | --- |
| Content type | Send `Content-Type: application/json` with request bodies. Responses are JSON unless stated otherwise (for example, report exports return PDF). |
| IDs | Resource IDs are opaque strings. Store them as strings and do not parse them. |
| Timestamps | ISO 8601 in UTC, for example `2026-11-22T14:05:31.120Z`. |
| Nulls | Optional fields that have no value are returned as `null`. |
| Updates | `PUT` and `PATCH` accept partial bodies; fields you omit keep their current value. |

## Pagination [#pagination]

List endpoints use offset pagination with two query parameters:

| Parameter | Description |
| --- | --- |
| `skip` | Number of records to skip. Defaults to `0`. |
| `limit` | Maximum number of records to return. The default depends on the endpoint, for example `100` for contacts and `50` for deals and tickets. |

Fetch pages until a response returns fewer records than `limit`:

```js title="paginate.js"
async function* listAll(path, pageSize = 100) {
  for (let skip = 0; ; skip += pageSize) {
    const url = new URL(`https://api.luso8.rexplore.ai/api/v1${path}`);
    url.searchParams.set('skip', String(skip));
    url.searchParams.set('limit', String(pageSize));
    const res = await fetch(url, { headers: { Authorization: `Bearer ${process.env.LUSO8_API_KEY}` } });
    if (!res.ok) throw new Error(`HTTP ${res.status}`);
    const page = await res.json();
    yield* page;
    if (page.length < pageSize) return;
  }
}

for await (const contact of listAll('/contacts')) console.log(contact.id);
```

Some endpoints wrap results in an object with the items and a total, such as tickets. The response schema of each endpoint shows its exact shape.

## Resources [#resources]

| Resource | Scope | What it covers |
| --- | --- | --- |
| Contacts | `contacts` | People in your CRM, with custom fields |
| Companies | `companies` | Organizations your contacts belong to |
| Deals | `deals` | Deals, prospects, customers, products and pipeline summaries |
| Leads | `leads` | Qualified leads, and AI lead search runs |
| Lists | `lists` | Static lists of contacts for campaigns and dialing |
| Campaigns | `campaigns` | Multi-step, multi-channel sequences, enrollment and analytics |
| Conversations | `conversations` | Inbox and support conversations and messages across every channel |
| Calls | `calls` | Call logs, recordings, performance and scheduled calls |
| Appointments | `appointments` | Meetings and bookings on your team's calendars |
| Tickets | `tickets` | Customer issues and their comments |
| Agents | `agents` | AI agents, voice agents and their conversations |
| Knowledge | `knowledge` | Knowledge base folders, documents and semantic search |
| Workflows | `workflows` | Event-driven AI workflows, triggers and runs |
| Reports | `reports` | Workspace metrics, activity and PDF exports |

## OpenAPI schema [#openapi-schema]

Download the schema to generate a client, or import it into Postman or Insomnia:

```bash
curl -o luso8.json https://docs.rexplore.ai/openapi/luso8.json
```

## Related [#related]

<LinkGrid>
<LinkItem href="/developers/rate-limits" title="Rate limits">
600 requests per minute per key.
</LinkItem>

<LinkItem href="/developers/errors" title="Errors">
Status codes and error bodies.
</LinkItem>

<LinkItem href="/developers/api-keys" title="API keys">
Scopes and key management.
</LinkItem>

<LinkItem href="/developers/guides/sync-contacts" title="Sync contacts from your app">
A complete example.
</LinkItem>
</LinkGrid>