How To Connect Forms to ConvertKit

In this guide, you'll learn how to add subscribers and apply tags to them in ConvertKit when someone submits a form.

Configure your form

In your statickit.json file, either add a new form or update an existing form's actions:

  "forms": {
    "opt-in-form": {
      "name": "Opt-In Form",
      "fields": {
        "email": {
          "type": "email",
          "prettyName": "Email address"
      "actions": [
          "app": "convertkit",
          "type": "applyTags",
          "tags": ["Newsletter"]

The tags you specify must already exist in your ConvertKit account. To add a tag:

  • Log in to your ConvertKit account
  • Click + Create a Tag in the right-hand sidebar of your dashboard

Add your API secret

Next, you need to save your ConvertKit API Secret in your StaticKit secrets. Here's where to find it:

  • Log in to your ConvertKit account
  • Click the dropdown in the upper-right and navigate to "General" settings
  • Halfway down the page, click "Show" under the "API Secret" heading

It will look something like this: c6GMu91Hn4_YggEwGik5ooz9Ww8yibSwRtoqz-Xr88I

Copy the key and run the following command to store this as a secret value:

statickit secrets add convertkit-api-secret <paste-api-secret-here>

Now, you're ready to deploy:

statickit deploy

Configure your fields (optional)

By default, the applyTags action uses the email and first_name fields. You can override them like this:

  "app": "convertkit",
  "type": "applyTags",
  "emailAddressField": "email_address",
  "firstNameField": "name"

Your form does not have to collect a first name, but it must have an email address field.

If you are gathering additional fields (like last name), you can map them to ConvertKit custom fields:

  "app": "mailchimp",
  "type": "addOrUpdateContact",
  "dynamicFields": {
    "last_name": "last_name"

The fields you use must already exist in your ConvertKit account.

Build your form

We have a few client libraries to help attach your interface to StaticKit:

React: works great with Gatsby, Next.js, etc.
HTML: works great with Jekyll, Hugo, Middleman, etc.

Check out the ConvertKit reference to see all available actions and properties.