productivity
Pushover Lua API for KosmoKrator Agents
Agent-facing Lua documentation and function reference for the Pushover KosmoKrator integration.Lua Namespace
Agents call this integration through app.integrations.pushover.*.
Use lua_read_doc("integrations.pushover") 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
Pushover workflow without starting an interactive agent session.
kosmo integrations:lua --eval 'dump(app.integrations.pushover.add_group_user({group_key = "example_group_key", user_key = "example_user_key", device = "example_device", memo = "example_memo"}))' --json kosmo integrations:lua --eval 'print(docs.read("pushover"))' --json
kosmo integrations:lua --eval 'print(docs.read("pushover.add_group_user"))' --json Workflow file
Put repeatable logic in a Lua file, then execute it with JSON output for the calling process.
local pushover = app.integrations.pushover
local result = pushover.add_group_user({group_key = "example_group_key", user_key = "example_user_key", device = "example_device", memo = "example_memo"})
dump(result) kosmo integrations:lua workflow.lua --json
kosmo integrations:lua workflow.lua --force --json integrations:lua exposes app.integrations.pushover, app.mcp.*, docs.*, json.*, and regex.*. Use app.integrations.pushover.default.* or app.integrations.pushover.work.* when you configured named credential accounts.
MCP-only Lua
If the script only needs configured MCP servers and does not need Pushover, 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.
Pushover Lua API Reference
Namespace: app.integrations.pushover
Pushover tools use the configured application token plus a default user or delivery group key. Use fake or test-only message content when validating workflows; Pushover sends real notifications for write calls.
Messages
send_message
Send a Pushover message to the configured user/group key.
Required: message
Optional fields: title, priority, url, url_title, sound, device, timestamp, expire, retry, callback, tags, ttl, html, monospace, attachment_base64, attachment_type, encrypted.
Priority 2 is an emergency message and requires retry and expire. Emergency sends may return a receipt; use receipt tools to inspect or cancel retries.
local result = app.integrations.pushover.send_message({
title = "Example alert",
message = "The example background job finished.",
priority = 0,
sound = "pushover",
})
print(result.request)
local result = app.integrations.pushover.send_message({
title = "Example incident",
message = "Example service is unavailable.",
priority = 2,
retry = 60,
expire = 3600,
tags = "example-incident",
})
print(result.receipt)
get_application_limits
Returns the application token’s monthly message quota and reset information from Pushover.
local limits = app.integrations.pushover.get_application_limits()
print(limits.limit)
print(limits.remaining)
print(limits.reset)
Sounds And Validation
list_sounds
List available sound names and display labels.
local result = app.integrations.pushover.list_sounds()
for name, label in pairs(result.sounds) do
print(name .. ": " .. label)
end
get_current_user
Validate the configured default user/group key and return valid, devices, licenses, and raw response details.
local user = app.integrations.pushover.get_current_user()
print(user.valid)
validate_user
Validate another user/group key or a specific device before sending.
local result = app.integrations.pushover.validate_user({
user_key = "u-example",
device = "iphone",
})
print(result.valid)
Emergency Receipts
get_receipt
Get acknowledgement and retry state for an emergency message receipt.
local receipt = app.integrations.pushover.get_receipt({
receipt = "r-example",
})
print(receipt.acknowledged)
cancel_receipt
Cancel retries for one active emergency receipt.
app.integrations.pushover.cancel_receipt({
receipt = "r-example",
})
cancel_receipts_by_tag
Cancel retries for active emergency messages with a matching tag.
app.integrations.pushover.cancel_receipts_by_tag({
tag = "example-incident",
})
Subscriptions
migrate_subscription_user
Migrate a legacy collected user key to a subscription-scoped user key. Subscription creation and web subscription initiation happen in the Pushover dashboard/browser flow; this tool only covers the API-backed migration endpoint.
Required: subscription, user_key
Optional: device_name, sound
local migrated = app.integrations.pushover.migrate_subscription_user({
subscription = "Example-f504h08fhlasdfj",
user_key = "u-example",
sound = "pushover",
})
print(migrated.subscribed_user_key)
Teams
Teams tools require the optional team_token credential. Pushover Teams API tokens are different from application API tokens.
get_team
Show team metadata and users.
local team = app.integrations.pushover.get_team()
print(team.name)
add_team_user
Add a user to a team.
Required: email
Optional: name, password, instant, admin, group
app.integrations.pushover.add_team_user({
email = "person@example.test",
name = "Example Person",
instant = true,
group = "Support",
})
remove_team_user
Remove a user from a team by email address.
app.integrations.pushover.remove_team_user({
email = "person@example.test",
})
Glances
update_glance
Update Pushover glance/widget data for the configured user. At least one glance field is required.
app.integrations.pushover.update_glance({
title = "Queue",
text = "Example jobs",
count = 3,
percent = 75,
})
Delivery Groups
create_group
Create a delivery group and return its group key.
local group = app.integrations.pushover.create_group({
name = "Example Operations",
})
print(group.group)
list_groups
List delivery groups manageable by the application token.
local groups = app.integrations.pushover.list_groups()
get_group
Get group metadata and members.
local group = app.integrations.pushover.get_group({
group_key = "g-example",
})
add_group_user
Add a user to a group. device and memo are optional.
app.integrations.pushover.add_group_user({
group_key = "g-example",
user_key = "u-example",
memo = "Example on-call user",
})
remove_group_user
Remove a user or device-specific membership from a group.
app.integrations.pushover.remove_group_user({
group_key = "g-example",
user_key = "u-example",
})
disable_group_user
Temporarily disable a group member without removing it.
app.integrations.pushover.disable_group_user({
group_key = "g-example",
user_key = "u-example",
})
enable_group_user
Re-enable a disabled group member.
app.integrations.pushover.enable_group_user({
group_key = "g-example",
user_key = "u-example",
})
rename_group
Rename a delivery group.
app.integrations.pushover.rename_group({
group_key = "g-example",
name = "Example Support",
})
Licenses
get_license_credits
Return remaining prepaid Pushover license credits.
local credits = app.integrations.pushover.get_license_credits()
print(credits.credits)
assign_license
Assign a prepaid license to an existing user key or email address. Provide either user_key or email; os is optional when the Pushover account can infer the target platform.
app.integrations.pushover.assign_license({
email = "person@example.test",
os = "Android",
})
Multi-Account Usage
app.integrations.pushover.send_message({ message = "Default account" })
app.integrations.pushover.default.send_message({ message = "Explicit default" })
app.integrations.pushover.operations.send_message({ message = "Named account" })
All account namespaces expose the same functions. Only credentials change.
Scope Notes
This package covers the server-side Pushover application, groups, glances, licensing, subscriptions migration, and Teams API endpoints. The Pushover Open Client API is intentionally not exposed here because it requires end-user email/password login, device registration, local session secrets, and websocket client behavior rather than a server-side application token integration.
Raw agent markdown
# Pushover Lua API Reference
Namespace: `app.integrations.pushover`
Pushover tools use the configured application token plus a default user or delivery group key. Use fake or test-only message content when validating workflows; Pushover sends real notifications for write calls.
## Messages
### send_message
Send a Pushover message to the configured user/group key.
Required: `message`
Optional fields: `title`, `priority`, `url`, `url_title`, `sound`, `device`, `timestamp`, `expire`, `retry`, `callback`, `tags`, `ttl`, `html`, `monospace`, `attachment_base64`, `attachment_type`, `encrypted`.
Priority `2` is an emergency message and requires `retry` and `expire`. Emergency sends may return a `receipt`; use receipt tools to inspect or cancel retries.
```lua
local result = app.integrations.pushover.send_message({
title = "Example alert",
message = "The example background job finished.",
priority = 0,
sound = "pushover",
})
print(result.request)
```
```lua
local result = app.integrations.pushover.send_message({
title = "Example incident",
message = "Example service is unavailable.",
priority = 2,
retry = 60,
expire = 3600,
tags = "example-incident",
})
print(result.receipt)
```
### get_application_limits
Returns the application token's monthly message quota and reset information from Pushover.
```lua
local limits = app.integrations.pushover.get_application_limits()
print(limits.limit)
print(limits.remaining)
print(limits.reset)
```
## Sounds And Validation
### list_sounds
List available sound names and display labels.
```lua
local result = app.integrations.pushover.list_sounds()
for name, label in pairs(result.sounds) do
print(name .. ": " .. label)
end
```
### get_current_user
Validate the configured default user/group key and return `valid`, `devices`, `licenses`, and raw response details.
```lua
local user = app.integrations.pushover.get_current_user()
print(user.valid)
```
### validate_user
Validate another user/group key or a specific device before sending.
```lua
local result = app.integrations.pushover.validate_user({
user_key = "u-example",
device = "iphone",
})
print(result.valid)
```
## Emergency Receipts
### get_receipt
Get acknowledgement and retry state for an emergency message receipt.
```lua
local receipt = app.integrations.pushover.get_receipt({
receipt = "r-example",
})
print(receipt.acknowledged)
```
### cancel_receipt
Cancel retries for one active emergency receipt.
```lua
app.integrations.pushover.cancel_receipt({
receipt = "r-example",
})
```
### cancel_receipts_by_tag
Cancel retries for active emergency messages with a matching tag.
```lua
app.integrations.pushover.cancel_receipts_by_tag({
tag = "example-incident",
})
```
## Subscriptions
### migrate_subscription_user
Migrate a legacy collected user key to a subscription-scoped user key. Subscription creation and web subscription initiation happen in the Pushover dashboard/browser flow; this tool only covers the API-backed migration endpoint.
Required: `subscription`, `user_key`
Optional: `device_name`, `sound`
```lua
local migrated = app.integrations.pushover.migrate_subscription_user({
subscription = "Example-f504h08fhlasdfj",
user_key = "u-example",
sound = "pushover",
})
print(migrated.subscribed_user_key)
```
## Teams
Teams tools require the optional `team_token` credential. Pushover Teams API tokens are different from application API tokens.
### get_team
Show team metadata and users.
```lua
local team = app.integrations.pushover.get_team()
print(team.name)
```
### add_team_user
Add a user to a team.
Required: `email`
Optional: `name`, `password`, `instant`, `admin`, `group`
```lua
app.integrations.pushover.add_team_user({
email = "person@example.test",
name = "Example Person",
instant = true,
group = "Support",
})
```
### remove_team_user
Remove a user from a team by email address.
```lua
app.integrations.pushover.remove_team_user({
email = "person@example.test",
})
```
## Glances
### update_glance
Update Pushover glance/widget data for the configured user. At least one glance field is required.
```lua
app.integrations.pushover.update_glance({
title = "Queue",
text = "Example jobs",
count = 3,
percent = 75,
})
```
## Delivery Groups
### create_group
Create a delivery group and return its group key.
```lua
local group = app.integrations.pushover.create_group({
name = "Example Operations",
})
print(group.group)
```
### list_groups
List delivery groups manageable by the application token.
```lua
local groups = app.integrations.pushover.list_groups()
```
### get_group
Get group metadata and members.
```lua
local group = app.integrations.pushover.get_group({
group_key = "g-example",
})
```
### add_group_user
Add a user to a group. `device` and `memo` are optional.
```lua
app.integrations.pushover.add_group_user({
group_key = "g-example",
user_key = "u-example",
memo = "Example on-call user",
})
```
### remove_group_user
Remove a user or device-specific membership from a group.
```lua
app.integrations.pushover.remove_group_user({
group_key = "g-example",
user_key = "u-example",
})
```
### disable_group_user
Temporarily disable a group member without removing it.
```lua
app.integrations.pushover.disable_group_user({
group_key = "g-example",
user_key = "u-example",
})
```
### enable_group_user
Re-enable a disabled group member.
```lua
app.integrations.pushover.enable_group_user({
group_key = "g-example",
user_key = "u-example",
})
```
### rename_group
Rename a delivery group.
```lua
app.integrations.pushover.rename_group({
group_key = "g-example",
name = "Example Support",
})
```
## Licenses
### get_license_credits
Return remaining prepaid Pushover license credits.
```lua
local credits = app.integrations.pushover.get_license_credits()
print(credits.credits)
```
### assign_license
Assign a prepaid license to an existing user key or email address. Provide either `user_key` or `email`; `os` is optional when the Pushover account can infer the target platform.
```lua
app.integrations.pushover.assign_license({
email = "person@example.test",
os = "Android",
})
```
## Multi-Account Usage
```lua
app.integrations.pushover.send_message({ message = "Default account" })
app.integrations.pushover.default.send_message({ message = "Explicit default" })
app.integrations.pushover.operations.send_message({ message = "Named account" })
```
All account namespaces expose the same functions. Only credentials change.
## Scope Notes
This package covers the server-side Pushover application, groups, glances, licensing, subscriptions migration, and Teams API endpoints. The Pushover Open Client API is intentionally not exposed here because it requires end-user email/password login, device registration, local session secrets, and websocket client behavior rather than a server-side application token integration. local result = app.integrations.pushover.add_group_user({group_key = "example_group_key", user_key = "example_user_key", device = "example_device", memo = "example_memo"})
print(result) Functions
add_group_user Write
Add a user key, optionally scoped to a device, to a Pushover delivery group.
- Lua path
app.integrations.pushover.add_group_user- Full name
pushover.pushover_add_group_user
| Parameter | Type | Required | Description |
|---|---|---|---|
group_key | string | yes | Pushover delivery group key. |
user_key | string | yes | Pushover user key to add. |
device | string | no | Optional device name for this group member. |
memo | string | no | Optional memo to store with the member. |
add_team_user Write
Add a user to a Pushover team. Requires the optional team_token credential.
- Lua path
app.integrations.pushover.add_team_user- Full name
pushover.pushover_add_team_user
| Parameter | Type | Required | Description |
|---|---|---|---|
email | string | yes | Email address for the team user. |
name | string | no | Optional full name. |
password | string | no | Optional initial password. If omitted, Pushover assigns and emails a random password. |
instant | boolean | no | Include an Instant Login link in the welcome email. |
admin | boolean | no | Add the user as a team administrator. |
group | string | no | Optional team delivery group name to add the user to. |
assign_license Write
Assign a prepaid Pushover license credit to an existing user key or invite an email address for a specific platform.
- Lua path
app.integrations.pushover.assign_license- Full name
pushover.pushover_assign_license
| Parameter | Type | Required | Description |
|---|---|---|---|
user_key | string | no | Existing Pushover user key to license. Required unless email is provided. |
email | string | no | Email address to invite and license. Required unless user_key is provided. |
os | string | no | Platform for the license, e.g. iOS, Android, or Desktop. |
cancel_receipt Write
Cancel retry notifications for an active emergency-priority message receipt.
- Lua path
app.integrations.pushover.cancel_receipt- Full name
pushover.pushover_cancel_receipt
| Parameter | Type | Required | Description |
|---|---|---|---|
receipt | string | yes | Receipt ID returned when sending an emergency-priority message. |
cancel_receipts_by_tag Write
Cancel retry notifications for active emergency-priority messages that were sent with a matching tag.
- Lua path
app.integrations.pushover.cancel_receipts_by_tag- Full name
pushover.pushover_cancel_receipts_by_tag
| Parameter | Type | Required | Description |
|---|---|---|---|
tag | string | yes | Emergency message tag to cancel. |
create_group Write
Create a Pushover delivery group and return its group key.
- Lua path
app.integrations.pushover.create_group- Full name
pushover.pushover_create_group
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | yes | Human-readable group name. |
disable_group_user Write
Temporarily disable a user key, optionally scoped to a device, in a Pushover delivery group.
- Lua path
app.integrations.pushover.disable_group_user- Full name
pushover.pushover_disable_group_user
| Parameter | Type | Required | Description |
|---|---|---|---|
group_key | string | yes | Pushover delivery group key. |
user_key | string | yes | Pushover user key to disable. |
device | string | no | Optional device name to match. |
enable_group_user Write
Re-enable a disabled user key, optionally scoped to a device, in a Pushover delivery group.
- Lua path
app.integrations.pushover.enable_group_user- Full name
pushover.pushover_enable_group_user
| Parameter | Type | Required | Description |
|---|---|---|---|
group_key | string | yes | Pushover delivery group key. |
user_key | string | yes | Pushover user key to enable. |
device | string | no | Optional device name to match. |
get_application_limits Read
Get the monthly message limit, remaining messages, reset timestamp, and application status for the Pushover app token.
- Lua path
app.integrations.pushover.get_application_limits- Full name
pushover.pushover_get_application_limits
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
get_current_user Read
Validate the configured Pushover user or group key and return active devices and licenses.
- Lua path
app.integrations.pushover.get_current_user- Full name
pushover.pushover_get_current_user
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
get_group Read
Get a Pushover delivery group name and member list by group key.
- Lua path
app.integrations.pushover.get_group- Full name
pushover.pushover_get_group
| Parameter | Type | Required | Description |
|---|---|---|---|
group_key | string | yes | Pushover delivery group key. |
get_license_credits Read
Get the number of prepaid Pushover license credits available for assignment.
- Lua path
app.integrations.pushover.get_license_credits- Full name
pushover.pushover_get_license_credits
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
get_receipt Read
Get acknowledgement state, callback data, and retry status for an emergency-priority message receipt.
- Lua path
app.integrations.pushover.get_receipt- Full name
pushover.pushover_get_receipt
| Parameter | Type | Required | Description |
|---|---|---|---|
receipt | string | yes | Receipt ID returned when sending an emergency-priority message. |
get_team Read
Show Pushover team information and users. Requires the optional team_token credential.
- Lua path
app.integrations.pushover.get_team- Full name
pushover.pushover_get_team
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
list_groups Read
List Pushover delivery groups that the application token can manage.
- Lua path
app.integrations.pushover.list_groups- Full name
pushover.pushover_list_groups
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
list_sounds Read
List available notification sounds in Pushover. Use sound names with the send_message tool.
- Lua path
app.integrations.pushover.list_sounds- Full name
pushover.pushover_list_sounds
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
migrate_subscription_user Read
Create a Pushover subscription for an existing user key and return the subscription-scoped user key.
- Lua path
app.integrations.pushover.migrate_subscription_user- Full name
pushover.pushover_migrate_subscription_user
| Parameter | Type | Required | Description |
|---|---|---|---|
subscription | string | yes | Pushover subscription code. |
user_key | string | yes | Existing Pushover user key to migrate. |
device_name | string | no | Optional device name to limit the subscription to. |
sound | string | no | Optional default notification sound for this subscribed user. |
remove_group_user Write
Remove a user key, optionally scoped to a device, from a Pushover delivery group.
- Lua path
app.integrations.pushover.remove_group_user- Full name
pushover.pushover_remove_group_user
| Parameter | Type | Required | Description |
|---|---|---|---|
group_key | string | yes | Pushover delivery group key. |
user_key | string | yes | Pushover user key to remove. |
device | string | no | Optional device name to match. |
remove_team_user Write
Remove a user from a Pushover team by email address. Requires the optional team_token credential.
- Lua path
app.integrations.pushover.remove_team_user- Full name
pushover.pushover_remove_team_user
| Parameter | Type | Required | Description |
|---|---|---|---|
email | string | yes | Email address of the team user to remove. |
rename_group Read
Rename a Pushover delivery group by group key.
- Lua path
app.integrations.pushover.rename_group- Full name
pushover.pushover_rename_group
| Parameter | Type | Required | Description |
|---|---|---|---|
group_key | string | yes | Pushover delivery group key. |
name | string | yes | New group name. |
send_message Write
Send a push notification via Pushover. Supports message, title, priority levels, and optional URL/sound attachments.
- Lua path
app.integrations.pushover.send_message- Full name
pushover.pushover_send_message
| Parameter | Type | Required | Description |
|---|---|---|---|
message | string | yes | The notification message body. |
title | string | no | Optional title for the notification. |
priority | integer | no | Message priority: -2 = no notification/alert, -1 = quiet notification, 0 = normal (default), 1 = high priority, 2 = emergency. |
url | string | no | A supplementary URL to include with the notification. |
url_title | string | no | Title for the supplementary URL. |
sound | string | no | Notification sound name (e.g., "pushover", "bike", "echo"). Use the list_sounds tool to see available options. |
device | string | no | Specific device name to send to. Omit to send to all devices. |
timestamp | integer | no | Unix timestamp to schedule the message delivery. |
expire | integer | no | Seconds until emergency-priority (2) messages expire (max 10800). |
retry | integer | no | Seconds between retries for emergency-priority (2) messages (min 30). |
callback | string | no | Callback URL for emergency-priority receipt acknowledgement updates. |
tags | string | no | Comma-separated emergency message tags for later cancel-by-tag operations. |
ttl | integer | no | Seconds after which an unacknowledged message should be discarded. |
html | boolean | no | Enable HTML subset formatting in the message body. |
monospace | boolean | no | Render the message body in monospace formatting. |
attachment_base64 | string | no | Base64-encoded attachment content. |
attachment_type | string | no | MIME type for attachment_base64, e.g. image/jpeg. |
encrypted | boolean | no | Marks the message as already Pushover-encrypted by the caller. |
update_glance Write
Update Pushover glance data shown in the Pushover widget and wearables: title, text, subtext, count, and percent.
- Lua path
app.integrations.pushover.update_glance- Full name
pushover.pushover_update_glance
| Parameter | Type | Required | Description |
|---|---|---|---|
device | string | no | Optional target device name. |
title | string | no | Short glance title. |
text | string | no | Primary glance text. |
subtext | string | no | Secondary glance text. |
count | integer | no | Integer count shown by the glance. |
percent | integer | no | Percent value from 0 to 100. |
validate_user Read
Validate a Pushover user/group key and optional device before sending a message.
- Lua path
app.integrations.pushover.validate_user- Full name
pushover.pushover_validate_user
| Parameter | Type | Required | Description |
|---|---|---|---|
user_key | string | no | User or group key to validate. Defaults to the configured user key. |
device | string | no | Optional device name to validate for the user. |