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

# Cometly API

Jentic publishes the only available OpenAPI specification for Cometly API, keeping it validated and agent-ready. Cometly is an ad attribution and tracking platform; its API exposes contact records, event ingestion, and data exports so server-side code can stream conversions, identify users, and pull historical data for offline analysis. Use it to attribute marketing spend to outcomes, send server-side conversion events that survive ad blockers, and export attribution data into a warehouse.

## For AI agents

Send server-side conversion events, manage contact records, and export attribution data from Cometly with one bearer token.

## Scope

Does not handle ad creative management, audience targeting, or campaign budgeting - use for server-side conversion tracking and attribution data export only.

## Capabilities

- Send a single attribution event via POST /events with contact and conversion data
- Stream high-volume events via POST `/events/batch` for server-side tracking pipelines
- Create, list, fetch, update, and delete contact records under /contacts
- Trigger a data export via POST /exports for warehouse loading
- Poll export status and retrieve the download URL via GET `/exports/{exportId}`
- List recent exports to audit data extraction history

## Use cases

### Server-Side Conversion Tracking

Send purchase, signup, or lead events from a backend service to POST /events so attribution survives ad blockers and Safari ITP. Each event carries the contact reference plus conversion value, letting Cometly tie revenue back to the original ad click. Reliable for Shopify checkouts, Stripe webhooks, and CRM-triggered events.

Example prompt: POST a purchase event to /events with contactId, value 49.99, currency USD, and event_name 'purchase'

### Bulk Backfill of Historical Conversions

When onboarding to Cometly, replay months of historical orders through POST `/events/batch` so the attribution engine can rebuild lookback windows. Batch ingestion accepts arrays of events in a single request, reducing rate-limit pressure compared with one-by-one POSTs.

Example prompt: POST a batch of 500 historical purchase events to `/events/batch` and return the count accepted

### Warehouse Export Pipeline

Trigger POST /exports to dump attribution data into the warehouse on a schedule, then poll GET `/exports/{exportId}` until the status is ready and download the resulting file. This gives BI tools and downstream MMM models a clean source of truth that combines Cometly's attribution with internal revenue data.

Example prompt: Create an export with date_range last_30_days, poll until status is complete, and return the download URL

### AI Agent Attribution Reporter via Jentic

An AI agent connected to Jentic can answer 'how much revenue did Meta drive last week?' by triggering a Cometly export, polling for completion, and summarising the results - all without raw API key exposure. Jentic stores the bearer token in your Jentic One instance and returns only execution results to the agent.

Example prompt: Use Jentic to search 'send a conversion event to cometly', load the operation, and execute with a sample purchase event

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/events` | Send a single attribution event |
| POST | `/events/batch` | Send a batch of events |
| POST | `/contacts` | Create a contact |
| GET | `/contacts` | List contacts |
| PUT | `/contacts/{contactId}` | Update a contact |
| POST | `/exports` | Create a data export |
| GET | `/exports/{exportId}` | Get export status and download URL |

## Key resources

- **Contacts** — Create, list, fetch, update, and delete contact records
- **Events** — Send single or batched attribution events
- **Exports** — Trigger data exports and poll their status for download URLs

## Why Jentic

- **Setup:** Wiring Cometly by hand means learning its bearer auth, building server-side conversion event calls, and managing your own retries and batching. Through Jentic you install once, import Cometly from the API Directory, store the token once, and your agent calls it.
- **Permission scoping:** Cometly puts the contact and export ids in the URL path (`/contacts/{contactId}`, `/exports/{exportId}`), so a rule can pin your agent to reading and updating a specific contact or export. You choose the operations it may call, so you can allow conversion event tracking while leaving contact updates out unless you add them.
- **Credential handling:** Your Cometly bearer token is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'send a conversion event to Cometly' or 'export attribution data', and Jentic returns the matching Cometly operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Hyros API** — Hyros offers a similar server-side ad attribution API with its own tracking model.
- **Northbeam API** — Northbeam is a multi-touch attribution platform with a comparable conversion ingestion API.
- **Segment API** — Segment routes raw event streams to many destinations; Cometly is one possible attribution destination.

## FAQ

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

Cometly does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call Cometly 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 Cometly API use?

Cometly uses a bearer token in the Authorization header. Through Jentic the key is stored encrypted in your Jentic One instance and never enters the agent context - the agent only receives the response of the operation it called.

### Can I send conversion events from the server side with the Cometly API?

Yes. POST /events accepts a single conversion event and POST `/events/batch` accepts an array of events for bulk ingestion. Both expect a contact reference and the conversion attributes (event_name, value, currency).

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

Cometly does not document a hard public rate limit; in practice, single-event POSTs above a few hundred per minute should move to `/events/batch.` Expect 429 responses at extreme volume and back off.

### How do I send a conversion event through Jentic?

Search Jentic for 'send a conversion event to cometly', load the schema for POST /events, and execute with the contact reference and event details. The Jentic Python SDK pattern is await client.search(...), await client.load(...), await client.execute(...).

### Can I export Cometly attribution data to a warehouse?

Yes. POST /exports creates a data export job, GET /exports lists exports, and GET `/exports/{exportId}` returns the status plus a download URL once the export is complete. Schedule this from a warehouse loader to refresh attribution data nightly.

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

Yes. Because you run Jentic One yourself, your own rules decide which Cometly operations the agent may call, so you can allow it to send conversion events with POST /events and POST `/events/batch` while leaving contact updates and deletes out unless you add them. Cometly puts the contact and export ids in the URL path (`/contacts/{contactId}`, `/exports/{exportId}`), so a rule can pin the agent to a specific contact or export rather than the whole account. Your bearer token stays with your Jentic One instance and is injected only for the operations you permit.
