productivity
GetResponse Lua API for KosmoKrator Agents
Agent-facing Lua documentation and function reference for the GetResponse KosmoKrator integration.Lua Namespace
Agents call this integration through app.integrations.getresponse.*.
Use lua_read_doc("integrations.getresponse") inside KosmoKrator to discover the same reference at runtime.
Call Lua from the Headless CLI
Use kosmo integrations:lua when a shell script, CI job, cron job, or another coding CLI should run a deterministic
GetResponse workflow without starting an interactive agent session.
kosmo integrations:lua --eval 'dump(app.integrations.getresponse.list_contacts({page = 1, perPage = 1}))' --json kosmo integrations:lua --eval 'print(docs.read("getresponse"))' --json
kosmo integrations:lua --eval 'print(docs.read("getresponse.list_contacts"))' --json Workflow file
Put repeatable logic in a Lua file, then execute it with JSON output for the calling process.
local getresponse = app.integrations.getresponse
local result = getresponse.list_contacts({page = 1, perPage = 1})
dump(result) kosmo integrations:lua workflow.lua --json
kosmo integrations:lua workflow.lua --force --json integrations:lua exposes app.integrations.getresponse, app.mcp.*, docs.*, json.*, and regex.*. Use app.integrations.getresponse.default.* or app.integrations.getresponse.work.* when you configured named credential accounts.
MCP-only Lua
If the script only needs configured MCP servers and does not need GetResponse, use the narrower mcp:lua command.
# Use mcp:lua for MCP-only scripts; use integrations:lua for this integration namespace.
kosmo mcp:lua --eval 'dump(mcp.servers())' --json Agent-Facing Lua Docs
This is the rendered version of the full Lua documentation exposed to agents when they inspect the integration namespace.
GetResponse — Lua API Reference
list_contacts
List contacts in your GetResponse account with pagination.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number (1-based). Default: 1 |
perPage | integer | no | Results per page (max 1000). Default: 50 |
Example
local result = app.integrations.getresponse.list_contacts({
page = 1,
perPage = 25
})
for _, contact in ipairs(result) do
print(contact.email .. " - " .. (contact.name or "N/A"))
end
get_contact
Get details of a specific contact by ID.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | The unique contact identifier |
Example
local result = app.integrations.getresponse.get_contact({
id = "abc123"
})
print(result.email)
print(result.name)
create_contact
Create a new contact in GetResponse.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
email | string | yes | Contact email address |
name | string | no | Contact full name |
campaign | string | no | Campaign ID to assign the contact to |
Example
local result = app.integrations.getresponse.create_contact({
email = "john@example.com",
name = "John Doe",
campaign = "campaignIdHere"
})
print("Created contact: " .. result.contactId)
update_contact
Update an existing contact’s details.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | The unique contact identifier |
name | string | no | New name for the contact |
Example
local result = app.integrations.getresponse.update_contact({
id = "abc123",
name = "Jane Doe"
})
print("Contact updated")
delete_contact
Delete a contact from GetResponse permanently.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | The unique contact identifier to delete |
Example
local result = app.integrations.getresponse.delete_contact({
id = "abc123"
})
print(result) -- "Contact 'abc123' has been deleted."
list_campaigns
List all campaigns in your GetResponse account.
Parameters
None.
Example
local result = app.integrations.getresponse.list_campaigns({})
for _, campaign in ipairs(result) do
print(campaign.campaignId .. " - " .. campaign.name)
end
get_campaign
Get details of a specific campaign by ID.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | The unique campaign identifier |
Example
local result = app.integrations.getresponse.get_campaign({
id = "campaignIdHere"
})
print(result.name)
create_campaign
Create a new email campaign in GetResponse.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
name | string | yes | Name for the new campaign |
Example
local result = app.integrations.getresponse.create_campaign({
name = "Q1 Newsletter"
})
print("Created campaign: " .. result.campaignId)
list_newsletters
List newsletters in your GetResponse account.
Parameters
None.
Example
local result = app.integrations.getresponse.list_newsletters({})
for _, newsletter in ipairs(result) do
print(newsletter.subject .. " (" .. newsletter.status .. ")")
end
get_current_user
Get the authenticated user’s account information.
Parameters
None.
Example
local result = app.integrations.getresponse.get_current_user({})
print("Account: " .. result.email)
print("Name: " .. (result.firstName or "") .. " " .. (result.lastName or ""))
Multi-Account Usage
If you have multiple GetResponse accounts configured, use account-specific namespaces:
-- Default account (always works)
app.integrations.getresponse.list_contacts({})
-- Explicit default (portable across setups)
app.integrations.getresponse.default.list_contacts({})
-- Named accounts
app.integrations.getresponse.marketing.list_contacts({})
app.integrations.getresponse.sales.list_contacts({})
All functions are identical across accounts — only the credentials differ.
Raw agent markdown
# GetResponse — Lua API Reference
## list_contacts
List contacts in your GetResponse account with pagination.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `page` | integer | no | Page number (1-based). Default: 1 |
| `perPage` | integer | no | Results per page (max 1000). Default: 50 |
### Example
```lua
local result = app.integrations.getresponse.list_contacts({
page = 1,
perPage = 25
})
for _, contact in ipairs(result) do
print(contact.email .. " - " .. (contact.name or "N/A"))
end
```
---
## get_contact
Get details of a specific contact by ID.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `id` | string | yes | The unique contact identifier |
### Example
```lua
local result = app.integrations.getresponse.get_contact({
id = "abc123"
})
print(result.email)
print(result.name)
```
---
## create_contact
Create a new contact in GetResponse.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `email` | string | yes | Contact email address |
| `name` | string | no | Contact full name |
| `campaign` | string | no | Campaign ID to assign the contact to |
### Example
```lua
local result = app.integrations.getresponse.create_contact({
email = "john@example.com",
name = "John Doe",
campaign = "campaignIdHere"
})
print("Created contact: " .. result.contactId)
```
---
## update_contact
Update an existing contact's details.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `id` | string | yes | The unique contact identifier |
| `name` | string | no | New name for the contact |
### Example
```lua
local result = app.integrations.getresponse.update_contact({
id = "abc123",
name = "Jane Doe"
})
print("Contact updated")
```
---
## delete_contact
Delete a contact from GetResponse permanently.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `id` | string | yes | The unique contact identifier to delete |
### Example
```lua
local result = app.integrations.getresponse.delete_contact({
id = "abc123"
})
print(result) -- "Contact 'abc123' has been deleted."
```
---
## list_campaigns
List all campaigns in your GetResponse account.
### Parameters
None.
### Example
```lua
local result = app.integrations.getresponse.list_campaigns({})
for _, campaign in ipairs(result) do
print(campaign.campaignId .. " - " .. campaign.name)
end
```
---
## get_campaign
Get details of a specific campaign by ID.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `id` | string | yes | The unique campaign identifier |
### Example
```lua
local result = app.integrations.getresponse.get_campaign({
id = "campaignIdHere"
})
print(result.name)
```
---
## create_campaign
Create a new email campaign in GetResponse.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `name` | string | yes | Name for the new campaign |
### Example
```lua
local result = app.integrations.getresponse.create_campaign({
name = "Q1 Newsletter"
})
print("Created campaign: " .. result.campaignId)
```
---
## list_newsletters
List newsletters in your GetResponse account.
### Parameters
None.
### Example
```lua
local result = app.integrations.getresponse.list_newsletters({})
for _, newsletter in ipairs(result) do
print(newsletter.subject .. " (" .. newsletter.status .. ")")
end
```
---
## get_current_user
Get the authenticated user's account information.
### Parameters
None.
### Example
```lua
local result = app.integrations.getresponse.get_current_user({})
print("Account: " .. result.email)
print("Name: " .. (result.firstName or "") .. " " .. (result.lastName or ""))
```
---
## Multi-Account Usage
If you have multiple GetResponse accounts configured, use account-specific namespaces:
```lua
-- Default account (always works)
app.integrations.getresponse.list_contacts({})
-- Explicit default (portable across setups)
app.integrations.getresponse.default.list_contacts({})
-- Named accounts
app.integrations.getresponse.marketing.list_contacts({})
app.integrations.getresponse.sales.list_contacts({})
```
All functions are identical across accounts — only the credentials differ. local result = app.integrations.getresponse.list_contacts({page = 1, perPage = 1})
print(result) Functions
list_contacts Read
List contacts in your GetResponse account. Returns paginated results with contact details including email, name, and campaign.
- Lua path
app.integrations.getresponse.list_contacts- Full name
getresponse.getresponse_list_contacts
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number (1-based). Default: 1. |
perPage | integer | no | Number of contacts per page (max 1000). Default: 50. |
contact Read
Get details of a specific contact in GetResponse by its unique identifier.
- Lua path
app.integrations.getresponse.contact- Full name
getresponse.getresponse_get_contact
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | The unique contact identifier. |
create_contact Write
Create a new contact in GetResponse. Requires an email address. Optionally set the contact name and assign to a campaign.
- Lua path
app.integrations.getresponse.create_contact- Full name
getresponse.getresponse_create_contact
| Parameter | Type | Required | Description |
|---|---|---|---|
email | string | yes | The contact's email address. |
name | string | no | The contact's full name. |
campaign | string | no | Campaign ID to add the contact to. |
update_contact Write
Update an existing contact's details in GetResponse. Provide the contact ID and the fields to update.
- Lua path
app.integrations.getresponse.update_contact- Full name
getresponse.getresponse_update_contact
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | The unique contact identifier. |
name | string | no | The new name for the contact. |
delete_contact Write
Delete a contact from GetResponse. This action is permanent and cannot be undone.
- Lua path
app.integrations.getresponse.delete_contact- Full name
getresponse.getresponse_delete_contact
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | The unique contact identifier to delete. |
list_campaigns Read
List all campaigns in your GetResponse account. Returns campaign IDs and names that can be used when creating contacts.
- Lua path
app.integrations.getresponse.list_campaigns- Full name
getresponse.getresponse_list_campaigns
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
campaign Read
Get details of a specific campaign in GetResponse by its unique identifier.
- Lua path
app.integrations.getresponse.campaign- Full name
getresponse.getresponse_get_campaign
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | The unique campaign identifier. |
create_campaign Write
Create a new email campaign in GetResponse. Campaigns are used to organize and send emails to contact lists.
- Lua path
app.integrations.getresponse.create_campaign- Full name
getresponse.getresponse_create_campaign
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | yes | The name for the new campaign. |
list_newsletters Read
List newsletters in your GetResponse account. Returns newsletter details including subject, status, and send dates.
- Lua path
app.integrations.getresponse.list_newsletters- Full name
getresponse.getresponse_list_newsletters
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
current_user Read
Get the authenticated user's account information from GetResponse, including email, name, and account details.
- Lua path
app.integrations.getresponse.current_user- Full name
getresponse.getresponse_get_current_user
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||