KosmoKrator

email_marketing

GetResponse Lua API for KosmoKrator Agents

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

10 functions 6 read 4 write API key auth

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.

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

NameTypeRequiredDescription
pageintegernoPage number (1-based). Default: 1
perPageintegernoResults 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

NameTypeRequiredDescription
idstringyesThe 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

NameTypeRequiredDescription
emailstringyesContact email address
namestringnoContact full name
campaignstringnoCampaign ID to assign the contact to

Example

local result = app.integrations.getresponse.create_contact({
  email = "[email protected]",
  name = "John Doe",
  campaign = "campaignIdHere"
})

print("Created contact: " .. result.contactId)

update_contact

Update an existing contact’s details.

Parameters

NameTypeRequiredDescription
idstringyesThe unique contact identifier
namestringnoNew 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

NameTypeRequiredDescription
idstringyesThe 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

NameTypeRequiredDescription
idstringyesThe 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

NameTypeRequiredDescription
namestringyesName 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 = "[email protected]",
  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.

Metadata-Derived Lua Example

local result = app.integrations.getresponse.getresponse_list_contacts({
  page = 1,
  perPage = 1
})
print(result)

Functions

getresponse_list_contacts

List contacts in your GetResponse account. Returns paginated results with contact details including email, name, and campaign.

Operation
Read read
Full name
getresponse.getresponse_list_contacts
ParameterTypeRequiredDescription
page integer no Page number (1-based). Default: 1.
perPage integer no Number of contacts per page (max 1000). Default: 50.

getresponse_get_contact

Get details of a specific contact in GetResponse by its unique identifier.

Operation
Read read
Full name
getresponse.getresponse_get_contact
ParameterTypeRequiredDescription
id string yes The unique contact identifier.

getresponse_create_contact

Create a new contact in GetResponse. Requires an email address. Optionally set the contact name and assign to a campaign.

Operation
Write write
Full name
getresponse.getresponse_create_contact
ParameterTypeRequiredDescription
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.

getresponse_update_contact

Update an existing contact's details in GetResponse. Provide the contact ID and the fields to update.

Operation
Write write
Full name
getresponse.getresponse_update_contact
ParameterTypeRequiredDescription
id string yes The unique contact identifier.
name string no The new name for the contact.

getresponse_delete_contact

Delete a contact from GetResponse. This action is permanent and cannot be undone.

Operation
Write write
Full name
getresponse.getresponse_delete_contact
ParameterTypeRequiredDescription
id string yes The unique contact identifier to delete.

getresponse_list_campaigns

List all campaigns in your GetResponse account. Returns campaign IDs and names that can be used when creating contacts.

Operation
Read read
Full name
getresponse.getresponse_list_campaigns
ParameterTypeRequiredDescription
No parameters.

getresponse_get_campaign

Get details of a specific campaign in GetResponse by its unique identifier.

Operation
Read read
Full name
getresponse.getresponse_get_campaign
ParameterTypeRequiredDescription
id string yes The unique campaign identifier.

getresponse_create_campaign

Create a new email campaign in GetResponse. Campaigns are used to organize and send emails to contact lists.

Operation
Write write
Full name
getresponse.getresponse_create_campaign
ParameterTypeRequiredDescription
name string yes The name for the new campaign.

getresponse_list_newsletters

List newsletters in your GetResponse account. Returns newsletter details including subject, status, and send dates.

Operation
Read read
Full name
getresponse.getresponse_list_newsletters
ParameterTypeRequiredDescription
No parameters.

getresponse_get_current_user

Get the authenticated user's account information from GetResponse, including email, name, and account details.

Operation
Read read
Full name
getresponse.getresponse_get_current_user
ParameterTypeRequiredDescription
No parameters.