TypeScript SDK
Request immediate publication
Request immediate publication and complete the separate approval in Beacon.
Immediate publication requires Create posts access. It also requires a separate Beacon approval.
Send the first request
An idempotency key identifies one write request. Reuse the key only when you repeat that request.
await beacon.posts.create({
channelIds: [channelId],
confirmed: true,
idempotencyKey: "publish-now-2026-08-28-update",
state: "immediate",
text: "The update is now available.",
});Beacon returns a BeaconError with code approval_required. The error includes an approval URL.
Complete the approval
- Open
error.approvalUrlfor the signed-in user. - Review the exact content, channels, settings, and media.
- Approve the request in Beacon.
- Add
approvalId: error.approvalIdto the request. - Keep the same idempotency key.
- Keep all other arguments unchanged.
- Retry the request.
The approval expires after ten minutes. Changed content requires a new approval.