Back

ConvertKit API Essential Guide

Aug 11, 20246 minute read

What type of API does ConvertKit provide?

Based on the search results, ConvertKit appears to have a REST API. The API documentation mentions that calls are made to endpoints like https://api.convertkit.com/v3/, which is typical of REST APIs. The API requires an API key for authentication, which is common for REST APIs. The API allows operations like listing forms, which return JSON responses, and JSON is the standard data format for REST APIs. When discussing integrating ConvertKit with other services, the results mention using HTTP request nodes to make REST API calls.

The key points to consider are:

  • ConvertKit is currently on API v3, with v4 in closed beta.
  • The API allows operations like managing subscribers, forms, broadcasts, etc.
  • Authentication is done via an API key.
  • The API returns data in JSON format.

The best practices include:

  • Use HTTPS for all API requests to ensure security.
  • Include the API key with each request as required.
  • Handle rate limiting appropriately to avoid exceeding usage limits.
  • Parse JSON responses carefully to extract the needed data.

In summary, ConvertKit provides a REST API for developers to integrate with their platform and automate various marketing tasks.

Does the ConvertKit API have webhooks?

Yes, the official ConvertKit API does have webhooks. Here are the key points about ConvertKit's webhook functionality:

Webhook Support

ConvertKit offers webhook support through their API v4. This allows you to set up automated notifications when certain events occur in your ConvertKit account.

Event Types

You can subscribe to various event types using ConvertKit webhooks. Some of the events you can subscribe to include:

  • New subscriber activation
  • Unsubscribes
  • Form submissions
  • Tag additions
  • Purchases
  • Sequence completions

Setting Up Webhooks

To set up a webhook in ConvertKit:

  1. Log into your ConvertKit account
  2. Navigate to the "Automations" section
  3. Select "Rules" and click "+ Add Rule"
  4. In the "Trigger" section, select the event that will activate the webhook
  5. In the "Action" section, select "Webhook" and enter the target URL
  6. Save the rule

API Endpoints

ConvertKit provides API endpoints for managing webhooks:

  • Create a webhook: POST https://api.convertkit.com/v4/webhooks
  • List webhooks: GET https://api.convertkit.com/v4/webhooks

Benefits of Using Webhooks

Using webhooks in ConvertKit offers several advantages:

  • Real-time data transfer
  • Immediate updates and responses
  • Seamless integration with other applications
  • Automated workflows
  • Reduced manual data entry

Considerations

When using webhooks with ConvertKit, keep in mind:

  • ConvertKit may not support all types of webhooks
  • Webhook functionality depends on server uptime and availability
  • Security considerations for data transmission over the internet

In summary, ConvertKit's API does offer webhook functionality, allowing you to subscribe to various event types and automate actions based on those events. This can significantly enhance your ability to integrate ConvertKit with other tools and create more efficient workflows.

Rate Limits and other limitations

Here are the key points about the API Rate Limits for the ConvertKit API:

Rate Limit Details

  • The rate limit is no more than 120 requests over a rolling 60 second period, for a given API key.

  • This applies to both the v3 and v4 versions of the API.

Handling Rate Limits

  • If your request rate exceeds the limits, you will receive a 429 response.

  • It's recommended to space out your requests and implement exponential backoff to stay within the limit.

Key Considerations

  • Your code should gracefully handle 429 responses.

  • For bulk processing (in v4), there are separate endpoints with different handling for small vs large batch sizes.

  • Large batch sizes use an asynchronous callback design.

  • If you try to enqueue too many bulk requests at once, you'll receive a 413 error response.

Best Practices

  • Space out your requests to avoid hitting the rate limit.

  • Implement exponential backoff when receiving rate limit errors.

  • For bulk operations, use the appropriate endpoints and be aware of the synchronous vs asynchronous processing thresholds.

  • Handle all potential error responses (429, 413) gracefully in your code.

By following these guidelines, you can ensure your integration with the ConvertKit API remains within the rate limits and handles any limit-related issues smoothly.

Latest API Version

