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

# Agillic API

Jentic publishes the only available OpenAPI specification for Agillic API, keeping it validated and agent-ready. Agillic is a customer marketing automation platform for managing recipients, segmenting audiences, and orchestrating cross-channel campaigns through flows. The API exposes 81 endpoints covering recipient CRUD, batch upserts, one-to-many tables, event achievement, target group membership, flow execution, app push device registration, asset management, and asynchronous data exports. Authentication supports OAuth2 bearer tokens (preferred) and HTTP basic for legacy clients.

## For AI agents

Manage Agillic recipients, segment audiences with target groups, fire personalisation events, execute flows, and run async data exports across email, SMS, and app push channels.

## Scope

Does not handle email rendering, deliverability monitoring, or web personalisation widgets - use for recipient, segment, event, and flow orchestration only.

## Capabilities

- Create, update, and delete recipients individually or via async batch upsert and delete jobs
- Read and write one-to-many tables tied to a recipient for purchase history or preferences
- Achieve events on a recipient with optional context payloads to trigger flows
- Execute flows directly to launch campaigns on demand
- Add and remove recipients from static target groups for campaign segmentation
- Register, unregister, and manage app push consent for device identifiers
- Schedule and download async data exports of recipients, events, and statistics

## Use cases

### Recipient and Consent Management

Operations teams keep Agillic recipient records in sync with a primary CRM by creating, updating, and deleting profiles through the recipient endpoints. The async batch upsert at /recipients/v2/:upsert handles tens of thousands of records per call, returning a job handle to poll. Consent fields and one-to-many tables can be updated in the same flow, keeping marketing eligibility accurate ahead of each send.

Example prompt: POST /recipients/v2/:upsert with a 10000-row batch, then poll the returned job until status is completed

### Event-Driven Personalisation

Agillic flows fire when recipients achieve events such as 'order_placed' or 'cart_abandoned'. The API accepts events with structured context, so an agent can drop in product IDs, totals, or recommendation slots and the downstream flow will fan out the personalised email, SMS, or push. /recipients/{id}/events/{eventId}/:achieveWithContext is the canonical write path.

Example prompt: POST /recipients/{id}/events/cart_abandoned/:achieveWithContext with cart_total and product_ids

### Audience Segmentation via Target Groups

Marketers assemble static target groups in Agillic and use the API to add or remove recipients from those groups based on external rules - recent purchases, support history, or model scores. /recipients/:addToStaticTargetGroup and :removeFromStaticTargetGroup move recipients in bulk so a daily segmentation job can keep groups current without UI work.

Example prompt: POST /recipients/:addToStaticTargetGroup with 200 recipient IDs and target group 'reactivation_q3'

### Flow Execution On Demand

Beyond event triggers, agents can launch a flow directly via /flows/{flowName}/:execute, useful for transactional sends like password reset or order confirmation that must run immediately rather than wait for a scheduled segment. Combined with recipient lookup, an agent can pick a recipient and fire a named flow in two calls.

Example prompt: POST /flows/password_reset/:execute with the recipient ID and a one-time token

### AI Agent Marketing Operations via Jentic

An agent built on Jentic can sit between a CRM and Agillic, translating natural-language requests like 'add these 30 customers to the loyalty programme reactivation list' into the right combination of recipient lookup, target group write, and event achievement calls. Jentic stores the bearer token in its vault and injects it per request, so the credential never appears in agent memory.

Example prompt: Use Jentic to search 'add a recipient to a target group', execute the call for 30 IDs, and confirm membership

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /oauth2/token | Obtain an OAuth2 bearer token |
| POST | /recipients | Create a recipient |
| POST | /recipients/v2/:upsert | Async batch upsert recipients |
| POST | /recipients/{recipientId}/events/{eventId}/:achieveWithContext | Achieve an event with context |
| POST | /recipients/:addToStaticTargetGroup | Add recipients to a static target group |
| POST | /recipients/:removeFromStaticTargetGroup | Remove recipients from a static target group |
| GET | /recipients/{recipientId}/targetGroups | List a recipient's target groups |
| POST | /recipients/{recipientId}/promotions/{promotionId}/:evaluatePromotion | Evaluate a promotion for a recipient |

