KosmoKrator

marketing

Hootsuite Lua API for KosmoKrator Agents

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

7 functions 6 read 1 write Manual OAuth token auth

Lua Namespace

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

Hootsuite — Lua API Reference

list_messages

List scheduled and past messages in Hootsuite.

Parameters

NameTypeRequiredDescription
startTimestringnoStart of time range (ISO 8601, e.g., "2025-01-01T00:00:00Z")
endTimestringnoEnd of time range (ISO 8601, e.g., "2025-01-31T23:59:59Z")
limitintegernoMaximum number of messages to return
socialProfileIdsarraynoArray of social profile IDs to filter by

Example

local result = app.integrations.hootsuite.list_messages({
  startTime = "2025-01-01T00:00:00Z",
  endTime = "2025-01-31T23:59:59Z",
  limit = 20
})

for _, msg in ipairs(result.data) do
  print(msg.id .. ": " .. msg.text)
end

get_message

Get details of a specific message by ID.

Parameters

NameTypeRequiredDescription
messageIdstringyesThe message ID to retrieve

Example

local result = app.integrations.hootsuite.get_message({
  messageId = "123456789"
})
print(result.data.text)
print(result.data.state)

create_message

Schedule a new social media message.

Parameters

NameTypeRequiredDescription
textstringyesThe message text content
socialProfileIdsarrayyesSocial profile IDs to publish to
scheduledSendTimestringyesISO 8601 timestamp (e.g., "2025-02-01T09:00:00Z")

Example

local result = app.integrations.hootsuite.create_message({
  text = "Check out our latest blog post!",
  socialProfileIds = {"12345", "67890"},
  scheduledSendTime = "2025-02-01T09:00:00Z"
})
print("Created message: " .. result.data[1].id)

list_social_profiles

List all social media profiles connected to the Hootsuite account.

Parameters

None.

Example

local result = app.integrations.hootsuite.list_social_profiles()

for _, profile in ipairs(result.data) do
  print(profile.id .. ": " .. profile.socialNetworkUsername .. " (" .. profile.type .. ")")
end

get_social_profile

Get details of a specific social profile.

Parameters

NameTypeRequiredDescription
profileIdstringyesThe social profile ID

Example

local result = app.integrations.hootsuite.get_social_profile({
  profileId = "12345"
})
print(result.data.socialNetworkUsername)
print(result.data.type)

list_members

List members of the Hootsuite organization.

Parameters

NameTypeRequiredDescription
limitintegernoMaximum number of members to return

Example

local result = app.integrations.hootsuite.list_members({
  limit = 50
})

for _, member in ipairs(result.data) do
  print(member.id .. ": " .. (member.firstName or "") .. " " .. (member.lastName or ""))
end

get_current_user

Get the currently authenticated Hootsuite user profile.

Parameters

None.

Example

local result = app.integrations.hootsuite.get_current_user()
print("Logged in as: " .. (result.data.firstName or "") .. " " .. (result.data.lastName or ""))
print("Email: " .. (result.data.email or ""))

Multi-Account Usage

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

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

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

-- Named accounts
app.integrations.hootsuite.client_acct.function_name({...})
app.integrations.hootsuite.agency.function_name({...})

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

Raw agent markdown
# Hootsuite — Lua API Reference

## list_messages

List scheduled and past messages in Hootsuite.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `startTime` | string | no | Start of time range (ISO 8601, e.g., `"2025-01-01T00:00:00Z"`) |
| `endTime` | string | no | End of time range (ISO 8601, e.g., `"2025-01-31T23:59:59Z"`) |
| `limit` | integer | no | Maximum number of messages to return |
| `socialProfileIds` | array | no | Array of social profile IDs to filter by |

### Example

```lua
local result = app.integrations.hootsuite.list_messages({
  startTime = "2025-01-01T00:00:00Z",
  endTime = "2025-01-31T23:59:59Z",
  limit = 20
})

for _, msg in ipairs(result.data) do
  print(msg.id .. ": " .. msg.text)
end
```

---

## get_message

Get details of a specific message by ID.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `messageId` | string | yes | The message ID to retrieve |

### Example

```lua
local result = app.integrations.hootsuite.get_message({
  messageId = "123456789"
})
print(result.data.text)
print(result.data.state)
```

---

## create_message

Schedule a new social media message.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `text` | string | yes | The message text content |
| `socialProfileIds` | array | yes | Social profile IDs to publish to |
| `scheduledSendTime` | string | yes | ISO 8601 timestamp (e.g., `"2025-02-01T09:00:00Z"`) |

