Skip to content

Tools

SDKs

One official client, for TypeScript, and it is generated from the same specification this documentation is. Every other language calls the API over plain HTTP or generates its own client.

TypeScript

Install
npm install cresva
Usage
import { Cresva } from "cresva"; const cresva = new Cresva({ bearerAuth: process.env.CRESVA_API_KEY }); // Note the casing: the wire is snake_case, the client is camelCase.const { data, totals } = await cresva.v1.getMetrics({  brandId: "brd_8Kq2mR4xVn",  dateFrom: "2026-07-01",  dateTo: "2026-07-31",  level: "campaign",});

Illustrative ids and dates.

The client is GENERATED from /v1/openapi.json, which is itself generated from the schemas the API validates every request against. It cannot describe an endpoint we do not serve, and it cannot drift from these pages, because all three are build outputs of one definition.

Casing differs between the wire and the client

Requests on the wire use date_from. The generated client exposes dateFrom and does the mapping internally. Both are correct in their own place; mixing them is the one mistake worth warning about.

Python

There is no Python client. Use plain HTTP, or generate a client from the specification. Both are shown below.

There is no package to install

A package named cresva does resolve on PyPI. It is a name RESERVATION, held so nobody else could take it, and every attribute access on it raises NotImplementedError. Installing it succeeds and then fails at first use, which is worse than a name that 404s: the failure lands in your code rather than in your terminal.
Plain HTTP
import os, requests BASE = "https://api.cresva.ai/v1"headers = {"Authorization": f"Bearer {os.environ['CRESVA_API_KEY']}"} def get(path, **params):    r = requests.get(f"{BASE}{path}", headers=headers, params=params)    if r.status_code == 409:        return None            # data_not_ready, not an error    r.raise_for_status()    return r.json() brands = get("/brands")["data"]metrics = get(    "/metrics",    brand_id=brands[0]["id"],    date_from="2026-07-01",    date_to="2026-07-31",    level="campaign",)

Any other language

The specification is a normal OpenAPI 3 document. Point a generator at it and you get a typed client without waiting for us to publish one.

Generate
# Any language with an OpenAPI generator. Python shown.curl https://api.cresva.ai/v1/openapi.json -o cresva-openapi.json openapi-generator-cli generate \  -i cresva-openapi.json \  -g python \  -o ./cresva-client
  • A generated client is regenerated when the API changes, which is the same guarantee the TypeScript one has.
  • There is nothing in this API that needs a hand-written client: no streaming, no multipart uploads, no long-polling.

Not to be confused with

@cresva/acp
A client for a DIFFERENT product: the ACP storefront API, which reads catalogues, offers and trust signals on public storefronts. It does not call any endpoint documented here.
@cresva/acp-mcp
The MCP server that puts those storefront tools inside Claude. Also a different product. See Cresva for Claude.
cresva-mcp-server
The MCP server for THIS API: the same marketing data over the Model Context Protocol rather than REST.