## Key resources

- **Recipients** — Core profile records with CRUD, batch upsert/delete, and per-recipient subresources
- **One-to-Many** — Per-recipient relational tables for purchases, preferences, or history
- **Events** — Achieve events with or without context to trigger flows
- **Target Groups** — Static segmentation lists with bulk add/remove operations
- **Flows** — Named campaign flows that can be executed on demand
- **Global Data** — Account-wide reference tables and lookup values
- **App Push** — Device registration and consent for push notifications
- **Export** — Asynchronous exports of recipient and event data
- **Assets** — Uploaded creative and template assets

## Why Jentic

- **Setup:** Wiring the Agillic API by hand means running its OAuth2 client-credentials flow against the EU host and coding calls across recipients, events, and target groups. Through Jentic you install once, import the Agillic API from the API Directory, store the credentials once, and your agent calls it.
- **Permission scoping:** Agillic puts the recipient id in the URL path for many operations (/recipients/{recipientId}/...), so a rule can pin the agent to a specific recipient. You choose which operations it may call, such as reading target groups, so adding to or removing from static target groups is not included unless you add it.
- **Credential handling:** Your Agillic OAuth2 client credentials are stored once, encrypted, by your own Jentic One instance and injected at execution time, with token acquisition and refresh handled outside the agent. Neither the client secret nor the bearer token enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'add a recipient to a target group', and Jentic returns the matching Agillic operation with its input schema, including the recipient id, so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Agillic API (agillic.net)** — Same Agillic platform exposed under the agillic.net domain with a smaller, bearer-only endpoint set
- **Klaviyo** — Marketing automation platform for ecommerce with profiles, lists, segments, and flows
- **Braze** — Cross-channel customer engagement platform with users, campaigns, and Canvas flows
- **Customer.io** — Behavioural messaging platform with people, segments, and triggered campaigns
- **HubSpot** — CRM platform that often supplies the contact and deal data feeding Agillic recipients

## FAQ

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

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

Two schemes are supported: an OAuth2-style bearer token obtained via POST /oauth2/token, and HTTP basic for legacy access. Bearer is recommended; through Jentic the token is fetched, refreshed, and injected automatically without exposing the secret to the agent.

### How do I add a recipient to a target group with the Agillic API?

Use POST /recipients/:addToStaticTargetGroup with the target group identifier and a list of recipient IDs. The endpoint accepts batches, so a single call can move many recipients into a segment in one request.

### Can I upsert recipients in bulk through the Agillic API?

Yes. POST /recipients/v2/:upsert is async and accepts large batches; it returns a job handle that you poll until completion. For deletes, use the matching POST /recipients/v2/:delete async endpoint rather than per-recipient DELETE calls.

### How do I execute a flow through Jentic?

Search Jentic for 'execute an Agillic flow', load the POST /flows/{flowName}/:execute schema, and call it with the flow name and the recipient context. Jentic injects the bearer token, so the agent only deals with the operational payload.

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

The OpenAPI spec does not encode explicit per-second limits. For high-volume workloads, prefer the v2 async batch endpoints (/recipients/v2/:upsert, /recipients/v2/:delete, /recipients/v2/events/:achieve) over per-record calls.

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

Yes. Because you run Jentic One yourself, your own rules decide which Agillic operations and credentials the agent may use. Many Agillic operations put the recipient id in the URL path, such as GET /recipients/{recipientId}/targetGroups, so you can pin the agent to a specific recipient and grant read-only access to that recipient's target groups. Write operations like POST /recipients/:addToStaticTargetGroup and POST /recipients/:removeFromStaticTargetGroup stay unavailable to the agent until you explicitly allow them.
