Polymorfa
Open Console

Polymorfa vs Baileys

We maintain Baileys. Polymorfa is how we run it in production.

Baileys gives you the protocol. Polymorfa gives you everything a production deployment needs around it: a session store that never misses a key write, signed webhooks, calls and a pairing page for your customers.1,2,3

Production session store
Baileys
Yours to build
Polymorfa
Included

Built by the people who maintain Baileys.

Polymorfa's co-founder, Rajeh Taher, maintains Baileys and whatsapp-web.js and has contributed to whatsmeow for years. Our founding engineer, João Lucas de Oliveira Lopes, maintains whatsapp-rust and works on Baileys. We know exactly where a library ends and production begins: key storage, reconnects, retries, media, calls and customer pairing. Polymorfa is that layer, and it imports your Baileys sessions so your numbers move without a new QR scan.1

Linked devices and the official Cloud API, behind one API.4
2 routes
Per message. A number costs credits only for the days it is online.5
$0
To place and answer calls: in the browser, in server code with the raw audio, and on your PBX over SIP.3,6
3 ways
In the hosted MCP server, for agents that run WhatsApp.7
195 tools

Three reasons teams move from Baileys

  1. 01

    An HTTP API instead of a socket in your process

    Polymorfa runs the socket and stores the keys. Your code sends over HTTP and receives events as webhooks signed with HMAC-SHA256, delivered in up to eight attempts over 24 hours, set per webhook.8,2

    Baileys: Baileys runs a socket in your process. You store credentials, Signal keys and messages yourself, and your store has to keep up with every key change.9,10

    baileys.ts
    import makeWASocket, { useMultiFileAuthState } from '@whiskeysockets/baileys'
    
    const { state, saveCreds } = await useMultiFileAuthState('auth_info_baileys')
    const sock = makeWASocket({ auth: state })
    sock.ev.on('creds.update', saveCreds)
    
    await sock.sendMessage('15550001111@s.whatsapp.net', { text: 'Your order shipped.' })
    polymorfa.sh
    curl -X POST https://api.polymorfa.com/messaging/support/messages/send \
      -H "Authorization: Bearer $POLYMORFA_API_KEY" \
      -H "Idempotency-Key: order-1042-shipped" \
      -H "Content-Type: application/json" \
      -d '{"conversation":{"phoneNumber":"+15550001111"},"content":{"text":"Your order shipped."}}'
  2. 02

    Bring your Baileys sessions

    Polymorfa imports Baileys authentication state through the API. You stop writes to the Baileys state, seal the Signal store snapshot to a key Polymorfa issues and submit it. The number connects without a new QR scan. The feature is in preview.1

    Baileys: Baileys leaves session storage to you, and version 8 introduces a new session format that needs a one-time migration.9,11

  3. 03

    Calls from code and over SIP

    Polymorfa places and answers calls in a browser, in server code that reads and writes the audio, or on your PBX through a SIP trunk. Linked-device numbers also take video and group calls.3,6

    Baileys: Baileys detects incoming calls and rejects them. It cannot accept or carry voice or video calls.12

One credit pool. Only the days a number is online.

One credit balance pays for every number your team runs, and a number costs credits only for the UTC days it is online.5 The monthly bonus is part of the price: buy 100,000 credits in a month and you get 250,000.13

Bonus credits on the whole month's purchase, every month

+10%
from 10,000 credits
+25%
from 20,000 credits
+75%
from 50,000 credits
+150%
from 100,000 credits

What Polymorfa gives you that Baileys does not

Polymorfa and Baileys
FeaturePolymorfaBaileys
Hosted onboarding link for your customersQuickLink14You build it15
Idempotent sends24-hour keys16You build it15
Place and answer calls from codeBrowser, server, SIP3Not supported12
SIP trunk to your PBXBoth directions6You build it15
REST API with OpenAPI specOpenAPI 3.117In-process library
Signed webhooks with retriesHMAC-SHA2562You build it15
Customer accounts for SaaS buildersCustomers API18You build it15
Number health estimate0–100, rules-based19You build it15

Move from Baileys in an afternoon

  1. 01

    Reserve the destination

    Create a project and reserve the number through QuickLink.14

  2. 02

    Freeze the Baileys state

    Stop the socket and stop all writes to the authentication state. Do not run both copies at the same time.1

  3. 03

    Import the session

    Request a handoff key with POST /platform/sessions/{sessionId}/handoff-keys, seal the snapshot to it and submit it with POST /platform/sessions/{sessionId}/handoff-import.1

Questions

Who maintains Baileys?

Polymorfa's co-founder is the current maintainer of Baileys. Baileys stays free and MIT-licensed.15

Which library runs Polymorfa's numbers?

HyperMeow, Polymorfa's own engine built on whatsmeow, runs its linked-device numbers. Polymorfa accepts Baileys sessions on import.1

What happens to my Baileys process after import?

Keep it offline. Two copies of one linked device compete and can invalidate the session.1

Leave the WhatsApp infrastructure to us.

Start free

Also compare: whatsmeow, whatsapp-web.js