The announcements API provides access to stealth address announcements. When a payment is sent to a stealth address, an announcement is published on-chain and indexed by the backend.Wallets scan announcements to detect incoming payments.
This endpoint is public and does not require authentication.
The viewTag filter is OPTIONAL. Wallets SHOULD fetch all announcements and filter locally to avoid revealing their view tag set to the backend (privacy invariant #5).
Fetching all announcements:
Preserves privacy by not revealing which view tags you’re interested in
Allows backend to serve cached results efficiently
{ "error": { "code": "VALIDATION_ERROR", "message": "Invalid query parameters", "details": { "fieldErrors": { "viewTag": ["Number must be less than or equal to 255"], "limit": ["Number must be less than or equal to 1000"] } } }}
CREATE TABLE announcements ( id UUID PRIMARY KEY DEFAULT gen_random_uuid(), ephemeral_pubkey TEXT NOT NULL, view_tag INTEGER NOT NULL, stealth_address TEXT NOT NULL, metadata TEXT, tx_digest TEXT NOT NULL, timestamp TIMESTAMP NOT NULL, created_at TIMESTAMP DEFAULT NOW());CREATE INDEX idx_announcements_timestamp ON announcements(timestamp DESC);CREATE INDEX idx_announcements_view_tag ON announcements(view_tag);
// Load last sync time from local storageconst lastSync = localStorage.getItem('lastAnnouncementSync') || '2026-01-01T00:00:00Z';// Fetch only new announcementsconst response = await fetch( `/api/identipay/v1/announcements?since=${lastSync}&limit=1000`);const { announcements } = await response.json();// Process new announcementsfor (const announcement of announcements) { await scanAnnouncement(announcement);}// Update sync timestamplocalStorage.setItem('lastAnnouncementSync', new Date().toISOString());