Based on the search results, here are the key points about the most recent version of the ConvertKit API:

  1. The most recent version of the ConvertKit API is V4 [1][2].

  2. API V4 is currently available via a closed beta. Developers need to receive an invite to join the beta [2].

  3. V4 offers several improvements over V3, including:

    • A ground-up rebuild of developer tooling
    • Vastly improved performance
    • New features and quality of life improvements
    • Industry standard patterns and design
    • Seamless OAuth authentication for creators
    • Bulk endpoints
    • A fully functional broadcast API with full HTML support and targeting [1]
  4. V4 will be the sole access point for deeper integrations and plugins, allowing developers to create native tools [1].

  5. The base URL for API V4 calls is https://api.convertkit.com/ (without the v3 in the path) [2].

  6. If developers are unable to support OAuth authentication, they should continue using V3. API Key support for V4 is coming soon [2].

  7. V3 is no longer in active development, but it is still available and functional [1].

Key points to consider:

  • Developers interested in using V4 need to join a waitlist to get access to the closed beta [2].
  • There are breaking changes between V3 and V4, so developers updating from V3 should review the changelog [2].
  • V4 uses OAuth for authentication, which is a significant change from V3's API key approach [2].

Best practices:

  • For new integrations, it's recommended to use V4 if possible, as it offers improved performance and features.
  • Existing integrations using V3 can continue to function, but may want to plan for eventual migration to V4.
  • Developers should review the full documentation for V4 to understand the new features and changes in authentication methods.

How to get a ConvertKit developer account and API Keys?

To get a developer account for ConvertKit and create an API integration, you need to follow these steps:

1. Join the Developer Beta Program

  • Join the waitlist for the developer beta program.
  • Wait for an invitation from ConvertKit to join the beta.

2. Set Up Your Developer Account

  • Log in to your ConvertKit account.
  • Navigate to the developer settings section.

3. Create Your App

  • Click on "Create a new app" or a similar option.
  • Fill out the required information for your app, including:
    • App name
    • Description
    • Support URL
    • Category

4. Configure API Access

  • In the app configuration, select the option to set up API access.
  • Provide the following information:
    • Authorization URL: https://app.convertkit.com/oauth/authorize
    • Redirect URIs: The URLs where users will be redirected after authorization.
    • Secure application toggle: Determine if your app is hosted in a secure environment.

5. Implement OAuth

  • Implement the OAuth 2.0 flow in your application.
  • Use the authorization URL: https://app.convertkit.com/oauth/authorize
  • Use the token URL: https://api.convertkit.com/oauth/token

6. Test Your Integration

  • Install your app in your own ConvertKit account for testing purposes.
  • Ensure all features work as expected.

7. Publish Your App

  • Click the "Publish" button in your app settings.
  • Submit your app for approval by ConvertKit.
  • Wait for ConvertKit to review and approve your app.

What can you do with the ConvertKit API?

Based on the search results provided, here are the key data models you can interact with using the ConvertKit API, along with what is possible for each:

Subscribers

  • List subscribers
  • Create new subscribers
  • Update subscriber information
  • Delete subscribers
  • Tag subscribers
  • View subscriber tags

Tags

  • List all tags
  • Create new tags
  • Delete tags
  • Add/remove tags from subscribers

Forms

  • List all forms
  • Create new forms
  • Update form details
  • Delete forms
  • View form subscriptions

Sequences

  • List all sequences
  • Create new sequences
  • Update sequence details
  • Delete sequences
  • View sequence subscriptions

Broadcasts

  • List all broadcasts
  • Create new broadcasts
  • Update broadcast details
  • Delete broadcasts
  • View broadcast stats

Custom Fields

  • List all custom fields
  • Create new custom fields
  • Update custom field details
  • Delete custom fields

Purchases

  • List all purchases
  • Create new purchases
  • Update purchase details

Account

  • View account details

Bulk Operations

  • Perform bulk subscriber operations
  • Use asynchronous processing for large batches

The API allows for comprehensive management of email marketing campaigns, subscriber lists, and automation workflows. It provides both read and write access to most data models, enabling developers to build robust integrations and applications on top of the ConvertKit platform.