Skip to content

Changelog ​

All notable changes to the Plemuz API are documented here.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning. The HTTP API is versioned in its path (/v1); within a version, changes are additive.

[Unreleased] ​

Plemuz API v2: a rebuild of the previous backend as a modular monolith (Express, Sequelize, Postgres with pgvector, Valkey, BullMQ, Socket.IO, Agora, S3) with the process roles api, realtime, worker, scheduler and media.

Added ​

Native iOS app support ​

  • Business settings: typed, staff-editable settings with seeded defaults and validation (GET /v1/staff/settings/values, PUT and DELETE /v1/staff/settings/values/:key, audited as settings.value_set and settings.value_reverted). Keys: funding.presets, live.categories, live.maxCohosts, wallet.topUpLimits, mart.offlineMaxDevices. LIVE_MAX_COHOSTS, WALLET_TOPUP_MIN_MINOR, WALLET_TOPUP_MAX_MINOR and MART_OFFLINE_MAX_DEVICES now only seed the defaults; FUNDING_MIN_MINOR and FUNDING_MAX_MINOR are no longer read.

  • Gift and funding presets: GET /v1/funding/presets?currency= (buttons and custom-amount bounds per currency). Profile funding, funding links, live funding and fundingPresets on streams all follow the setting.

  • Pictures: signed avatarUrl/coverUrl on profiles, avatarUrl on follower, mutual, block, mute and supporter rows, imageUrl on search results and notifications, coverUrl on playlists and streams, artworkUrl on recommended tracks, iconUrl on live gifts, media.url on photo moments, and artwork, releaseId, releaseTitle on recording summaries.

  • Recordings in batches: GET /v1/catalog/public/recordings?ids= (up to 100, in the order asked).

  • Acting from a profile: POST /v1/messaging/conversations/direct takes profileId or handle, POST /v1/wallet/transfers takes recipientProfileId or recipientHandle, and call:start takes calleeProfileIds. User IDs stay off public profiles.

  • Following lists: GET /v1/me/following rows carry the followed profile; GET /v1/profiles/:profileId/following shows someone else's (SOCIAL_FOLLOW_LIST_PRIVATE when they keep it private).

  • Live: GET /v1/live/categories (staff edited), host, coverUrl and hasReplay on stream rows, viewer on list rows for signed-in callers, GET /v1/me/live/reminders, GET /v1/live/streams?status=ended&hasReplay=true, GET /v1/profiles/:profileId/replays, meta.total and meta.watching on the viewers list, author on chat lines, sender, gift name, icon, animation and amount on gift:sent, sender and message on fund:received.

  • Pinned live chat: PUT/DELETE /v1/live/streams/:id/messages/:messageId/pin, PUT/GET/DELETE /v1/live/streams/:id/pinned-message, socket chat:pin and chat:unpin, events chat:pinned and chat:unpinned, and pinnedMessage in the session.

  • Calls: the call.incoming VoIP push carries callId, media, isGroup, callerUserId, callerName and callerAvatarUrl, so CallKit can show the call at once.

  • Wallet top-up in the app: GET /v1/wallet/top-up-packs?platform=ios lists consumable packs from the staff setting wallet.topUpPacks (seeded NGN 1,000 to 50,000 as com.plemuz.app.wallet.<naira>); POST /v1/wallet/top-ups { method: "apple_iap", productId } then POST /v1/payments/:id/store-purchase verifies the transaction with the App Store Server API, as Mart does. Store tier kind wallet_topup added.

  • iPhone checkout rule: setting wallet.iosHostedCheckout (default all allowed) gates card and bank transfer on iPhone per kind of purchase (PAYMENT_METHOD_UNAVAILABLE_ON_PLATFORM), read from the session's device; GET /v1/payments/methods?platform=ios&purpose= follows it.

  • Step-up for money: wallet movements at or above wallet.stepUpAboveMinor (per currency) need X-Step-Up from POST /v1/me/step-up (emailed code from POST /v1/me/reauth-code, password, or a Face ID device signature over POST /v1/me/step-up/challenge with a key registered at PUT /v1/me/devices/current/step-up-key). Covers transfers, withdrawals, and wallet-paid funding, live gifts and live tickets (AUTH_PROOF_REQUIRED).

  • Wallet settings: GET /v1/wallet/settings?currency= (top-up bounds, step-up threshold, iPhone checkout switches, platform fee basis points).

  • Live gift goal: giftGoal on create and update, giftGoal { goal, raised, progressBps, reachedAt } on streams and sessions, goal on stream:stats, and goal:reached once.

  • Replay notifications also reach ticket and reminder holders.

  • Staff gift catalogue: GET/POST /v1/staff/live/gifts, PATCH /v1/staff/live/gifts/:code, PUT /v1/staff/live/gifts/:code/prices (settings:manage, audited, store tier checked).

  • Artist screen: GET /v1/profiles/:id and /profiles/by-handle/:handle add stats, viewer and partyId; GET /v1/profiles/:profileId/releases and /top-recordings.

  • People: GET /v1/people?userIds= (names and faces for IDs a chat, call or tray carries); group create takes memberProfileIds and add members takes profileIds; GET /v1/calls/:id/candidates.

  • Listening: DELETE /v1/me/recently-played and /me/recently-played/:contentType/:contentId; GET /v1/me/reco/quick-picks and /me/reco/deep-cuts; GET /v1/catalog/credit-roles.

  • Subscriber downloads: POST /v1/me/offline/licences { contentType: "recording", contentId, deviceKeyId }, POST /v1/me/offline/licences/:id/check-in, GET /v1/me/offline/licences; gated by the plan's downloads, limited by mart.offlineMaxDevices, revoked when the subscription stops allowing them. Offline licences (Mart and subscriber) carry package { url, algorithm, ivHex, container, byteSize, checksumSha256 }.

  • Keys for native players: a full-rendition manifest fetched with a lease puts a short signed ?t= proof on the playlist's key URI, so AVPlayer can fetch the key without headers.

  • Family seats: POST /v1/me/subscription/seats takes userId, profileId, handle or email; an email with no account gets an invite email and a pending seat claimed at sign-up. Seat rows carry member { displayName, avatarUrl } and invitedEmail.

  • Catalogue and Mart: description on public releases (written in the release details step), GET /v1/mart/products?releaseId=|recordingId=, and profileType on profile search hits.

  • Earnings: GET /v1/profiles/:profileId/earnings/summary?months=12 (per month and currency, earned and paid out).

  • Ads: POST /v1/ads/impressions/batch { tokens[1..50] } answers { accepted }.

  • Store refunds: an App Store REFUND or REVOKE for a one-off purchase (wallet top-up, gift, ticket) refunds its payment.

  • Ads for Promote and My Ads: staff settings ads.boost (CPM, minimum budget, presets, max and default days per currency) and ads.expectedCtr, seeded from ADS_BOOST_CPM_MINOR and ADS_EXPECTED_CTR; GET /v1/ads/settings?currency=, POST /v1/ads/quotes, GET /v1/ads/placements; campaign rows carry stats, promoted and each creative's preview; POST /v1/ads/campaigns/:id/discard (refunds a paid draft at once), DELETE /v1/ads/campaigns/:id (unpaid drafts), POST /v1/ads/campaigns/:id/duplicate; funding needs the ads policy (boosts too); wallet.iosHostedCheckout.ads (default off: wallet only on iPhone); upload purpose ad_creative; notification ads.campaign.settled; ad decisions carry a signed imageUrl and preview.

  • Sign-in: a correct password on an unverified email answers AUTH_EMAIL_UNVERIFIED (403, action verify_email); a wrong password still answers AUTH_INVALID_CREDENTIALS.

  • Artist screen: GET /v1/profiles/:id and /v1/profiles/by-handle/:handle add stats { followers, following, monthlyListeners, totalStreams }, viewer { isSelf, isFollowing, isBlocked, isBlockedBy, canMessage } and partyId; new GET /v1/profiles/:profileId/releases and GET /v1/profiles/:profileId/top-recordings.

  • People: GET /v1/people?userIds= names the user IDs chats, calls and moments carry (primary public profile only, blocks left out). Group create takes memberProfileIds, add members takes profileIds. GET /v1/calls/:id/candidates lists who can be added to a call.

  • Live gift goal: giftGoal { amountMinor, currency } | null on create and update; giftGoal { goal, raised, progressBps, reachedAt } on stream views and the session; goal on stream:stats; goal:reached once.

  • Staff gift catalogue: GET/POST /v1/staff/live/gifts, PATCH /v1/staff/live/gifts/:code, PUT /v1/staff/live/gifts/:code/prices (settings:manage, audited).

  • Replays: ticket holders and reminder holders are told when a replay is ready, as well as followers.

  • Wallet in the app: in-app top-up packs (wallet.topUpPacks, seeded NGN 1,000 to 50,000 as com.plemuz.app.wallet.<naira> consumables) at GET /v1/wallet/top-up-packs, bought with POST /v1/wallet/top-ups { method: "apple_iap", productId } and verified through POST /v1/payments/:id/store-purchase. GET /v1/wallet/settings returns top-up bounds, the step-up threshold, the iOS checkout rule and platform fees. wallet.iosHostedCheckout (all allowed) can close card and bank transfer on iPhone per purchase kind (PAYMENT_METHOD_UNAVAILABLE_ON_PLATFORM); GET /v1/payments/methods?purpose= follows it.

  • Step-up: wallet transfers, withdrawals and wallet-paid funding, gifts and tickets at or above wallet.stepUpAboveMinor answer AUTH_PROOF_REQUIRED until the request carries X-Step-Up from POST /v1/me/step-up (emailed code, password, or a Face ID device signature over POST /v1/me/step-up/challenge with a key registered at PUT /v1/me/devices/current/step-up-key).

  • Listening: DELETE /v1/me/recently-played and DELETE /v1/me/recently-played/:contentType/:contentId; GET /v1/me/reco/quick-picks and GET /v1/me/reco/deep-cuts; GET /v1/catalog/credit-roles.

