KosmoKrator

productivity

Basecamp 3 Lua API for KosmoKrator Agents

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

7 functions 6 read 1 write Manual OAuth token auth

Lua Namespace

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

Basecamp 3 — Lua API Reference

list_projects

List all Basecamp projects visible to the authenticated user.

Parameters

None required.

Example

local result = app.integrations.basecamp.list_projects({})

for _, project in ipairs(result) do
  print(project.id .. ": " .. project.name)
end

get_project

Get details for a single Basecamp project.

Parameters

NameTypeRequiredDescription
project_idintegeryesThe Basecamp project ID

Example

local result = app.integrations.basecamp.get_project({
  project_id = 12345
})

print("Project: " .. result.name)
print("Description: " .. (result.description or "none"))

list_todos

List to-dos in a specific Basecamp to-do list.

Parameters

NameTypeRequiredDescription
project_idintegeryesThe Basecamp project ID
todoset_idintegeryesThe to-do set (bucket) ID within the project
todolist_idintegeryesThe specific to-do list ID

Example

local result = app.integrations.basecamp.list_todos({
  project_id = 12345,
  todoset_id = 67890,
  todolist_id = 11111
})

for _, todo in ipairs(result) do
  print(todo.content .. (todo.completed and " ✓" or " ○"))
end

create_todo

Create a new to-do in a Basecamp to-do list.

Parameters

NameTypeRequiredDescription
project_idintegeryesThe Basecamp project ID
todoset_idintegeryesThe to-do set (bucket) ID within the project
todolist_idintegeryesThe specific to-do list ID
contentstringyesThe to-do text
descriptionstringnoExtended description (HTML supported)
due_onstringnoDue date in ISO 8601 format (e.g., “2026-04-30”)
assignee_idsarraynoList of person IDs to assign (e.g., {1234, 5678})

Example

local result = app.integrations.basecamp.create_todo({
  project_id = 12345,
  todoset_id = 67890,
  todolist_id = 11111,
  content = "Review the latest pull request",
  description = "Check PR #42 for the auth module changes",
  due_on = "2026-04-30"
})

print("Created to-do: " .. result.content)

list_messages

List messages (message board posts) for a Basecamp project.

Parameters

NameTypeRequiredDescription
project_idintegeryesThe Basecamp project ID

Example

local result = app.integrations.basecamp.list_messages({
  project_id = 12345
})

for _, msg in ipairs(result) do
  print(msg.subject .. " by " .. (msg.creator.name or "unknown"))
end

get_message

Get a single message from a Basecamp project.

Parameters

NameTypeRequiredDescription
project_idintegeryesThe Basecamp project ID
message_idintegeryesThe message (board post) ID

Example

local result = app.integrations.basecamp.get_message({
  project_id = 12345,
  message_id = 99999
})

print("Subject: " .. result.subject)
print("By: " .. result.creator.name)

get_current_user

Get the profile of the currently authenticated Basecamp user.

Parameters

None required.

Example

local result = app.integrations.basecamp.get_current_user({})

print("Logged in as: " .. result.first_name .. " " .. result.last_name)
print("Email: " .. result.email_address)

Multi-Account Usage

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

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

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

-- Named accounts
app.integrations.basecamp.work.function_name({...})
app.integrations.basecamp.client.function_name({...})

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

Raw agent markdown
# Basecamp 3 — Lua API Reference

## list_projects

List all Basecamp projects visible to the authenticated user.

### Parameters

*None required.*

### Example

```lua
local result = app.integrations.basecamp.list_projects({})

for _, project in ipairs(result) do
  print(project.id .. ": " .. project.name)
end
```

---

## get_project

Get details for a single Basecamp project.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `project_id` | integer | yes | The Basecamp project ID |

### Example

```lua
local result = app.integrations.basecamp.get_project({
  project_id = 12345
})

print("Project: " .. result.name)
print("Description: " .. (result.description or "none"))
```

---

## list_todos

List to-dos in a specific Basecamp to-do list.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `project_id` | integer | yes | The Basecamp project ID |
| `todoset_id` | integer | yes | The to-do set (bucket) ID within the project |
| `todolist_id` | integer | yes | The specific to-do list ID |

### Example

```lua
local result = app.integrations.basecamp.list_todos({
  project_id = 12345,
  todoset_id = 67890,
  todolist_id = 11111
})

for _, todo in ipairs(result) do
  print(todo.content .. (todo.completed and " ✓" or " ○"))
end
```

---

## create_todo

Create a new to-do in a Basecamp to-do list.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `project_id` | integer | yes | The Basecamp project ID |
| `todoset_id` | integer | yes | The to-do set (bucket) ID within the project |
| `todolist_id` | integer | yes | The specific to-do list ID |
| `content` | string | yes | The to-do text |
| `description` | string | no | Extended description (HTML supported) |
| `due_on` | string | no | Due date in ISO 8601 format (e.g., "2026-04-30") |
| `assignee_ids` | array | no | List of person IDs to assign (e.g., {1234, 5678}) |

### Example

```lua
local result = app.integrations.basecamp.create_todo({
  project_id = 12345,
  todoset_id = 67890,
  todolist_id = 11111,
  content = "Review the latest pull request",
  description = "Check PR #42 for the auth module changes",
  due_on = "2026-04-30"
})

print("Created to-do: " .. result.content)
```

---

## list_messages

List messages (message board posts) for a Basecamp project.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `project_id` | integer | yes | The Basecamp project ID |

### Example

```lua
local result = app.integrations.basecamp.list_messages({
  project_id = 12345
})

for _, msg in ipairs(result) do
  print(msg.subject .. " by " .. (msg.creator.name or "unknown"))
end
```

---

## get_message

Get a single message from a Basecamp project.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `project_id` | integer | yes | The Basecamp project ID |
| `message_id` | integer | yes | The message (board post) ID |

### Example

```lua
local result = app.integrations.basecamp.get_message({
  project_id = 12345,
  message_id = 99999
})

print("Subject: " .. result.subject)
print("By: " .. result.creator.name)
```

---

## get_current_user

Get the profile of the currently authenticated Basecamp user.

### Parameters

*None required.*

### Example

```lua
local result = app.integrations.basecamp.get_current_user({})

print("Logged in as: " .. result.first_name .. " " .. result.last_name)
print("Email: " .. result.email_address)
```

---

## Multi-Account Usage

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

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

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

-- Named accounts
app.integrations.basecamp.work.function_name({...})
app.integrations.basecamp.client.function_name({...})
```

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

Metadata-Derived Lua Example

local result = app.integrations.basecamp.basecamp_list_projects({})
print(result)

Functions

basecamp_list_projects

List all Basecamp projects visible to the authenticated user. Returns project names, IDs, descriptions, and creation dates.

Operation
Read read
Full name
basecamp.basecamp_list_projects
ParameterTypeRequiredDescription
No parameters.

basecamp_get_project

Get details for a single Basecamp project by ID. Returns the project name, description, members, and metadata.

Operation
Read read
Full name
basecamp.basecamp_get_project
ParameterTypeRequiredDescription
project_id integer yes The Basecamp project ID.

basecamp_list_todos

List to-dos in a Basecamp to-do list. Requires the project ID, to-do set ID, and to-do list ID. Returns to-do items with their content, completion status, assignees, and due dates.

Operation
Read read
Full name
basecamp.basecamp_list_todos
ParameterTypeRequiredDescription
project_id integer yes The Basecamp project ID.
todoset_id integer yes The to-do set (bucket) ID within the project. Typically found in the project's "todolists" tool.
todolist_id integer yes The specific to-do list ID to retrieve to-dos from.

basecamp_create_todo

Create a new to-do in a Basecamp to-do list. Specify the project, to-do set, to-do list, and to-do text. Optionally include a description, due date, and assignee IDs.

Operation
Write write
Full name
basecamp.basecamp_create_todo
ParameterTypeRequiredDescription
project_id integer yes The Basecamp project ID.
todoset_id integer yes The to-do set (bucket) ID within the project.
todolist_id integer yes The specific to-do list ID to add the to-do to.
content string yes The to-do text (e.g., "Review pull request").
description string no Extended description for the to-do. Supports HTML formatting.
due_on string no Due date in ISO 8601 format (e.g., "2026-04-30").
assignee_ids array no List of person IDs to assign (e.g., [1234, 5678]).

basecamp_list_messages

List messages (message board posts) for a Basecamp project. Returns message subjects, content excerpts, authors, and timestamps.

Operation
Read read
Full name
basecamp.basecamp_list_messages
ParameterTypeRequiredDescription
project_id integer yes The Basecamp project ID.

basecamp_get_message

Get a single message from a Basecamp project by ID. Returns the full message subject, content, author, and metadata.

Operation
Read read
Full name
basecamp.basecamp_get_message
ParameterTypeRequiredDescription
project_id integer yes The Basecamp project ID.
message_id integer yes The message (board post) ID.

basecamp_get_current_user

Get the profile of the currently authenticated Basecamp user. Returns name, email, avatar, and account details.

Operation
Read read
Full name
basecamp.basecamp_get_current_user
ParameterTypeRequiredDescription
No parameters.