---
title: Build with AI
summary: Point Claude, Cursor or any agent at these docs, and the rules agents most often get wrong.
group: Get started
order: 50
---

Every page on this site exists twice: once for people, and once as plain Markdown for AI tools. An agent never needs to run JavaScript or scrape HTML to learn this API.

## The machine-readable files

| File | What it holds | Use it when |
| --- | --- | --- |
| [`/llms.txt`](https://apidocs.sequifi.com/llms.txt) | One line per guide and per endpoint, each linking to its Markdown page | An agent should find the right page itself. Start here. |
| [`/llms-full.txt`](https://apidocs.sequifi.com/llms-full.txt) | Every guide and every endpoint page in one file (about 280 KB) | You want the whole API in one context window. |
| [`/swagger.yaml`](https://apidocs.sequifi.com/swagger.yaml) | The OpenAPI 3.0 spec, the source of truth for paths, fields and examples | Generating a client, an MCP server or a Postman collection. |
| [`/openapi.json`](https://apidocs.sequifi.com/openapi.json) | The same spec as JSON | Your tool wants JSON. |
| `/reference/<operation>.md` | One endpoint: parameters, body fields, responses, a cURL example | An agent needs one endpoint in detail. |
| `/guides/<guide>.md` | One guide, like this one | An agent needs a workflow or the rules behind it. |

Every endpoint has a stable `operationId` (for example `upsertSales`, `listUsers`, `getUserEarnings`). Generated clients and MCP tools use it as the function or tool name, and its page lives at `/reference/` plus the id in kebab case: `upsertSales` is [`/reference/upsert-sales.md`](https://apidocs.sequifi.com/reference/upsert-sales.md).

On any endpoint page, **Use with AI** copies the page as Markdown or opens it in Claude or ChatGPT with a prompt that already points at it.

## A starter prompt

Paste this into Claude (or any assistant that can fetch URLs), then say what you want to build:

```
I'm integrating with the Sequifi API. Read https://apidocs.sequifi.com/llms.txt first,
then fetch the guide and endpoint pages it links to as you need them. The base URL is
https://marketplace-api.sequifi.com and every call uses "Authorization: Bearer <token>".
Before writing code that posts data, read the Conventions and Errors guides.
```

## Claude Code and other coding agents

Add one line to your project's `CLAUDE.md` (or `AGENTS.md`, `.cursorrules`):

```
Sequifi API docs: https://apidocs.sequifi.com/llms.txt (fetch the linked .md pages; the OpenAPI spec is /swagger.yaml).
```

Keep the token out of the prompt and out of the code. Put it in an environment variable, for example `SEQUIFI_TOKEN`, and have the agent read it from there. Every code sample on this site already does.

## Turning the API into agent tools

To give an agent the API as callable tools, generate an MCP server or a function-calling schema from `/openapi.json`. Most OpenAPI-to-MCP generators work directly from it. Two choices make the result much better:

- **Expose read endpoints first.** `GET` endpoints are safe to call freely. Add write endpoints (`POST`, `PUT`, `PATCH`) one at a time, and have the agent confirm with a person before it sends one: they change live payroll and sales data.
- **Keep the descriptions.** The endpoint descriptions carry the rules (idempotency, pacing, which fields are required per vertical). An agent that sees only parameter names will break them.

## Rules agents most often get wrong

These come from real integrations. Each one links to the page with the detail.

1. **A `200` or `201` from `POST /v1/sales` means queued, not done.** Sales process in the background, usually within minutes. Confirm with `GET /v1/sales/{pid}` before you report success. See [Posting Sales](https://apidocs.sequifi.com/guides/posting-sales.md).
2. **Send the complete sale every time.** An update that carries only the changed field can be rejected or blank out other fields once the merge window has passed. See [Posting Sales](https://apidocs.sequifi.com/guides/posting-sales.md).
3. **`pid` is the idempotency key.** Re-sending a record with the same `pid` updates that sale; it never creates a second one. Retrying a failed batch is safe.
4. **Pace writes.** No more than 30 `POST /v1/sales` requests a minute per company, one at a time, up to 200 records each. Everything else: 10 requests a second sustained. Back off on `429`.
5. **Field keys never change per vertical; only the labels your users see do.** `kw` is still `kw` for a pest company, even though their screen calls it something else. See [Vertical Labels](https://apidocs.sequifi.com/guides/vertical-labels.md).
6. **Page with `per_page`, and pull only what changed** (`updated_after` on sales and onboarding, `updated_since` on teams and documents) instead of fetching records one id at a time.
7. **Ids are per company.** A token only sees its own company's data, so an id from one company means nothing to another.