Platform ​

  • REST API under /v1 with { data, meta } responses and RFC 9457 problem details carrying a stable code, a safe-to-show title, retryable and next-step actions.
  • Cursor pagination (cursor, limit, nextCursor, hasMore) on every list.
  • Idempotency-Key support, required on every money-moving route, with 24-hour replay.
  • Per-IP, per-account and per-route rate limits with RateLimit-* headers.
  • Realtime over Socket.IO namespaces with one acknowledgement shape, resource:verb commands and resource:verbed events, and in-connection token refresh (auth:refresh).
  • Deep links on https://spread.plemuz.com with Universal Links, App Links and GET /v1/links/resolve.
  • Client configuration endpoint (GET /v1/client/config), JWKS, health and readiness checks.
  • Transactional outbox, idempotent event consumers, priority queues with dead-lettering, Valkey cache-aside, feature flags, i18n, audit log and observability.
  • Exact money: integer minor units with ISO currency, double-entry ledger and exact allocation.
  • Developer documentation site at https://docs.plemuz.com (VitePress, npm run docs:dev).

Identity & access ​

  • Identity: email sign-up with codes, sign-in, Google and Apple sign-in, rotating refresh tokens, sessions, devices, push tokens, creator profiles and handles, consents and legal documents, preferences, blocks and mutes, data export, deactivation, resumable wizards.
  • Separate token worlds for users, organizations, staff and realtime; guest access for public reads and previews.
  • Staff: sign-in with mandatory MFA, staff users and roles, audit log.
  • Verification: contact (email, phone), KYC (BVN, ID document), verified badges, rights-holder claims, staff review and tiers.
  • Lookups: countries, currencies, languages, genders, age ranges, moods, profile link kinds and genres, versioned for client caching.

