Skip to main content
User.Inbox.push() files a card in the current end user’s inbox and returns a receipt at once; the end user acts on the card whenever they next open it. It takes no recipient. The card goes to the end user of the execution context, so it works in tools, dynamic jobs, and trigger-fired turns, and fails with no_user_context from a webhook’s execute or a LuaJob (see execution contexts). To send a message instead of filing a card, use Channels. Verified against lua-cli 3.33.0.

Quick example

Methods

push()

Files a card, or revises the card that already carries the same key.
string
required
The card’s first line. Trimmed; the first 140 characters are kept.
string
required
The card’s context line and the prose of its detail pane. The first 1,000 characters are kept.
string
Longer text shown only when the end user opens the card. The first 4,000 characters are kept.
A source link rendered on the card and never opened automatically. Must start with http:// or https://.
'urgent' | 'high' | 'normal' | 'low'
How loudly the card announces itself. Urgent pushes are limited per day; see Limits.
('approve' | 'redirect' | 'fix')[]
What the card offers. approve without options synthesizes an Approve/Decline pair; fix requires connection.
{ label: string; description?: string }[]
One-click answers; two or more make the card a question. Labels keep their first 60 characters and descriptions their first 200. Entries with an empty label are ignored, and entries past the fourth are dropped.
{ type: string; name: string }
Required with actions: ['fix']. type is the integration’s catalog slug and name its display name; each keeps its first 60 characters.
string
Idempotency and revision key: 1 to 120 characters from A-Z, a-z, 0-9, ., _, :, and -. A push with an existing key revises that card in place. Omit it for one-shot notices.
boolean
On a notice push that carries a key, the literal true declares that this notice resolves the open question card with the same key; that card is settled and no further notification is sent. An answer the end user already gave stands. Ignored without key, and on question and fix pushes.
string
The conversation the card hands off into when the end user acts. Defaults to the current thread. The first 200 characters are kept.
Returns
InboxPushReceipt
What happened to the push.
Example
Errors — a reached limit resolves capped; everything else throws an error whose code you can branch on:
  • invalid_inputtitle and body are required, deeplink must be an http(s) URL, key must be 1..120 chars of [A-Za-z0-9._:-], or fix without a connection.
  • no_user_contextInbox.push requires a user context: the execution context has no end user.
  • deposit_failed — the card could not be stored. Safe to retry.

Card kinds

The kind follows from the input, checked in this order.

Limits

Defaults are platform settings and can change; the outcomes are the contract. When the platform cannot read the day’s count, the push is treated as capped.

Types

InboxPushInput and InboxPushReceipt are not exported. Derive them from the method when you need to name them.

See also