productivity
Kajabi Lua API for KosmoKrator Agents
Agent-facing Lua documentation and function reference for the Kajabi KosmoKrator integration.Lua Namespace
Agents call this integration through app.integrations.kajabi.*.
Use lua_read_doc("integrations.kajabi") 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
Kajabi workflow without starting an interactive agent session.
kosmo integrations:lua --eval 'dump(app.integrations.kajabi.list_offers({page = 1, per_page = 1}))' --json kosmo integrations:lua --eval 'print(docs.read("kajabi"))' --json
kosmo integrations:lua --eval 'print(docs.read("kajabi.list_offers"))' --json Workflow file
Put repeatable logic in a Lua file, then execute it with JSON output for the calling process.
local kajabi = app.integrations.kajabi
local result = kajabi.list_offers({page = 1, per_page = 1})
dump(result) kosmo integrations:lua workflow.lua --json
kosmo integrations:lua workflow.lua --force --json integrations:lua exposes app.integrations.kajabi, app.mcp.*, docs.*, json.*, and regex.*. Use app.integrations.kajabi.default.* or app.integrations.kajabi.work.* when you configured named credential accounts.
MCP-only Lua
If the script only needs configured MCP servers and does not need Kajabi, 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.
Kajabi — Lua API Reference
list_offers
List all offers in your Kajabi account.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number for pagination (default: 1) |
per_page | integer | no | Number of results per page (default: 25) |
Examples
local result = app.integrations.kajabi.list_offers()
for _, offer in ipairs(result.offers) do
print(offer.title .. " — " .. offer.id)
end
get_offer
Get detailed information about a single Kajabi offer.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
offer_id | string | yes | The ID of the offer to retrieve |
Example
local result = app.integrations.kajabi.get_offer({
offer_id = "abc123"
})
print(result.title)
print(result.price)
list_products
List all products (courses, coaching programs, memberships) in your Kajabi account.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number for pagination (default: 1) |
per_page | integer | no | Number of results per page (default: 25) |
Examples
All products
local result = app.integrations.kajabi.list_products()
for _, product in ipairs(result.products) do
print(product.title .. " — " .. product.type .. " (" .. product.id .. ")")
end
Paginated results
local result = app.integrations.kajabi.list_products({
page = 2,
per_page = 10
})
get_product
Get detailed information about a single Kajabi product.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
product_id | string | yes | The ID of the product to retrieve |
Example
local result = app.integrations.kajabi.get_product({
product_id = "abc123"
})
print(result.title)
print(result.description)
print(result.type)
list_members
List all members in your Kajabi account.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number for pagination (default: 1) |
per_page | integer | no | Number of results per page (default: 25) |
Examples
All members
local result = app.integrations.kajabi.list_members()
for _, member in ipairs(result.members) do
print(member.name .. " — " .. member.email .. " — " .. member.status)
end
Paginated results
local result = app.integrations.kajabi.list_members({
page = 2,
per_page = 50
})
print("Total members on page: " .. result.totalCount)
get_member
Get details for a single member.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
member_id | string | yes | The ID of the member |
Example
local result = app.integrations.kajabi.get_member({
member_id = "abc123"
})
print(result.name)
print(result.email)
print(result.status)
get_current_user
Get the profile of the currently authenticated Kajabi user.
Parameters
None.
Example
local result = app.integrations.kajabi.get_current_user()
print("Connected as: " .. result.name)
print("Email: " .. result.email)
Multi-Account Usage
If you have multiple Kajabi accounts configured, use account-specific namespaces:
-- Default account (always works)
app.integrations.kajabi.function_name({...})
-- Explicit default (portable across setups)
app.integrations.kajabi.default.function_name({...})
-- Named accounts
app.integrations.kajabi.main_site.function_name({...})
app.integrations.kajabi.coaching.function_name({...})
All functions are identical across accounts — only the credentials differ.
Raw agent markdown
# Kajabi — Lua API Reference
## list_offers
List all offers in your Kajabi account.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `page` | integer | no | Page number for pagination (default: 1) |
| `per_page` | integer | no | Number of results per page (default: 25) |
### Examples
```lua
local result = app.integrations.kajabi.list_offers()
for _, offer in ipairs(result.offers) do
print(offer.title .. " — " .. offer.id)
end
```
---
## get_offer
Get detailed information about a single Kajabi offer.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `offer_id` | string | yes | The ID of the offer to retrieve |
### Example
```lua
local result = app.integrations.kajabi.get_offer({
offer_id = "abc123"
})
print(result.title)
print(result.price)
```
---
## list_products
List all products (courses, coaching programs, memberships) in your Kajabi account.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `page` | integer | no | Page number for pagination (default: 1) |
| `per_page` | integer | no | Number of results per page (default: 25) |
### Examples
#### All products
```lua
local result = app.integrations.kajabi.list_products()
for _, product in ipairs(result.products) do
print(product.title .. " — " .. product.type .. " (" .. product.id .. ")")
end
```
#### Paginated results
```lua
local result = app.integrations.kajabi.list_products({
page = 2,
per_page = 10
})
```
---
## get_product
Get detailed information about a single Kajabi product.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `product_id` | string | yes | The ID of the product to retrieve |
### Example
```lua
local result = app.integrations.kajabi.get_product({
product_id = "abc123"
})
print(result.title)
print(result.description)
print(result.type)
```
---
## list_members
List all members in your Kajabi account.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `page` | integer | no | Page number for pagination (default: 1) |
| `per_page` | integer | no | Number of results per page (default: 25) |
### Examples
#### All members
```lua
local result = app.integrations.kajabi.list_members()
for _, member in ipairs(result.members) do
print(member.name .. " — " .. member.email .. " — " .. member.status)
end
```
#### Paginated results
```lua
local result = app.integrations.kajabi.list_members({
page = 2,
per_page = 50
})
print("Total members on page: " .. result.totalCount)
```
---
## get_member
Get details for a single member.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `member_id` | string | yes | The ID of the member |
### Example
```lua
local result = app.integrations.kajabi.get_member({
member_id = "abc123"
})
print(result.name)
print(result.email)
print(result.status)
```
---
## get_current_user
Get the profile of the currently authenticated Kajabi user.
### Parameters
None.
### Example
```lua
local result = app.integrations.kajabi.get_current_user()
print("Connected as: " .. result.name)
print("Email: " .. result.email)
```
---
## Multi-Account Usage
If you have multiple Kajabi accounts configured, use account-specific namespaces:
```lua
-- Default account (always works)
app.integrations.kajabi.function_name({...})
-- Explicit default (portable across setups)
app.integrations.kajabi.default.function_name({...})
-- Named accounts
app.integrations.kajabi.main_site.function_name({...})
app.integrations.kajabi.coaching.function_name({...})
```
All functions are identical across accounts — only the credentials differ. local result = app.integrations.kajabi.list_offers({page = 1, per_page = 1})
print(result) Functions
list_offers Read
List all offers in your Kajabi account. Returns offer names, IDs, prices, and associated products.
- Lua path
app.integrations.kajabi.list_offers- Full name
kajabi.kajabi_list_offers
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number for pagination (default: 1). |
per_page | integer | no | Number of results per page (default: 25). |
get_offer Read
Get detailed information about a single Kajabi offer by its ID. Returns full offer data including title, price, and associated product details.
- Lua path
app.integrations.kajabi.get_offer- Full name
kajabi.kajabi_get_offer
| Parameter | Type | Required | Description |
|---|---|---|---|
offer_id | string | yes | The ID of the offer to retrieve. |
list_products Read
List all products (courses, coaching programs, memberships) in your Kajabi account. Returns product names, IDs, types, and metadata.
- Lua path
app.integrations.kajabi.list_products- Full name
kajabi.kajabi_list_products
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number for pagination (default: 1). |
per_page | integer | no | Number of results per page (default: 25). |
get_product Read
Get detailed information about a single Kajabi product by its ID. Returns full product data including description, pricing, and content details.
- Lua path
app.integrations.kajabi.get_product- Full name
kajabi.kajabi_get_product
| Parameter | Type | Required | Description |
|---|---|---|---|
product_id | string | yes | The ID of the product to retrieve. |
list_members Read
List all members in your Kajabi account. Returns member names, emails, status, and enrollment details.
- Lua path
app.integrations.kajabi.list_members- Full name
kajabi.kajabi_list_members
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number for pagination (default: 1). |
per_page | integer | no | Number of results per page (default: 25). |
get_member Read
Get detailed information about a single Kajabi member by their ID. Returns member profile, email, status, and enrollment details.
- Lua path
app.integrations.kajabi.get_member- Full name
kajabi.kajabi_get_member
| Parameter | Type | Required | Description |
|---|---|---|---|
member_id | string | yes | The ID of the member to retrieve. |
get_current_user Read
Get the profile of the currently authenticated Kajabi user. Useful to verify the connection and see account details.
- Lua path
app.integrations.kajabi.get_current_user- Full name
kajabi.kajabi_get_current_user
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||