Catalog & media ​

  • Catalog: parties with ISNI and IPI, works with ISWC, recordings with ISRC and full metadata, releases with UPC, DDEX credits, versioned split sheets, resumable release wizard, moderation, revisions, scheduled publish and takedown, guest-safe public reads.
  • Media: presigned multipart uploads, probing and fingerprinting, audio and video HLS ladders with a lossless tier, 15-second preview renditions, loudness, waveform, artwork, BPM and key analysis, stems and offline packages.
  • Muzcast: shows, seasons, episodes, chapters, transcripts and subscriber-only episodes.

Listening ​

  • Playback: one active device per account with lease, fencing token and preemption; signed manifests and keys; event ingest; qualified streams; queue, history and resume positions.
  • Subscriptions: weekly and monthly individual, student, 2geda and family plans; 7-day trial once per person; seats; gift and pay-for-me links; promo codes; Apple and Google store purchases; entitlements.
  • Playlists: own, collaborative, smart and AI playlists, and combined playlist requests.
  • Search: grouped full-text and typo-tolerant search, as-you-type suggestions, history, recent results and trending.
  • Charts: daily and weekly charts by country and genre from qualified streams.
  • Recommendations: embeddings and taste vectors, daily mixes, radio, because-you-played and new-release radar.

Money ​

  • Wallet & payments: wallet top-ups, transfers, limits, payment intents, Hyparrow integration with signed inbound webhooks, receipts, earnings, bank accounts and withdrawals with staff payout batches.
  • Mart: marketplace for songs, releases, beats, stem and sample packs, presets, artwork, lyric and sheet music, and DJ sets, with licence tiers, product wizard, purchases, library, watermarked downloads and device-bound offline licences.
  • Royalties: user-centric monthly periods from paid subscribers' qualified streams, statements and ledger credits.
  • Fan funding: funding links with goals, funding from profiles and live streams, supporters and leaderboards.

