canonical: https://jentic.com/apis/clevertap.com/clevertap

# CleverTap API

Jentic publishes the only available OpenAPI specification for CleverTap API, keeping it validated and agent-ready. The CleverTap server-side API powers customer engagement workflows for the CleverTap product analytics and messaging platform, covering profile uploads, identity merging, event ingestion, campaign target management, and reporting. Authentication uses paired X-CleverTap-Account-Id and X-CleverTap-Passcode headers, and the API is regionally hosted across US, India, Europe, and Singapore endpoints. Agents can use it to ingest events, manage subscriber profiles, and create or stop targeted push, email, and in-app campaigns.

## For AI agents

Drive CleverTap server-side workflows - upload profiles and events, manage identities, and create or stop targeted messaging campaigns across mobile and web.

## Scope

Does not handle SMS provider routing, server-side rendering of email templates, or raw SMTP sending - use for CleverTap profile, event, and campaign orchestration only.

## Capabilities

- Ingest user profiles and events in bulk through the upload endpoint
- Resolve and manage user identity, including merging and demerging profile records
- Create, stop, and read the result of targeted push, email, SMS, web, and in-app campaigns
- Query event counts and trends for product analytics over a chosen time window
- Subscribe and unsubscribe profiles from messaging channels
- Pull message-level delivery and engagement reports for a campaign
- Look up profiles by identity and read profile counts for an account

## Use cases

### Server-Side Event and Profile Ingestion

Forward user events and profile updates from a backend system to CleverTap so that segmentation, campaigns, and analytics stay in sync with the source-of-truth user data. The `/1/upload` endpoint accepts batched events and profile updates in a single payload, which keeps ingestion efficient. A typical ingestion job takes a day or two to wire up, including identity resolution rules.

Example prompt: Send a `/1/upload` payload containing one profile update and three events for identity 'user_1234' and verify the response reports zero errors

### Triggered Campaign Orchestration

Create and manage CleverTap target campaigns from an external orchestrator - for example releasing a push or email campaign when a customer hits a specific lifecycle stage. The `/1/targets/create.json`, /stop.json, and /result.json endpoints provide the full lifecycle, and `/1/message/report.json` returns engagement data for follow-up. Wiring this in takes a few hours per channel.

Example prompt: Create a push campaign for segment 'cart_abandoners' via `/1/targets/create.json` and poll `/1/targets/result.json` until delivery completes

### Product Analytics Queries

Query CleverTap for event counts, trends, and top events to power an internal dashboard or to feed downstream BI. The `/1/counts/events.json`, `/counts/top.json`, and `/counts/trends.json` endpoints return aggregated metrics over a chosen window, suitable for daily reporting jobs. Setup is typically under a day.

Example prompt: Call `/1/counts/events.json` for event 'purchase' over the last 30 days and return the daily count series

### Agent-Driven Engagement Operations via Jentic

Expose CleverTap to an AI agent through Jentic so a marketing operator can describe an outcome - 'send a push to cart abandoners with a 10 percent code' - and have the agent compose the right `/1/targets/create.json` call. Jentic isolates the account passcode and surfaces only the operations relevant to the intent. A working integration takes well under an hour.

Example prompt: Search Jentic for 'create a clevertap push campaign', load the schema for `/1/targets/create.json`, and execute it for segment 'cart_abandoners'

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/1/upload` | Bulk upload events and profile updates |
| POST | `/1/targets/create.json` | Create a target campaign |
| POST | `/1/targets/stop.json` | Stop a target campaign |
| POST | `/1/targets/result.json` | Get results for a target campaign |
| POST | `/1/counts/events.json` | Query event counts over a time window |
| POST | `/1/counts/trends.json` | Query event trends over time |

## Key resources

- **Profiles** — Upload profiles, look up by identity, count, merge, and demerge profile records
- **Events** — Ingest events and query counts, top events, and trends over time
- **Campaigns** — Create, stop, list, and read results for target campaigns across channels
- **Reports** — Pull message-level delivery and engagement reports per campaign
- **Subscriptions** — Subscribe and disassociate profiles from messaging channels

## Why Jentic

- **Setup:** Wiring the CleverTap API by hand means sending both the X-CleverTap-Account-Id and passcode headers on every call and choosing the right regional host among the US, India, EU, and Singapore endpoints. Through Jentic you install once, import CleverTap from the API Directory, store the credentials once, and your agent calls it.
- **Permission scoping:** CleverTap carries its targets in the request body rather than the URL path, so limit the agent to the operations it needs, such as uploading events or reading event counts, and leave campaign creation or stopping a target out of the allowed set unless you add them.
- **Credential handling:** Your CleverTap account id and passcode are stored once, encrypted, by your own Jentic One instance and injected at execution time. They never enter the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'upload user events' or 'get event counts in CleverTap', and Jentic returns the matching operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Braze API** — Cross-channel customer engagement platform with similar profile and campaign primitives
- **OneSignal API** — Push and in-app messaging focused customer engagement API
- **Mixpanel API** — Dedicated product analytics platform

## FAQ

### Why is there no official OpenAPI spec for CleverTap API?

CleverTap does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call CleverTap API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the CleverTap API use?

CleverTap uses paired API key headers - X-CleverTap-Account-Id and X-CleverTap-Passcode - on every request. When called through Jentic, the passcode is held in your Jentic One instance and only the account id is visible to the agent context.

### Which CleverTap region should I call?

CleverTap exposes regional base URLs: api.clevertap.com (US), in1.api.clevertap.com (India), eu1.api.clevertap.com (Europe), and sg1.api.clevertap.com (Singapore). Use the region your account was provisioned in - calls to the wrong region return 401.

### Can I trigger a push campaign with the CleverTap API?

Yes. `/1/targets/create.json` accepts a target definition that includes channel (push, email, SMS, web, in-app), segment, and message payload. Pair with `/1/targets/result.json` to read delivery and engagement counters for that campaign.

### What are the rate limits for the CleverTap API?

CleverTap does not document fixed numeric rate limits in the public spec. In practice, `/1/upload` supports large batches (up to a few MB) and is preferred over many small calls; campaign create endpoints are subject to plan-level concurrency limits.

### How do I send events to CleverTap through Jentic?

Run pip install jentic, search for 'upload events to clevertap', load the operation against `/1/upload`, and execute it with the events payload. Jentic injects the X-CleverTap-Account-Id and X-CleverTap-Passcode headers from the vault.

### Can I limit what my agent is allowed to do with the CleverTap API?

Yes. Because you run Jentic One yourself, your own rules decide which CleverTap operations and credentials the agent may use, and CleverTap carries its targets in the request body rather than the URL path, so scoping is done at the operation level. You can allow only the calls the agent needs, such as uploading events to `/1/upload` or reading event counts from `/1/counts/events.json`, while leaving campaign creation via `/1/targets/create.json` and stopping a target via `/1/targets/stop.json` out of the allowed set. The account id and passcode stay in your instance and are injected only for the operations you permit.
