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

# Octanist API

Octanist's API exposes lead capture, campaign statistics, and ad-spend data for performance marketing teams. Endpoints cover key health checks, lead creation and retrieval, aggregated stats, and ad spend reporting so external tools can sync paid-channel performance into a marketing data warehouse. The shape is geared at agencies and in-house teams that need programmatic access to Octanist data without exporting CSVs.

## For AI agents

Capture leads, read campaign statistics, and pull ad spend numbers from Octanist for marketing analytics workflows.

## Scope

Does not handle ad creative management, CRM deal tracking, or email sending - use for Octanist lead capture, stats, and ad-spend reporting only.

## Capabilities

- Submit a new lead to Octanist via `/api/leads` with source and campaign attribution
- Retrieve a single lead by ID via `/api/leads/{id}`
- Read aggregated campaign statistics via `/api/stats`
- Pull paid-channel ad spend totals via `/api/ad-spend`
- Run a key health check via `/api/check` before scheduled jobs
- Sync Octanist lead and spend data into a downstream BI warehouse

## Use cases

### Webform Lead Capture Sync

Forward leads captured on a marketing site to Octanist by POSTing to `/api/leads` from the form handler with source and campaign attribution. Octanist stores the lead and exposes it through `/api/leads/{id}` for later retrieval. Useful for in-house growth teams that already use Octanist as the system of record for paid-channel leads and want their site forms to write directly to it.

Example prompt: POST a lead with name, email, and source 'google-ads' to `/api/leads` and return the new lead ID.

### Ad Spend Reporting Sync

Pull Octanist's recorded ad-spend totals into a BI warehouse on a nightly cadence by calling `/api/ad-spend` with the relevant date range and writing the rows into an analytics table. The endpoint returns aggregated spend ready to join with internal revenue data for ROAS reporting. Saves marketing teams from exporting CSVs and emailing them to analytics.

Example prompt: Call `/api/ad-spend` for the previous week and return total spend grouped by channel.

### Campaign Performance Dashboard

Render an internal campaign performance dashboard by combining `/api/stats` for engagement metrics with `/api/ad-spend` for cost numbers. The two endpoints together provide enough signal to compute cost-per-lead and channel efficiency without leaving the Octanist dataset. Suitable for agencies running weekly client report-outs.

Example prompt: Call `/api/stats` and `/api/ad-spend` for the last 30 days and return cost-per-lead by campaign.

### AI Agent Marketing Reporter

An AI marketing agent can answer ad-hoc questions like 'how much did we spend on Meta last week' by routing to Octanist through Jentic. The agent finds `/api/ad-spend` by intent, executes with the requested date range, and returns a natural-language summary. Credentials remain in your Jentic One instance throughout, so the agent never sees the raw API key.

Example prompt: Use Jentic to call `/api/ad-spend` for last week and answer 'how much did we spend on paid channels'.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/api/check` | Validate API key and connectivity |
| POST | `/api/leads` | Create a new lead |
| GET | `/api/leads/{id}` | Retrieve a lead by ID |
| GET | `/api/stats` | Aggregated campaign statistics |
| GET | `/api/ad-spend` | Aggregated ad spend |

## Key resources

- **Leads** — Create and retrieve marketing leads with attribution data.
- **Stats** — Aggregated campaign statistics.
- **Ad Spend** — Aggregated paid-channel ad spend.
- **Check** — Health and key validation endpoint.

## Why Jentic

- **Setup:** Wiring Octanist by hand means setting up its X-API-KEY header, learning which endpoints capture leads versus report stats and ad spend, and handling responses yourself. Through Jentic you install once, import Octanist from the API Directory, store the API key once, and your agent calls it.
- **Permission scoping:** Octanist puts the lead id in the URL path (`/api/leads/{id}`), so a rule can pin your agent to reads on a specific lead, and for the collection-level calls you limit it to the operations it needs, such as creating a lead or reading stats. You choose the operations it may call, so lead creation is not included unless you add it.
- **Credential handling:** Your Octanist API key is stored once, encrypted, by your own Jentic One instance and injected into the X-API-KEY header at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'create a lead' or 'pull ad spend', and Jentic returns the matching Octanist operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **HubSpot CRM Objects API** — Manage contacts, companies, and deals across the HubSpot CRM
- **Pipedrive API** — Sales-pipeline-first CRM with leads, deals, and activity tracking
- **Mailchimp API** — Audience and email automation
- **Facebook Graph API** — Meta ads, pages, and lead generation surface

## FAQ

### What authentication does the Octanist API use?

An API key supplied via the X-API-KEY header. Jentic stores the key encrypted in its vault and injects it at execution time so the raw secret never enters the agent's prompt or model context.

### Can I create a lead with the Octanist API?

Yes. POST to `/api/leads` with the lead payload - Octanist stores the record and returns its ID, which can later be fetched with `/api/leads/{id}.` This is the primary integration point for syncing webform submissions into Octanist.

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

Octanist does not encode a hard limit in the spec. Use `/api/check` at the start of scheduled jobs to confirm your key is valid, batch lead creation rather than sending one request per submission burst, and respect any 429 responses with exponential backoff.

### How do I pull ad spend through Jentic?

Search Jentic for 'pull Octanist ad spend by date', load the schema for `/api/ad-spend`, and execute with the date range. With pip install jentic the call is await client.search(...), await client.load(...), await client.execute(...) inside an asyncio.run wrapper.

### Is the Octanist API free?

API access is tied to an Octanist subscription - confirm tier-specific limits in your Octanist account. There is no separate free API tier exposed in the spec.

### Does the API let me update or delete a lead?

The endpoints in this spec cover lead creation and retrieval but not update or delete operations. Make any record changes inside the Octanist UI or contact Octanist if your workflow needs write-back beyond `/api/leads` POST.

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

Yes. Because Jentic One is self-hosted, your own rules decide which Octanist operations and credentials the agent may use. You can allow it only the calls it needs, such as reading `/api/stats` and `/api/ad-spend`, and leave out lead creation on `/api/leads` unless you explicitly add it. Since the lead id sits in the URL path at `/api/leads/{id}`, you can even pin the agent to reads on a specific lead.
