Start, stop and restart Connections
Control a Connection's connection, read its status, change its tier and configure it.
After a Connection connects, you control its connection, read why it is offline, change its tier and adjust its configuration. Console and API controls act on the same Connection.
API paths address a Connection by its Connection ID, the connection path segment. Keep it as a string.
Read a Connection's status#
Console
Open a project and go to Connections. The Connection column shows Connected, Connecting, Stopped or Error. The Health column beside it shows the Connection's band and its score out of 100, and Restriction shows any restriction Polymorfa applied. A Connection without enough recent activity shows Not measured yet. A Connection BanSafe does not measure, such as a test connection, shows Not available. See Safety in the Console.
Use Columns in the table toolbar to show Device, Plan and Paid time remaining. They also appear on the Connection's Overview.
Select a Connection to open its page. The strip at the top shows its connection, type, phone number, Connection ID, Health and restriction, with the reason and the action when the connection needs one. Its tabs are Overview, Methods, Safety, Funding and Settings, depending on the Connection's capabilities. Test connections have no Methods or Funding. Settings lists its own sections: General, Calls, Message storage, Catalogs, Customer and the delete or remove action. Each tab and section has its own URL.
API
Call Get connection for one Connection, or List connections for every Connection in the team or project, including disconnected ones.
curl "https://api.polymorfa.com/platform/connections/$CONNECTION_ID" \
-H "Authorization: Bearer $POLYMORFA_KEY"const connections = await platform.connections.list({ projectId: "<project-id>" });
for (const connection of connections.data.data) {
console.log(connection.connectionId, connection.phone, connection.status, connection.testMode);
}
const connection = await messaging.connections.retrieve("<connection-id>");
console.log(connection.data.data.status, connection.data.data.statusReason);curl "https://api.polymorfa.com/graph/whatsapp/v26.0/$WABA_ID/phone_numbers" \
-H "Authorization: Bearer $POLYMORFA_PROJECT_TOKEN"status is CONNECTING, CONNECTED or DISCONNECTED. The nullable statusReason tells a manual stop apart from a logout, a temporary restriction, a timeout or a runtime failure. Show both when you present connection health. testMode is true for a test connection; do not infer it from the ID, which uses the same format for every Connection.
Read Health with API Get ban safe health. See BanSafe.
TypeScript:
Omit projectId to list every Connection in the team, and keep Connection IDs as strings. testMode is true for a test connection. Read the linked WhatsApp account with messaging.connections.account("<connection-id>").
Connection state changes also arrive as connection.status, connection.connected, connection.logged_out and connection.phone_offline events. See Webhooks.
Connection method and device #
The Connection object uses type: "whatsapp" and one method: linked_device, cloud_api or hybrid. Hybrid is one Connection, with one billable root. testMode distinguishes test connections. phoneNumberId is a separate phone identifier; it is not the Connection selector.
Get connection account (API Get connection account), API Get profile and the connection.connected event describe the connected account with two fields. The Console shows the same values in the Device column and on the Connection page.
phonePlatform | Meaning |
|---|---|
android | WhatsApp or WhatsApp Business runs on an Android phone. |
ios | WhatsApp or WhatsApp Business runs on an iPhone. |
meta_cloud | Meta hosts the connection through Cloud API. |
unknown | The phone has not reported a recognized platform. |
accountType | Console label | Meaning |
|---|---|---|
whatsapp_app | Normal | WhatsApp app, connected as a linked device. |
business_app | WABA | WhatsApp Business app, connected as a linked device. |
meta_cloud | Cloud | Meta Cloud API. |
meta_coexistence | Coex | Meta Cloud API, with the WhatsApp Business app still active on the phone. |
A linked Connection reports its operating system when it connects. Until then, the Console shows an empty icon.
Start, stop and restart #
Stopping a Connection disconnects it from WhatsApp without unlinking it. Starting it reconnects. Restarting retries a Connection whose runtime failed.
Console
The Connection page header shows Start connection, Stop connection or Restart connection, depending on its state. The same actions are in the row's More menu and its right-click menu.
- Connected and connecting Connections offer Stop connection.
- A Connection stopped from the Console offers Start connection.
- A failed runtime offers Restart connection.
- A logged-out real Connection asks you to link it again with a new QuickLink.
API
curl -X POST "https://api.polymorfa.com/platform/connections/$CONNECTION_ID/stop" \
-H "Authorization: Bearer $POLYMORFA_KEY"await platform.connections.start("<connection-id>", { projectId: "<project-id>" });
await platform.connections.stop("<connection-id>", { projectId: "<project-id>" });
const restart = await messaging.connections.restart("<connection-id>");
const settled = await platform.operations.wait(restart.data.operationId);
console.log(settled.data.status);Stop and restart are asynchronous: read the status or wait for connection.status to confirm the result. To stop up to 100 Connections at once, send their IDs in connectionIds to Stop connections (API Stop connections). Add projectId to limit a team key to one project.
An accepted stop means stopping was requested, not that cleanup finished. Wait for the stop operation to succeed before you start the next setup attempt. If a stop result is uncertain, inspect the existing operation before retrying.
For a test connection:
- Start is asynchronous. A ready Connection resumes its existing runtime. A stopped Connection starts again only after its cleanup is confirmed. Repeating a pending start keeps the same attempt.
- Restart waits for a confirmed stop, then starts the same Connection.
202means the request was accepted, not that the Connection connected. Follow its stop and start operations, and resolve an unconfirmed one before you request another restart.
TypeScript:
start confirms that the start was accepted, not that the Connection connected; watch the status to see it connect. If the team cannot pay, it throws PolymorfaPaymentRequiredError. platform.connections.stopMany({ connectionIds }) stops up to 100 Connections at once. See Wait for an operation.
Starting a paid Connection reserves credit before it connects. Insufficient credit returns 402, and a new charge that would exceed a monthly project or Connection credit limit returns 409 state_conflict. A new paid window is charged only after the connection succeeds. See Billing.
Log out a Connection#
Logging out unlinks Polymorfa from the phone. To use the Connection again, connect it with a new QuickLink.
Call Logout connection (API Logout connection). A 202 response accepts the request; it does not confirm that unlinking finished. A disconnect event reports connection state, not a completed logout.
curl -X POST "https://api.polymorfa.com/platform/connections/$CONNECTION_ID/logout" \
-H "Authorization: Bearer $POLYMORFA_KEY"const logout = await messaging.connections.logout("<connection-id>");
await platform.operations.wait(logout.data.operationId);Remove a Connection#
Console
Open a test connection's More menu and select Remove connection. For a real Connection, select Deletion help and contact support; the Console does not remove real Connections.
API
Delete connection (API Delete connection) permanently removes a test connection. Delete connections (API Delete connections) removes up to 100 test connections. For a real Connection, both return 409 without removing anything.
curl -X DELETE "https://api.polymorfa.com/platform/connections/$CONNECTION_ID" \
-H "Authorization: Bearer $POLYMORFA_KEY"await platform.connections.delete("<connection-id>");TypeScript:
deleteMany removes several test connections in one call.
Change a Connection's tier#
A tier decides which features a Connection can use. To change it:
- Request a quote with Quote connection tier change (API Quote connection tier change). The quote shows the full charge and effective time. It expires after ten minutes and does not change the Connection.
- Confirm the returned
quoteIdwith Set connection tier override (API Set connection tier override). - Poll Get connection tier change until the change is applied or rejected.
An upgrade buys a fresh 24-hour window without refunding remaining time. A downgrade applies at the end of the paid window. See Connection tiers.
Configure a Connection #
Configuration covers history sync, hosted message storage and observation of presence, typing, labels and quick replies. A Connection inherits team and project defaults for every field it does not override, so a changed default reaches every Connection that still inherits it. Choices made on a QuickLink are fixed when the link is issued.
Console
Open the Connection and select Settings, then General. The Connection's configuration shows each effective value, where it comes from and whether the Connection has applied the latest change.
API
- Read the Connection with Get connection and note
configuration.revisions.connection. - Send it as
revisionto Update connection (API Update connection), with the fields to set and the overrides to remove:
{
"revision": 2,
"configuration": {
"set": { "historySync": { "mode": "deliver" } },
"reset": ["historySync.requestFull"]
}
}const current = await messaging.connections.retrieve("<connection-id>");
const revision = current.data.data.configuration?.revisions.connection ?? 0;
await messaging.connections.update("<connection-id>", {
revision,
configuration: {
set: { observation: { presenceMode: "events" } },
reset: ["historySync"],
},
});A stale revision returns a conflict, so concurrent edits cannot overwrite each other. A reset removes the override; the field then inherits the default again.
Manage team defaults with Get Connection configuration defaults and Update Connection configuration defaults (GET or API Update connection configuration defaults). Add projectId for project defaults, and send the matching team or project revision. Unknown query parameters return 400.
TypeScript:
Read the current revision, then send your change with it:
A stale revision throws PolymorfaConflictError with state_conflict. Change team defaults with platform.connectionConfiguration and project defaults with project.connectionConfiguration.
The Connection applies a saved change asynchronously, so it can stay pending until the connected runtime acknowledges it.
| Field | Values |
|---|---|
historySync.mode | metadata_only or deliver. See History sync processing. |
historySync.requestFull | true requests full history on the next pairing. |
observation.presenceMode, typingMode, quickReplyMode | off, events or cache |
observation.labelMode | off, events, cache or project |
Observation applies to Linked Devices Connections. Meta Cloud API Connections and test connections reject observation settings they cannot apply. Changing observation requires observation access, and label changes also need label-management access. A Connection override above the project's observation ceiling returns 400; lower the mode or raise the project default first. See Linked-device controls.
History sync is limited by the recipient's consent. Configuration cannot turn on hosted message storage or change an authorized storage region or retention.
Paid time, budgets and usage#
The Connections table and Connection page show the time left in each real Connection's charged 24-hour window. The countdown continues while a Connection is stopped or disconnected. Paid window expired means the purchased time ended; No paid window means the Connection has no charged window. Test connections show no countdown.
- Budget: owners and admins of Pay-As-You-Go teams select Budget in a real Connection's row menu to open its Funding tab, set a monthly limit and priority, and select Save changes. You can also set both when you create the Connection. See Spending budgets.
- View usage: opens the Connection's charges and metered usage in its owning project. See Usage and credits.
Project limits and project priority stay in Usage → Funding controls.
Find and filter Connections#
The Connections table keeps the Connection's name and phone or Connection ID in its first column.
- Open a column heading to sort or filter by it. Add several rules; each appears as an editable pill in the toolbar, and numbered sort pills show which sort runs first.
- Drag a heading edge to resize a column. Select Fit columns to restore the default layout.
- Filter Device by account type, Added by date range and Claimed by by team member or Unclaimed.
- Use Connections / selected Connection at the top of a Connection page to search for another Connection or return to All connections.
Claimed by shows the Connection's Inspector claimant. The claimant and team owners and admins see Unclaim under the name and in the Connection's actions menu; see Unclaim a Connection. A claim does not change connection health.
If a refresh fails, the list keeps the last information it loaded and shows a notice with Retry. You can still create a Connection while the list is unavailable.