Social ​

  • Social: follows, likes, reactions, threaded comments, activity feed and tracked shares.
  • Moments: 24-hour text, song clip, photo and video moments with audiences, views, reactions and highlights.

Messaging & calls ​

  • Messaging: end-to-end encrypted direct and group chats (Signal protocol keys per device), receipts, typing, replies, edits, reactions, deletes, pins, archive, mute, disappearing messages, polls, invite links, chat availability and message requests.
  • Calls: 1:1 and group audio and video calls over Agora, full call states, VoIP push, multi-device ringing and call logs.

Live & together ​

  • Live streaming: scheduled or instant, free or ticketed streams, tickets, chat, reactions, gifts, co-hosts, moderators, bans, replays and reminders.
  • Listen together: shared sessions with invite codes, synced position, shared queue, host controls and chat.

Creators ​

  • Studio: creator workspace with team roles, insights, dashboards, goals and milestones, and live progress over /studio.
  • Creative: DJ sets and DJ mode data, stem packs, remix contests, drops, superfan memberships, Wrapped, streaks, badges and creator radio stations.

Growth ​

  • Ads & promotions: advertisers, campaigns, budgets and pacing, targeting, placements, delivery, frequency caps and reporting.
  • Referrals: referral codes, links and QR codes, one attribution per person, rewards in subscription days.
  • Affiliates: ambassador programme with applications, codes and landing pages, commission on paid subscriptions, reversals and payouts.

Platform services ​

  • Notifications: in-app inbox, push (FCM, APNs, PushKit) and email, per-type preferences, quiet hours, frequency caps and badge counts over /notify.
  • AI assistant: conversations with tool use, streamed replies over /assistant, voice input and confirmable actions.

Security ​

  • Argon2id passwords, ES256 access tokens with kid rotation, refresh-token reuse detection, session checks on every request and step-up re-authentication.
  • Field encryption with blind indexes for personal data; one BVN or NIN per account.
  • Signed, short-lived media URLs and entitlement-gated playback keys.
  • Strict input and output schemas on every boundary.

Plemuz API v2