Builders Program

Build with us for a whole month. Unlimited usage and add-ons, weekly calls and your own Slack channel.

Learn more
Polymorfa

Command Palette

Search for a command to run...

Customers

Run WhatsApp for every business you serve

For software platforms and agencies. Each business gets a customer record, a pairing link that needs no account, its own monthly cap and a token for its numbers only.

Customer webhook events
15
Polymorfa accounts your customer needs
0
Numbers one customer token covers
64
Wrong phones before a locked link is revoked
3

Onboarding

From signup to a connected number.

Create the customer in your own signup flow, send the link, and let a webhook tell you when the number is live.

  1. Create the customer. Store your own account ID with it, through the Platform API or the Console.
  2. Send the pairing link. The business scans a QR code or enters a code on its own phone. It needs no Polymorfa account.
  3. Get the connected event. Then send and receive on the number through the Messaging API, like any other number.

Control

Each customer in its own lane.

Limit what each customer spends, decide who is funded first, move numbers and hand out tokens that reach one customer only.

A shared monthly cap. All of a customer's numbers draw from one credit cap. Zero blocks new charges, and caps reset on the 1st in UTC. Caps need Pay-As-You-Go.
Funding order. Rank customers and numbers. When credit runs short, higher ranks keep their next renewal before lower-ranked spending and new pairings.
Move a number. Transfer it to another customer by naming the source and confirming. Past spending stays with the original customer.
Customer-scoped tokens. Mint one short-lived browser token for up to 64 of a customer's numbers. A number moved to another customer returns 403 at once.

In your code

Customers in your own product.

Create customers and pairing links from your onboarding, keep your records in step through webhooks and give each customer's app its own token.

customer.ts
import { Client } from "@polymorfa/sdk";

const platform = new Client({
  credential: { type: "organizationApiKey", value: process.env.POLYMORFA_KEY! },
});

const customer = await platform.customers.create(
  { projectId, name: "Northside Gym", externalCustomerId: "crm_456" },
  { idempotencyKey: "create-customer-crm_456" },
);

API surface

The Customers API.

Customer routes need customers:read or customers:manage, and caps need billing:manage. Sending stays on the Messaging API. Turning Customers on for a project cannot be undone.

Routes

  • POST/platform/customersCreate a customer with your own ID
  • POST/platform/customers/{id}/pairing-linksCreate a link; the URL is returned once
  • DELETE/platform/customers/{id}/pairing-links/{linkId}Revoke a link
  • POST/platform/customers/{id}/numbers/{sessionId}/transferMove a number to this customer
  • GET/platform/customers/{id}/eventsRead recent lifecycle events
  • PUT/platform/billing/controls/customer/{id}Set the monthly cap and priority
  • POST/platform/client-tokensMint a token for one customer's numbers
  • POST/messaging/{session}/messages/sendSend on a customer's number

Webhook events

  • Eventcustomer.createdA customer was added
  • Eventcustomer.archivedA customer was archived
  • Eventcustomer.pairing_link.openedThe recipient opened a link
  • Eventcustomer.pairing_link.connectedA verified number connected
  • Eventcustomer.pairing_link.failedAn attempt failed
  • Eventcustomer.number.attachedA number joined the customer
  • Eventcustomer.number.transferredA number moved between customers
  • Eventcustomer.number.disconnectedA customer's number disconnected

Start with a free number

Your first real number is free. Add more numbers on Pay-As-You-Go.