KosmoKrator

marketing

Drip Lua API for KosmoKrator Agents

Agent-facing Lua documentation and function reference for the Drip KosmoKrator integration.

7 functions 7 read 0 write API key auth

Lua Namespace

Agents call this integration through app.integrations.drip.*. Use lua_read_doc("integrations.drip") inside KosmoKrator to discover the same reference at runtime.

Agent-Facing Lua Docs

This is the rendered version of the full Lua documentation exposed to agents when they inspect the integration namespace.

Drip Integration — Lua API Reference

Overview

The Drip integration provides tools for managing email marketing subscribers, campaigns, and workflows through the Drip REST API v2.

Authentication

All requests require a Bearer token (api_key) and an account_id (used in URL paths for account-scoped endpoints).

Tools

drip_list_campaigns

List email campaigns in the Drip account.

Type: read

Parameters:

ParameterTypeRequiredDescription
pageintegernoPage number (default: 1)
per_pageintegernoResults per page, max 1000 (default: 100)

Endpoint: GET /v2/{account_id}/campaigns


drip_get_campaign

Fetch a single email campaign by its campaign ID.

Type: read

Parameters:

ParameterTypeRequiredDescription
idstringyesThe campaign ID

Endpoint: GET /v2/{account_id}/campaigns/{id}


drip_list_subscribers

List subscribers in the Drip account.

Type: read

Parameters:

ParameterTypeRequiredDescription
pageintegernoPage number (default: 1)
per_pageintegernoResults per page, max 1000 (default: 100)

Endpoint: GET /v2/{account_id}/subscribers


drip_get_subscriber

Fetch a single subscriber by ID or email.

Type: read

Parameters:

ParameterTypeRequiredDescription
idstringyesSubscriber ID or email address

Endpoint: GET /v2/subscribers/{id}


drip_list_workflows

List workflows in the Drip account.

Type: read

Parameters:

ParameterTypeRequiredDescription
pageintegernoPage number (default: 1)
per_pageintegernoResults per page, max 1000 (default: 100)

Endpoint: GET /v2/{account_id}/workflows


drip_get_workflow

Fetch a single workflow by its workflow ID.

Type: read

Parameters:

ParameterTypeRequiredDescription
idstringyesThe workflow ID

Endpoint: GET /v2/{account_id}/workflows/{id}


drip_get_current_user

Get the currently authenticated Drip user.

Type: read

Parameters: none

Endpoint: GET /v2/user


Multi-Account Usage

The Drip integration supports multi-account configurations. Each account can have its own api_key, account_id, and url:

-- When using with a specific account
tools.drip_list_subscribers({ account = "work" })

-- Default account
tools.drip_list_subscribers({})

Error Handling

All tools return structured results. On error, the response includes an error message describing what went wrong (e.g., authentication failure, invalid account ID, network issues).

Raw agent markdown
# Drip Integration — Lua API Reference

## Overview

The Drip integration provides tools for managing email marketing subscribers, campaigns, and workflows through the Drip REST API v2.

## Authentication

All requests require a Bearer token (`api_key`) and an `account_id` (used in URL paths for account-scoped endpoints).

## Tools

### drip_list_campaigns

List email campaigns in the Drip account.

**Type:** read

**Parameters:**

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `page` | integer | no | Page number (default: 1) |
| `per_page` | integer | no | Results per page, max 1000 (default: 100) |

**Endpoint:** `GET /v2/{account_id}/campaigns`

---

### drip_get_campaign

Fetch a single email campaign by its campaign ID.

**Type:** read

**Parameters:**

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | yes | The campaign ID |

**Endpoint:** `GET /v2/{account_id}/campaigns/{id}`

---

### drip_list_subscribers

List subscribers in the Drip account.

**Type:** read

**Parameters:**

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `page` | integer | no | Page number (default: 1) |
| `per_page` | integer | no | Results per page, max 1000 (default: 100) |

**Endpoint:** `GET /v2/{account_id}/subscribers`

---

### drip_get_subscriber

Fetch a single subscriber by ID or email.

**Type:** read

**Parameters:**

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | yes | Subscriber ID or email address |

**Endpoint:** `GET /v2/subscribers/{id}`

---

### drip_list_workflows

List workflows in the Drip account.

**Type:** read

**Parameters:**

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `page` | integer | no | Page number (default: 1) |
| `per_page` | integer | no | Results per page, max 1000 (default: 100) |

**Endpoint:** `GET /v2/{account_id}/workflows`

---

### drip_get_workflow

Fetch a single workflow by its workflow ID.

**Type:** read

**Parameters:**

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | yes | The workflow ID |

**Endpoint:** `GET /v2/{account_id}/workflows/{id}`

---

### drip_get_current_user

Get the currently authenticated Drip user.

**Type:** read

**Parameters:** none

**Endpoint:** `GET /v2/user`

---

## Multi-Account Usage

The Drip integration supports multi-account configurations. Each account can have its own `api_key`, `account_id`, and `url`:

```lua
-- When using with a specific account
tools.drip_list_subscribers({ account = "work" })

-- Default account
tools.drip_list_subscribers({})
```

## Error Handling

All tools return structured results. On error, the response includes an error message describing what went wrong (e.g., authentication failure, invalid account ID, network issues).

Metadata-Derived Lua Example

local result = app.integrations.drip.drip_list_campaigns({
  page = 1,
  per_page = 1
})
print(result)

Functions

drip_list_campaigns

List email campaigns in your Drip account. Returns campaign details including name, status, and configuration. Paginated — use page and per_page parameters to navigate results.

Operation
Read read
Full name
drip.drip_list_campaigns
ParameterTypeRequiredDescription
page integer no Page number for pagination (default: 1).
per_page integer no Number of results per page, max 1000 (default: 100).

drip_get_campaign

Fetch a single email campaign from Drip by its campaign ID. Returns full campaign details including name, status, configuration, and associated actions.

Operation
Read read
Full name
drip.drip_get_campaign
ParameterTypeRequiredDescription
id string yes The campaign ID.

drip_list_subscribers

List subscribers in your Drip account. Returns subscriber records including email, status, tags, and custom fields. Paginated — use page and per_page parameters to navigate results.

Operation
Read read
Full name
drip.drip_list_subscribers
ParameterTypeRequiredDescription
page integer no Page number for pagination (default: 1).
per_page integer no Number of results per page, max 1000 (default: 100).

drip_get_subscriber

Fetch a single subscriber from Drip by their subscriber ID or email address. Returns full subscriber details including status, tags, custom fields, and subscription information.

Operation
Read read
Full name
drip.drip_get_subscriber
ParameterTypeRequiredDescription
id string yes The subscriber ID or email address.

drip_list_workflows

List workflows in your Drip account. Returns workflow details including name, status, and trigger configuration. Paginated — use page and per_page parameters to navigate results.

Operation
Read read
Full name
drip.drip_list_workflows
ParameterTypeRequiredDescription
page integer no Page number for pagination (default: 1).
per_page integer no Number of results per page, max 1000 (default: 100).

drip_get_workflow

Fetch a single workflow from Drip by its workflow ID. Returns full workflow details including name, status, trigger configuration, and associated actions.

Operation
Read read
Full name
drip.drip_get_workflow
ParameterTypeRequiredDescription
id string yes The workflow ID.

drip_get_current_user

Get the currently authenticated Drip user. Returns user profile information including name, email, and account details. Useful for verifying the API connection and identifying which account is active.

Operation
Read read
Full name
drip.drip_get_current_user
ParameterTypeRequiredDescription
No parameters.