Zapier

Zapier API Documentation

Connect your Cantrip website to thousands of apps with Zapier. Automate form submission notifications, create posts from external sources, and more.

View Cantrip on Zapier →

Authentication

All API requests require an API key passed via the X-Zapier-Key request header.

To generate an API key, go to your website's Settings → Integrations page in the Cantrip dashboard and click Generate API Key.

// Example request header
X-Zapier-Key: your-api-key-here

The header X-API-Key is also accepted as an alternative.

Base URL & Rate Limiting

https://www.cantrip.io/api/zapier

All endpoints are prefixed with this base URL. For example, the authentication test endpoint is:

GET https://www.cantrip.io/api/zapier/me

Rate limit: 60 requests per minute per API key. If exceeded, a 429 Too Many Requests response is returned.

GET /me

Authentication test endpoint. Returns website information to confirm the API key is valid. Used by Zapier during the connection setup flow.

Example Response

{
    "website_uuid": "8abe1ea0-0746-11f1-801a-99656add2106",
    "website_name": "My Website",
    "user_email": "user@example.com",
    "zapier_enabled": true
}

GET /post-types

Returns a list of post types (collections) that have Zapier post creation enabled. Use this to populate a dropdown in Zapier so users can select which collection to create posts in.

Example Response

[
    {
        "uuid": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
        "name": "Blog Posts",
        "slug": "blog"
    },
    {
        "uuid": "b2c3d4e5-6789-01bc-defg-2345678901bc",
        "name": "Projects",
        "slug": "projects"
    }
]

Post types must have "Zapier post creation" enabled in the website's Integrations settings to appear here.

GET /form-submissions

Trigger: New Form Submission. Returns the most recent form submissions (up to 100), sorted newest first. Zapier polls this endpoint and uses the id field for deduplication.

Query Parameters

Parameter Required Description
form_uuid No Filter submissions by a specific form (page section or post UUID)

Example Response

[
    {
        "id": "f1a2b3c4-5678-90ab-cdef-1234567890ab",
        "website_uuid": "8abe1ea0-0746-11f1-801a-99656add2106",
        "website_name": "My Website",
        "submitted_at": "2026-03-01T14:30:00+00:00",
        "ip_address": "192.168.1.1",
        "form_full_name": "Jane Doe",
        "form_email_address": "jane@example.com",
        "form_message": "Hello, I'd like to learn more.",
        "raw_fields": {
            "uuid-1": "Jane Doe",
            "uuid-2": "jane@example.com",
            "uuid-3": "Hello, I'd like to learn more."
        },
        "field_labels": {
            "uuid-1": "Full Name",
            "uuid-2": "Email Address",
            "uuid-3": "Message"
        },
        "source_type": "page_section",
        "source_uuid": "d4e5f6a7-8901-23cd-efgh-4567890123cd",
        "page_uuid": "c3d4e5f6-7890-12bc-defg-3456789012bc",
        "page_title": "Contact"
    }
]

Field Mapping

Form field values are flattened into the top level with a form_ prefix. The field label is sanitized to lowercase with special characters replaced by underscores. For example, a field labeled "Email Address" becomes form_email_address.

The raw_fields object contains the original field data keyed by internal UUID, and field_labels maps those UUIDs to human-readable labels.

Source Types

Submissions include source information indicating where the form lives:

  • page_section — Form is a section on a page. Includes page_uuid and page_title.
  • post — Form is embedded in a post. Includes post_title.

POST /posts

Action: Create Post. Creates a new post in a specified collection. The post type must have Zapier post creation enabled.

Request Body

Field Type Required Description
post_type_uuid string Yes UUID of the post type (collection) to create the post in
title string Yes Post title (max 255 characters)
body string Yes Post body content (HTML supported)
slug string No Custom URL slug. Auto-generated from the title if not provided. Automatically made unique within the collection.
teaser string No Short excerpt or summary
author_name string No Author display name (max 255 characters)
published_at string No Publish date in ISO 8601 format. Defaults to the current time.
featured_image_url string No URL to an image to use as the featured image. The image is downloaded and stored. Supported formats: JPEG, PNG, GIF, WebP.
settings object No Additional settings as a JSON object

Example Request

POST /api/zapier/posts
Content-Type: application/json
X-Zapier-Key: your-api-key-here

{
    "post_type_uuid": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
    "title": "My New Blog Post",
    "body": "<p>This is the content of my blog post.</p>",
    "teaser": "A short summary of the post",
    "author_name": "Jane Doe",
    "featured_image_url": "https://example.com/images/photo.jpg"
}

Example Response (201 Created)

{
    "uuid": "e5f6a7b8-9012-34de-fghi-5678901234de",
    "title": "My New Blog Post",
    "slug": "my-new-blog-post",
    "url": "https://yourdomain.com/blog/my-new-blog-post",
    "featured_image_url": "https://media.cantrip.io/.../featured.jpg",
    "published_at": "2026-03-01T14:30:00+00:00",
    "created_at": "2026-03-01T14:30:00+00:00"
}
Note: If a featured image URL is provided but fails to download or has an unsupported format, the post is still created successfully — the image is simply skipped.

Error Responses

All error responses return a JSON object with error and message fields.

Status Error Description
401 Unauthorized Missing or invalid API key
403 Forbidden Zapier integration is disabled, or post creation is not enabled for the specified post type
404 Not Found Post type not found
422 Validation Error Request body is missing required fields or contains invalid data
429 Too Many Requests Rate limit exceeded (60 requests/minute)

Example Error Response

{
    "error": "Unauthorized",
    "message": "Invalid API key."
}