KosmoKrator

productivity

Kajabi Lua API for KosmoKrator Agents

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

7 functions 7 read 0 write Bearer token auth

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.

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

NameTypeRequiredDescription
pageintegernoPage number for pagination (default: 1)
per_pageintegernoNumber 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

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

NameTypeRequiredDescription
pageintegernoPage number for pagination (default: 1)
per_pageintegernoNumber 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

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

NameTypeRequiredDescription
pageintegernoPage number for pagination (default: 1)
per_pageintegernoNumber 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

NameTypeRequiredDescription
member_idstringyesThe 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.

Metadata-Derived Lua Example

local result = app.integrations.kajabi.kajabi_list_offers({
  page = 1,
  per_page = 1
})
print(result)

Functions

kajabi_list_offers

List all offers in your Kajabi account. Returns offer names, IDs, prices, and associated products.

Operation
Read read
Full name
kajabi.kajabi_list_offers
ParameterTypeRequiredDescription
page integer no Page number for pagination (default: 1).
per_page integer no Number of results per page (default: 25).

kajabi_get_offer

Get detailed information about a single Kajabi offer by its ID. Returns full offer data including title, price, and associated product details.

Operation
Read read
Full name
kajabi.kajabi_get_offer
ParameterTypeRequiredDescription
offer_id string yes The ID of the offer to retrieve.

kajabi_list_products

List all products (courses, coaching programs, memberships) in your Kajabi account. Returns product names, IDs, types, and metadata.

Operation
Read read
Full name
kajabi.kajabi_list_products
ParameterTypeRequiredDescription
page integer no Page number for pagination (default: 1).
per_page integer no Number of results per page (default: 25).

kajabi_get_product

Get detailed information about a single Kajabi product by its ID. Returns full product data including description, pricing, and content details.

Operation
Read read
Full name
kajabi.kajabi_get_product
ParameterTypeRequiredDescription
product_id string yes The ID of the product to retrieve.

kajabi_list_members

List all members in your Kajabi account. Returns member names, emails, status, and enrollment details.

Operation
Read read
Full name
kajabi.kajabi_list_members
ParameterTypeRequiredDescription
page integer no Page number for pagination (default: 1).
per_page integer no Number of results per page (default: 25).

kajabi_get_member

Get detailed information about a single Kajabi member by their ID. Returns member profile, email, status, and enrollment details.

Operation
Read read
Full name
kajabi.kajabi_get_member
ParameterTypeRequiredDescription
member_id string yes The ID of the member to retrieve.

kajabi_get_current_user

Get the profile of the currently authenticated Kajabi user. Useful to verify the connection and see account details.

Operation
Read read
Full name
kajabi.kajabi_get_current_user
ParameterTypeRequiredDescription
No parameters.