### Example

```lua
local result = app.integrations.hootsuite.create_message({
  text = "Check out our latest blog post!",
  socialProfileIds = {"12345", "67890"},
  scheduledSendTime = "2025-02-01T09:00:00Z"
})
print("Created message: " .. result.data[1].id)
```

---

## list_social_profiles

List all social media profiles connected to the Hootsuite account.

### Parameters

None.

### Example

```lua
local result = app.integrations.hootsuite.list_social_profiles()

for _, profile in ipairs(result.data) do
  print(profile.id .. ": " .. profile.socialNetworkUsername .. " (" .. profile.type .. ")")
end
```

---

## get_social_profile

Get details of a specific social profile.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `profileId` | string | yes | The social profile ID |

### Example

```lua
local result = app.integrations.hootsuite.get_social_profile({
  profileId = "12345"
})
print(result.data.socialNetworkUsername)
print(result.data.type)
```

---

## list_members

List members of the Hootsuite organization.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `limit` | integer | no | Maximum number of members to return |

### Example

```lua
local result = app.integrations.hootsuite.list_members({
  limit = 50
})

for _, member in ipairs(result.data) do
  print(member.id .. ": " .. (member.firstName or "") .. " " .. (member.lastName or ""))
end
```

---

## get_current_user

Get the currently authenticated Hootsuite user profile.

### Parameters

None.

### Example

```lua
local result = app.integrations.hootsuite.get_current_user()
print("Logged in as: " .. (result.data.firstName or "") .. " " .. (result.data.lastName or ""))
print("Email: " .. (result.data.email or ""))
```

---

## Multi-Account Usage

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

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

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

-- Named accounts
app.integrations.hootsuite.client_acct.function_name({...})
app.integrations.hootsuite.agency.function_name({...})
```

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

Metadata-Derived Lua Example

local result = app.integrations.hootsuite.hootsuite_list_messages({
  startTime = "example_startTime",
  endTime = "example_endTime",
  limit = 1,
  socialProfileIds = "example_socialProfileIds"
})
print(result)

Functions

hootsuite_list_messages

List scheduled and past messages in Hootsuite. Filter by time range, social profiles, and limit. Returns message IDs, text, scheduled send times, and status.

Operation
Read read
Full name
hootsuite.hootsuite_list_messages
ParameterTypeRequiredDescription
startTime string no Start of time range in ISO 8601 format (e.g., "2025-01-01T00:00:00Z").
endTime string no End of time range in ISO 8601 format (e.g., "2025-01-31T23:59:59Z").
limit integer no Maximum number of messages to return.
socialProfileIds array no Array of social profile IDs to filter messages by.

hootsuite_get_message

Get details of a specific Hootsuite message by its ID. Returns the message text, scheduled send time, social profiles, and delivery status.

Operation
Read read
Full name
hootsuite.hootsuite_get_message
ParameterTypeRequiredDescription
messageId string yes The message ID to retrieve.

hootsuite_create_message

Schedule a new social media message in Hootsuite. Provide the text content, target social profile IDs, and the scheduled send time.

Operation
Write write
Full name
hootsuite.hootsuite_create_message
ParameterTypeRequiredDescription
text string yes The message text content to post.
socialProfileIds array yes Array of social profile IDs to publish the message to.
scheduledSendTime string yes ISO 8601 timestamp for when the message should be sent (e.g., "2025-02-01T09:00:00Z").

hootsuite_list_social_profiles

List all social media profiles connected to the Hootsuite account. Returns profile IDs, types (e.g., Twitter, Facebook, LinkedIn), and display names.

Operation
Read read
Full name
hootsuite.hootsuite_list_social_profiles
ParameterTypeRequiredDescription
No parameters.

hootsuite_get_social_profile

Get details of a specific social media profile in Hootsuite by its ID. Returns profile type, display name, and account metadata.

Operation
Read read
Full name
hootsuite.hootsuite_get_social_profile
ParameterTypeRequiredDescription
profileId string yes The social profile ID to retrieve.

hootsuite_list_members

List members of the Hootsuite organization. Returns member IDs, names, emails, and roles. Use limit to control page size.

Operation
Read read
Full name
hootsuite.hootsuite_list_members
ParameterTypeRequiredDescription
limit integer no Maximum number of members to return.

hootsuite_get_current_user

Get the currently authenticated Hootsuite user profile. Returns the member name, email, and organization info.

Operation
Read read
Full name
hootsuite.hootsuite_get_current_user
ParameterTypeRequiredDescription
No parameters.