canonical: https://jentic.com/apis/cantrip.io/cantrip

# Cantrip API

Jentic publishes the only available OpenAPI specification for Cantrip API, keeping it validated and agent-ready. The Cantrip API is the Zapier integration surface for the Cantrip CMS, exposing endpoints to publish posts into collections, list configured post types, retrieve recent form submissions, and subscribe to webhooks for new submissions. It targets marketing and editorial workflows that need to push content into a Cantrip site or react to inbound form data without using the dashboard. Authentication is a single header key issued from the site's Zapier settings.

## For AI agents

Publish posts to Cantrip CMS collections, fetch recent form submissions, and subscribe to webhooks for new form responses. Suited for editorial pipelines and lead routing.

## Scope

Does not handle media transcoding, full-text search, or user account management - use for publishing posts, listing form submissions, and webhook subscriptions only.

## Capabilities

- Publish a new post into a Cantrip collection with title, body, slug, and featured image
- List collections that have Zapier post creation enabled to pick a target post type
- Retrieve the most recent 100 form submissions filtered by form UUID
- Subscribe a webhook URL to receive real-time notifications of new form submissions
- Unsubscribe a previously registered webhook by id
- Confirm an API key is valid by calling the authentication probe endpoint

## Use cases

### Automated Editorial Publishing

An editorial team drafts posts in a headless workflow tool and pushes the finalised content into the Cantrip CMS via POST /posts. The integration sends title, body, slug, teaser, author, and featured image so the site renders the post immediately. This removes the manual copy-paste step at the end of the editorial pipeline.

Example prompt: POST /posts with post_type_uuid, title, body, slug, and featured_image_url to publish a post into a Cantrip collection.

### Form Submission Lead Routing

Marketing wants new contact-form submissions to land in their CRM and notify sales in Slack. Subscribing a webhook via POST /webhooks delivers form responses as they arrive, while GET /form-submissions provides a fallback for backfilling missed events. Both endpoints scope by form UUID so different forms can route to different downstream systems.

Example prompt: POST /webhooks with formId and hookUrl to subscribe an external endpoint to a specific Cantrip form's submissions.

### Backfill Form Submission History

After connecting a new analytics destination, a team needs the last 100 submissions for each form to seed the dataset. GET /form-submissions returns recent submissions sorted newest first, optionally filtered by form_uuid, so the seeder can iterate through forms and load history before the live webhook stream takes over.

Example prompt: GET /form-submissions?form_uuid=<uuid> for each known form and write the returned submissions into the analytics warehouse.

### AI Agent Content Publishing

An agent that drafts blog posts uses Jentic to publish the final draft to Cantrip. It searches for the publish operation, loads the createPost schema, picks the right collection from listPostTypes, and submits the post. Credentials stay in your Jentic One instance throughout.

Example prompt: Search Jentic for 'publish a post to Cantrip', call listPostTypes to choose a collection, then execute POST /posts with the selected post_type_uuid and content fields.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /posts | Create a post in a Cantrip collection |
| GET | /post-types | List collections eligible for Zapier post creation |
| GET | /form-submissions | List recent form submissions, optionally filtered by form UUID |
| POST | /webhooks | Subscribe a webhook to form submission events |
| DELETE | /webhooks | Unsubscribe a webhook by id |
| GET | /me | Validate the API key and return site info |

## Key resources

- **Authentication** — Validate the Zapier API key and return the authenticated site identity
- **Posts** — List eligible post types and create posts in collections
- **Forms** — Retrieve recent form submissions, optionally filtered by form UUID
- **Webhooks** — Subscribe and unsubscribe webhook URLs for form submission notifications

## Why Jentic

- **Setup:** Wiring the Cantrip API by hand means setting its X-Zapier-Key header and calling the post, form-submission, and webhook routes yourself. Through Jentic you install once, import Cantrip from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** Cantrip takes its inputs as parameters and body fields rather than as a resource in the URL path, so limit the agent to the operations it needs, such as listing form submissions and post types. You choose the operations it may call, so publishing posts or subscribing webhooks is not included unless you add them.
- **Credential handling:** Your Cantrip X-Zapier-Key is stored once, encrypted, by your own Jentic One instance and injected into the X-Zapier-Key header at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'publish a post' or 'list recent form submissions', and Jentic returns the matching Cantrip operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Canny API** — Capture customer feedback alongside Cantrip's content publishing
- **Canva Connect API** — Generate featured images and assets for Cantrip posts
- **CanvasFlare** — Image generation alternative for content workflows

## FAQ

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

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

Cantrip uses an API key passed in the X-Zapier-Key header, issued from the Zapier integration settings on each site. Through Jentic the key is stored encrypted and injected at execution time so it never enters the agent's prompt context.

### Can I publish a post to a specific collection with the Cantrip API?

Yes. Call GET /post-types to find the post_type_uuid for the collection you want, then POST /posts with that UUID along with title and body to publish into it.

### How do I stream form submissions in real time through Jentic?

Search Jentic for 'subscribe to Cantrip form submissions', load the subscribeWebhook operation, and execute POST /webhooks with formId and hookUrl. New submissions for that form will be POSTed to your URL.

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

Cantrip does not document rate limits in the OpenAPI spec. The form-submissions endpoint caps results at 100 per call, and we recommend implementing client-side backoff on 429 responses.

### Can I retrieve historical form submissions?

GET /form-submissions returns the most recent 100 submissions sorted newest first, optionally filtered by form_uuid. For older history beyond 100 items, rely on webhooks going forward and store events in your own system.

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

Yes. Because you run Jentic One yourself, your own rules decide which Cantrip operations and credentials the agent may use. Cantrip passes its inputs as parameters and body fields rather than as path resources, so you can grant read-only access such as listing post types with GET /post-types and fetching submissions with GET /form-submissions while withholding write actions like publishing with POST /posts or subscribing webhooks with POST /webhooks. The agent can only call the operations you allow, and the X-Zapier-Key stays in your instance rather than in the agent's context.
