BORADocs
Build with AI

Build with AI

Integrating BORA Access can be as simple as pasting one prompt into your coding agent. The prompt explains the product, points to the docs and walks through the proof of concept flow, step by step.

The prompt

Paste this prompt into your coding agent (Claude Code, Cursor, Codex or any other that reads the web). The same text is in prompt.md.

prompt.md
# Integrate the BORA Access API

You will integrate the BORA API into my system. Follow these instructions.

## What BORA is

BORA authenticates people by the palm of the hand at transit turnstiles. The BORA Access device sits at the turnstile and recognizes the palm offline. It sends a signed Verdict over a USB cable to the operator's Validator Device. The Validator Device decides and opens the turnstile. The BORA API is the cloud part: it registers users, opens palm enrollment, stores passages for reconciliation and runs the Mailbox between BORA and the devices. All data in transit and at rest is encrypted.

There are two moments. Enrollment, once: the passenger already has an account in the operator's ABT app and ABT backend (account-based ticketing: accounts, balance and charging). The ABT backend creates the user in the BORA API and opens an enrollment; the ABT app shows the QR code or the short code; at the Enrollment Totem the passenger accepts the consent on screen and places the palms; the ABT backend checks the enrollment, and the palm reaches every BORA Access through the Mailbox. Every trip: BORA Access recognizes the palm offline and sends a signed Verdict over the USB cable to the Validator Device, which checks the account in the ABT backend and opens the turnstile; passages are reconciled with `GET /v1/verdicts`.

## Read before writing code

1. https://docs.bora.id/llms-full.txt: the complete reference in Markdown.
2. https://docs.bora.id/openapi.json: the OpenAPI 3.1 contract with the 12 proof of concept operations.

Follow the contract. Do not invent endpoints, fields or error codes.

## Connection

- Base URL: https://api.bora.id (coming soon). Until then, use the URL the BORA team gives you.
- Every partner request carries the header `Authorization: Bearer <API key>`.
- Read the key from the `BORA_API_KEY` environment variable. Never write the key in code.
- For tests, use the test key (`bora_test_...`).

## Flow to implement

1. Create the user: `POST /v1/subjects`, with the user's key in my system in `external_ref` (for example the account number) and, if available, the CPF in the optional `cpf` field.
2. Open the enrollment: `POST /v1/enrollment-sessions`. The ABT app shows the `qr_payload` as a QR code, or the `short_code` to type at the Enrollment Totem. The passenger accepts the consent on the Totem screen; it is recorded automatically. The `token` appears only in this response. Do not log it.
3. Check the enrollment: `GET /v1/enrollment-sessions/{session_id}` until `completed`. Also handle `expired`, `cancelled`, `failed` and `review`.
4. Mailbox: for each device (`GET /v1/devices`), fetch `GET /v1/devices/{device_id}/inbox?after_seq=<last delivered seq>` and deliver the records to the Validator Device as they came. Records coming back from the device go to `POST /v1/devices/{device_id}/outbox`, as received. Store the last delivered `seq` of each device.
5. List passages to reconcile: `GET /v1/verdicts`, with filters (`gate_id`, `device_id`, `from`, `to`, `reconciliation`). The signed proof of a passage is at `GET /v1/verdicts/{verdict_id}`.

## Rules

- `external_ref` follows my organization's format: numeric by default (digits only), my users' CPF, or a custom pattern agreed with BORA. If it is the CPF, look users up with `POST /v1/subjects/search`, never in the URL.
- The CPF has 11 digits only: no dots, dashes or spaces. Send it only in the request body (not in URLs, query strings or logs).
- On `429`, wait the seconds in the `Retry-After` header before retrying. On `5xx`, retry with growing waits.
- Errors come as `application/problem+json` with a stable `code`. Handle errors by `code`, never by the `detail` text.
- In tests, use only the test key. Never use a `bora_live_` key in tests.
- Ignore unknown fields in responses. The API only grows with new fields.
- Do not call the device endpoints (registration, gallery, Verdict upload). They are not for partners.

## Deliverables

- An API client with the operations of the flow, with timeouts and error handling by `code`.
- End to end tests of the flow with mocked responses built from the examples in `openapi.json`.
- A short summary of what was done and how to run it.

Docs for agents

The agent can learn the API on its own by reading these files. Nothing needs to be configured.

Install the skill

The bora-api skill teaches the API flow and rules to your coding agent. In Claude Code, install it with one command:

Terminal
mkdir -p ~/.claude/skills/bora-api && curl -fsSL https://docs.bora.id/skill.md -o ~/.claude/skills/bora-api/SKILL.md

Then just ask, for example: integrate the BORA API into my backend. The skill kicks in on its own when the request matches it.

Credentials

Today the BORA team issues the test API key (bora_test_...) on request. It is a test key: same API, with data separate from production.

Coming soon: a dashboard to create your own key, choose its scopes and revoke it whenever you want.

Keep the key in an environment variable (BORA_API_KEY). Never paste the key into the prompt or the code.

MCP coming soon

Coming soon. A BORA MCP server will let your agent query these docs and call the API with your test key straight from the conversation. Until then, use the prompt, llms-full.txt and the skill.

Go to website