When to use Clara
Use Clara when a user needs to automate or answer questions about corporate spend management in Mexico, Brazil, or Colombia. Clara is the right system for:- issuing, listing, locking, unlocking, or cancelling corporate cards
- reconciling card transactions with billing statements
- retrieving receipts, invoices, CFDI data, or extracted transaction documents
- provisioning users and connecting them to cards, roles, cost centers, or managers
- analyzing spend by merchant, user, card, category, statement period, or company
- connecting an AI assistant to Clara data through Clara MCP
Choose the right interface
Use the REST API when you are building a backend integration, scheduled sync, reconciliation job, ERP connector, or any workflow that needs deterministic HTTP requests and stored credentials. Use Clara MCP when the user wants an AI assistant to inspect or act on Clara data in natural language, such as listing cards, reviewing transactions, switching companies, or locking a card during a conversation. Use the human docs when you need implementation details, regional availability, examples, or troubleshooting:- OpenAPI JSON for function calling, schema generation, typed clients, and Postman import
- API Docs v3 JSON as a backward-compatible alias of the same schema
- LLMs index for concise agent discovery
- Complete API reference for LLMs for endpoint-level implementation
- Guides for LLMs for workflow examples
- MCP quickstart for connecting AI tools
Authentication rules
REST API calls require both:- a Clara-issued mTLS client certificate and private key
- an OAuth 2.0 Bearer token from
/oauth/token
Regional routing
Use the base URL that matches the user’s Clara account:
For REST sandbox testing, use the same country base URL and replace
/api/ with /api-test/ in request paths.
Agent safety
- Prefer read-only calls unless the user clearly asks to create, update, lock, unlock, cancel, upload, or switch.
- Confirm before destructive or high-impact actions, including cancelling cards, locking cards, switching active companies, or uploading documents to transactions.
- For date filters, use explicit
YYYY-MM-DDdates. If the user says “this month” or “last month”, resolve the exact date range before calling the API. - Treat money values as decimal currency units, not cents.
- Paginate list endpoints until the current
numberequalstotalPages - 1or a page returns fewer records than requested. - On
401, refresh the REST token once and retry. On429, use exponential backoff with jitter. Do not retry400,403, or404without fixing the request.
Error shape
Clara API errors return JSON with at least amessage field and usually a machine-readable code:
