KosmoKrator

productivity

Podia Lua API for KosmoKrator Agents

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

7 functions 7 read 0 write Bearer token auth

Lua Namespace

Agents call this integration through app.integrations.podia.*. Use lua_read_doc("integrations.podia") 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.

Podia — Lua API Reference

list_products

List all online courses and digital downloads in your Podia account.

Parameters

None.

Examples

local result = app.integrations.podia.list_products()

for _, product in ipairs(result.products) do
  print(product.name .. " — " .. product.type .. " (" .. product.id .. ")")
end

get_product

Get detailed information about a single Podia product.

Parameters

NameTypeRequiredDescription
product_idstringyesThe ID of the product to retrieve

Example

local result = app.integrations.podia.get_product({
  product_id = "12345"
})

print(result.product.name)
print(result.product.description)
print(result.product.price)

list_customers

List all customers in your Podia account.

Parameters

NameTypeRequiredDescription
pageintegernoPage number for pagination (default: 1)

Examples

All customers

local result = app.integrations.podia.list_customers()

for _, customer in ipairs(result.customers) do
  print(customer.email .. " — " .. customer.name)
end

Paginated

local result = app.integrations.podia.list_customers({
  page = 2
})

get_customer

Get details for a single customer.

Parameters

NameTypeRequiredDescription
customer_idstringyesThe ID of the customer

Example

local result = app.integrations.podia.get_customer({
  customer_id = "67890"
})

print(result.customer.email)
print(result.customer.name)
print(result.customer.total_spent)

list_sales

List sales from your Podia account with optional filters.

Parameters

NameTypeRequiredDescription
product_idstringnoFilter by product ID
beforestringnoOnly sales before this ISO 8601 timestamp
afterstringnoOnly sales after this ISO 8601 timestamp
pageintegernoPage number for pagination (default: 1)

Examples

All recent sales

local result = app.integrations.podia.list_sales()

for _, sale in ipairs(result.sales) do
  print(sale.email .. " — $" .. sale.amount .. " — " .. sale.product_name)
end

Sales for a specific product

local result = app.integrations.podia.list_sales({
  product_id = "12345"
})

print("Total sales: " .. result.totalCount)

Sales in a date range

local result = app.integrations.podia.list_sales({
  after = "2026-01-01T00:00:00Z",
  before = "2026-01-31T23:59:59Z"
})

get_sale

Get details for a single sale.

Parameters

NameTypeRequiredDescription
sale_idstringyesThe ID of the sale

Example

local result = app.integrations.podia.get_sale({
  sale_id = "SALE123"
})

print(result.sale.email)
print(result.sale.amount)
print(result.sale.status)
print(result.sale.product_name)

get_current_user

Get the profile of the currently authenticated Podia user.

Parameters

None.

Example

local result = app.integrations.podia.get_current_user()

print("Connected as: " .. result.user.name)
print("Email: " .. result.user.email)

Multi-Account Usage

If you have multiple Podia accounts configured, use account-specific namespaces:

-- Default account (always works)
app.integrations.podia.function_name({...})

-- Explicit default (portable across setups)
app.integrations.podia.default.function_name({...})

-- Named accounts
app.integrations.podia.main_site.function_name({...})
app.integrations.podia.course_platform.function_name({...})

All functions are identical across accounts — only the credentials differ.

Raw agent markdown
# Podia — Lua API Reference

## list_products

List all online courses and digital downloads in your Podia account.

### Parameters

None.

### Examples

```lua
local result = app.integrations.podia.list_products()

for _, product in ipairs(result.products) do
  print(product.name .. " — " .. product.type .. " (" .. product.id .. ")")
end
```

---

## get_product

Get detailed information about a single Podia product.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `product_id` | string | yes | The ID of the product to retrieve |

### Example

```lua
local result = app.integrations.podia.get_product({
  product_id = "12345"
})

print(result.product.name)
print(result.product.description)
print(result.product.price)
```

---

## list_customers

List all customers in your Podia account.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `page` | integer | no | Page number for pagination (default: 1) |

### Examples

#### All customers

```lua
local result = app.integrations.podia.list_customers()

for _, customer in ipairs(result.customers) do
  print(customer.email .. " — " .. customer.name)
end
```

#### Paginated

```lua
local result = app.integrations.podia.list_customers({
  page = 2
})
```

---

## get_customer

Get details for a single customer.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `customer_id` | string | yes | The ID of the customer |

### Example

```lua
local result = app.integrations.podia.get_customer({
  customer_id = "67890"
})

print(result.customer.email)
print(result.customer.name)
print(result.customer.total_spent)
```

---

## list_sales

List sales from your Podia account with optional filters.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `product_id` | string | no | Filter by product ID |
| `before` | string | no | Only sales before this ISO 8601 timestamp |
| `after` | string | no | Only sales after this ISO 8601 timestamp |
| `page` | integer | no | Page number for pagination (default: 1) |

### Examples

#### All recent sales

```lua
local result = app.integrations.podia.list_sales()

for _, sale in ipairs(result.sales) do
  print(sale.email .. " — $" .. sale.amount .. " — " .. sale.product_name)
end
```

#### Sales for a specific product

```lua
local result = app.integrations.podia.list_sales({
  product_id = "12345"
})

print("Total sales: " .. result.totalCount)
```

#### Sales in a date range

```lua
local result = app.integrations.podia.list_sales({
  after = "2026-01-01T00:00:00Z",
  before = "2026-01-31T23:59:59Z"
})
```

---

## get_sale

Get details for a single sale.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `sale_id` | string | yes | The ID of the sale |

### Example

```lua
local result = app.integrations.podia.get_sale({
  sale_id = "SALE123"
})

print(result.sale.email)
print(result.sale.amount)
print(result.sale.status)
print(result.sale.product_name)
```

---

## get_current_user

Get the profile of the currently authenticated Podia user.

### Parameters

None.

### Example

```lua
local result = app.integrations.podia.get_current_user()

print("Connected as: " .. result.user.name)
print("Email: " .. result.user.email)
```

---

## Multi-Account Usage

If you have multiple Podia accounts configured, use account-specific namespaces:

```lua
-- Default account (always works)
app.integrations.podia.function_name({...})

-- Explicit default (portable across setups)
app.integrations.podia.default.function_name({...})

-- Named accounts
app.integrations.podia.main_site.function_name({...})
app.integrations.podia.course_platform.function_name({...})
```

All functions are identical across accounts — only the credentials differ.

Metadata-Derived Lua Example

local result = app.integrations.podia.podia_list_products({})
print(result)

Functions

podia_list_products

List all online courses and digital downloads in your Podia account. Returns product names, IDs, types, and metadata.

Operation
Read read
Full name
podia.podia_list_products
ParameterTypeRequiredDescription
No parameters.

podia_get_product

Get detailed information about a single Podia product by its ID. Returns full product data including description, price, type (course or download), and purchase URL.

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

podia_list_customers

List all customers in your Podia account. Returns customer names, emails, and purchase history summaries.

Operation
Read read
Full name
podia.podia_list_customers
ParameterTypeRequiredDescription
page integer no Page number for pagination (default: 1).

podia_get_customer

Get detailed information about a single Podia customer by their ID. Returns customer status, email, and purchase details.

Operation
Read read
Full name
podia.podia_get_customer
ParameterTypeRequiredDescription
customer_id string yes The ID of the customer to retrieve.

podia_list_sales

List sales from your Podia account. Optionally filter by product ID, date range, or page. Returns sale details including buyer info, amount, and product.

Operation
Read read
Full name
podia.podia_list_sales
ParameterTypeRequiredDescription
product_id string no Filter sales by a specific product ID.
before string no Only return sales before this ISO 8601 timestamp (e.g., "2026-01-01T00:00:00Z").
after string no Only return sales after this ISO 8601 timestamp (e.g., "2026-01-01T00:00:00Z").
page integer no Page number for pagination (default: 1).

podia_get_sale

Get detailed information about a single Podia sale by its ID. Returns full sale data including buyer details, amount, product, and payment status.

Operation
Read read
Full name
podia.podia_get_sale
ParameterTypeRequiredDescription
sale_id string yes The ID of the sale to retrieve.

podia_get_current_user

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

Operation
Read read
Full name
podia.podia_get_current_user
ParameterTypeRequiredDescription
No parameters.