Skip to main content
Klaviyo logo

Overview

Add Klaviyo to any ModuleX agent or workflow. Email-marketing list and profile management against the Klaviyo REST API (a.klaviyo.com/api), pinned to revision 2024-10-15.
Categories: Marketing & Advertising · Marketing & Email · Email · Automation · Development · Auth: Private API Key · Actions: 5

Authentication

Private API Key

Authenticate using your Klaviyo Private API Key. Create one in Settings > API Keys

Required Credentials

FieldDescriptionRequiredFormat
Klaviyo Private API KeyYour Klaviyo Private API Key for API authenticationYespk_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Available Actions

Parameters

sort
string
Field to sort by: ‘created’, ‘id’, ‘name’, or ‘updated’ (Default: created)
sort_direction
string
Sort direction: ‘asc’ or ‘desc’ (Default: desc)
max_results
integer
Maximum number of lists to return (Default: 100)

Response

{
  "$defs": {
    "KlaviyoList": {
      "additionalProperties": false,
      "properties": {
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Id"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Name"
        },
        "created": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Created"
        },
        "updated": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Updated"
        },
        "opt_in_process": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Opt In Process"
        }
      },
      "title": "KlaviyoList",
      "type": "object"
    }
  },
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "lists": {
      "items": {
        "$ref": "#/$defs/KlaviyoList"
      },
      "title": "Lists",
      "type": "array"
    },
    "count": {
      "default": 0,
      "title": "Count",
      "type": "integer"
    }
  },
  "required": [
    "success"
  ],
  "title": "GetListsOutput",
  "type": "object"
}

Parameters

list_id
string
required
The ID of the Klaviyo list to retrieve

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Id"
    },
    "name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Name"
    },
    "created": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Created"
    },
    "updated": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Updated"
    },
    "opt_in_process": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Opt In Process"
    }
  },
  "required": [
    "success"
  ],
  "title": "GetListOutput",
  "type": "object"
}

Parameters

name
string
required
The name for the new list

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Id"
    },
    "name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Name"
    },
    "created": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Created"
    },
    "updated": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Updated"
    },
    "opt_in_process": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Opt In Process"
    }
  },
  "required": [
    "success"
  ],
  "title": "CreateListOutput",
  "type": "object"
}

Parameters

max_results
integer
Maximum number of profiles to return (Default: 100)
sort
string
Field to sort by: ‘created’, ‘updated’, ‘email’ (Default: created)
sort_direction
string
Sort direction: ‘asc’ or ‘desc’ (Default: desc)

Response

{
  "$defs": {
    "KlaviyoProfile": {
      "additionalProperties": false,
      "properties": {
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Id"
        },
        "email": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Email"
        },
        "first_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "First Name"
        },
        "last_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Last Name"
        },
        "phone_number": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Phone Number"
        },
        "created": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Created"
        },
        "updated": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Updated"
        }
      },
      "title": "KlaviyoProfile",
      "type": "object"
    }
  },
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "profiles": {
      "items": {
        "$ref": "#/$defs/KlaviyoProfile"
      },
      "title": "Profiles",
      "type": "array"
    },
    "count": {
      "default": 0,
      "title": "Count",
      "type": "integer"
    }
  },
  "required": [
    "success"
  ],
  "title": "GetProfilesOutput",
  "type": "object"
}

Parameters

list_id
string
required
The ID of the list to add members to
profile_ids
array
required
List of profile IDs to add to the list

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "list_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "List Id"
    },
    "profiles_added": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Profiles Added"
    },
    "profile_ids": {
      "items": {
        "type": "string"
      },
      "title": "Profile Ids",
      "type": "array"
    },
    "extra": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Extra"
    }
  },
  "required": [
    "success"
  ],
  "title": "AddMembersToListOutput",
  "type": "object"
}

Limits & Quotas

  • Pagination follows JSON:API cursor links — both get_lists and get_profiles page through results until max_results is reached or links.next is exhausted.
  • Failures (any non-2xx, plus exceptions) surface as success=False with an error string. Empty/blank API keys short-circuit before the HTTP call.

SendGrid

Pinterest

AgentMail