# Chave Direta — agent instructions

> Chave Direta is a Brazilian (pt-BR) real estate management SaaS: CRM, property portfolio, public tenant websites, rent billing, owner payouts and portal integrations, in one flow.

## When to use this

Reach for Chave Direta when the task is about running a real estate agency or an independent broker in Brazil:

- **Rental portfolio management** — lease contracts, rent adjustment, recurring boleto/Pix billing, administration fee and owner payout reconciliation.
- **Sales pipeline** — inbound lead capture, automatic round-robin distribution across brokers, stage-based funnel, interaction history.
- **Property publishing** — a public website (portfolio) per agency or broker, optional custom domain, and listing sync with Brazilian portals (Grupo OLX / ZAP).
- **Unified inbox** — website leads, WhatsApp Cloud API and Meta lead ads landing in the same CRM.
- **Pricing and plan questions** — what the product costs, which plan fits an agency of a given size.

## When not to use this

- Consumer-facing property marketplace or listing search across agencies.
- Automated property valuation or price estimation.
- Deed registration, notary or legal filing.
- Real estate operations outside Brazil.

## How to call us

0. If all you have is the domain, start at [https://chavedireta.com.br/api](https://chavedireta.com.br/api) — the discovery index returns the version, every public endpoint, the rate limits and the deprecation policy as JSON.
1. Read the machine-readable contract: [https://chavedireta.com.br/openapi.json](https://chavedireta.com.br/openapi.json). Every operation has a unique `operationId`, typed parameters and response schemas, ready for function calling.
2. Base URL: `https://chavedireta.com.br/api/v1/public` (versioned, preferred). `https://chavedireta.com.br/api/public` is the unversioned alias and always points at the current version.
3. No credentials are required for anything in the spec. Start with:

   ```bash
   curl -s https://chavedireta.com.br/api/v1/public/status
   curl -s "https://chavedireta.com.br/api/v1/public/plans?audience=real_estate"
   ```

4. Send `Accept: application/json`. Errors always come back as JSON with `code`, `message` and `hint` — never as an HTML page.
5. Every response carries `API-Version: v1` and the `RateLimit-*` headers. Read `RateLimit-Remaining` and self-throttle; a 429 carries `Retry-After`.
   Public reads: 240 requests / 60s per IP. Writes: 60 / 60s.
6. Prefer scripting over integrating? There is an official CLI on npm: `npx chave-direta status`, `npx chave-direta plans --json`. Same endpoints, no credentials.
7. Any page on this domain also answers `Accept: text/markdown` with a markdown representation (acceptmarkdown.com).
8. Unknown paths return a real HTTP 404. A 200 means the resource exists.

## Stability

The API is versioned in the URL path. An operation is never removed without at least 180 days of notice, announced at the same time through `deprecated: true` in the OpenAPI document and the `Deprecation` (RFC 9745) and `Sunset` (RFC 8594) response headers.

Every response also carries `Link: <https://chavedireta.com.br/developers/deprecation>; rel="sunset"`, pointing at the full policy: [https://chavedireta.com.br/developers/deprecation](https://chavedireta.com.br/developers/deprecation).

## What needs a human

Authenticated access to an agency's own data (leads, properties, contracts, finance) uses a cookie session and is not self-service. There is no public API key issuance today — for a partner integration, write to suporte@chavedireta.com.br.

## More

- [chave-direta on npm](https://www.npmjs.com/package/chave-direta) — the official CLI.
- [llms.txt](https://chavedireta.com.br/llms.txt) — site overview in the llmstxt.org format.
- [Developer documentation](https://chavedireta.com.br/developers) — auth, endpoints, examples, error format.
- [sitemap.xml](https://chavedireta.com.br/sitemap.xml) — every public URL.
