Skip to content
Menu

DEVELOPER GUIDE / CORE API

A clear contract.
A useful result.

Authenticate once, discover the available data, review the cost, and retain the source context with the result.

Get started with your AI agent.

EXPLORE THE DOCS

From first call to delivery.

Read the guides by task, inspect operation parameters and errors, or download the OpenAPI schema (version 0.101.0). GET /v1/version names the release answering today.

OpenAPI 3.1 · JSON contract

CONNECT

Start with identity.

Send a bearer credential: a Clerk session token or an organisation API key. The API resolves the organisation from that credential.

Back to API overview

Authentication

Use the rewalto-core Clerk JWT template with audience rewalto-core-api, or an authorised rwk_ API key. Keep secrets on the server.

Environment

Configure REWALTO_CORE_API_URL for the environment you are connecting to. Pin the published @rewalto/client version supplied with that environment’s integration note.

Errors

Retain x-request-id when reporting a problem. Refresh an expired session before retrying. Never automatically repeat a timed-out write.

CONTRACT AT A GLANCE

The account and credit boundaries.

Core API paths
MethodPathPurpose
GET/v1/whoamiSigned-in identity and organisation
GET/v1/credits/balanceCurrent credit balances and expiry
GET/v1/credits/usageCredit ledger and delivery receipts
POST/v1/quotesReview the cost of a request
GET/v1/quotes/{id}Read an organisation’s quote
POST/v1/quotes/{id}/approveApprove a quote before a run

Endpoint availability follows the versioned contract for your connected environment. Quote approval reserves a ceiling; it is not itself proof that data was delivered.

Costs are explicit.
Context stays attached.

Before a run

Show a published rate or an approved quote. For recurring delivery, show both per-delivery and monthly costs.

After a result

Keep source and collection-date fields. Treat a missing field as unknown, and distinguish a collection timestamp from the publication date of a source.

Read llms.txt Guide: an API for India’s quick-commerce apps

FROM QUESTION TO WORKFLOW

Make each result useful beyond the page.

Build a research assistant

Give your agent named fields with source URLs so it can explain where an answer came from.

Connect an internal workflow

Use structured records in analysis or an application. Preserve units, dates and unknown values through the integration.

Keep human approval explicit

Show the quote before execution. Handle an uncertain write outcome without silently starting the same job twice.

BEFORE YOU BEGIN

A little more context.

Make scope, evidence and cost part of the same decision.

How do I authenticate?

Send a bearer credential in the Authorization header: a Clerk session token or an organisation API key beginning rwk_. The authentication guide covers sessions, keys and keeping secrets on the server.

How are reads priced?

In credits. A read with a published rate shows the rate first; a read with no rate shows a quote, and it runs only after you approve it. The credits and quotes guides explain both.

Where is the first call example?

In the guide to making your first request: configure the environment, then call GET /v1/whoami with your bearer token. It reads your identity and does not start a data run.

ONE DATA LAYER / MANY POSSIBILITIES

Connect your next workflow.