---
title: "Start, stop and restart Connections"
description: "Control a Connection's connection, read its status, change its tier and configure it."
canonical: "https://docs.polymorfa.com/connections/manage"
---
# 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](https://docs.polymorfa.com/safety/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](https://docs.polymorfa.com/api/connections/get-connection) for one Connection, or
[List connections](https://docs.polymorfa.com/api/connections/list-connections) for every Connection in the
team or project, including disconnected ones.

```bash cURL
curl "https://api.polymorfa.com/platform/connections/$CONNECTION_ID" \
  -H "Authorization: Bearer $POLYMORFA_KEY"
```

```typescript TypeScript
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);
```

```bash Graph API
curl "https://api.polymorfa.com/graph/whatsapp/v26.0/$WABA_ID/phone_numbers" \
  -H "Authorization: Bearer $POLYMORFA_PROJECT_TOKEN"
```

**Graph API:** Meta Cloud API Connections: Supported. Linked Devices Connections: Supported.

[List phone numbers](https://docs.polymorfa.com/api/graph/phone-numbers/list-phone-numbers)
returns your project's Connections under a WhatsApp Business Account in Meta's
shape: display number, verified name, quality rating, platform and throughput.
It has no connection `status`; read that from Get connection.

`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 `GET /platform/bansafe/health/{connection}`. See
[BanSafe](https://docs.polymorfa.com/safety/health).

*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](https://docs.polymorfa.com/development/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](https://docs.polymorfa.com/api/connections/get-connection-account)
(`GET /platform/connections/{connectionId}/me`), `GET /messaging/{connection}/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:**

| Action | Method |
| --- | --- |
| [Start](https://docs.polymorfa.com/api/connections/start-connection) | `POST /platform/connections/{connectionId}/start` |
| [Stop](https://docs.polymorfa.com/api/connections/stop-connection) | `POST /platform/connections/{connectionId}/stop` |
| [Restart](https://docs.polymorfa.com/api/connections/restart-connection) | `POST /platform/connections/{connectionId}/restart` |

```bash cURL
curl -X POST "https://api.polymorfa.com/platform/connections/$CONNECTION_ID/stop" \
  -H "Authorization: Bearer $POLYMORFA_KEY"
```

```typescript TypeScript
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](https://docs.polymorfa.com/api/connections/stop-connections)
(`POST /platform/connections/stop`). 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. `202` means
  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](https://docs.polymorfa.com/development/operations#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](https://docs.polymorfa.com/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](https://docs.polymorfa.com/api/connections/logout-connection)
(`POST /platform/connections/{connectionId}/logout`). A `202` response accepts the
request; it does not confirm that unlinking finished. A disconnect event
reports connection state, not a completed logout.

```bash cURL
curl -X POST "https://api.polymorfa.com/platform/connections/$CONNECTION_ID/logout" \
  -H "Authorization: Bearer $POLYMORFA_KEY"
```

```typescript TypeScript
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](https://docs.polymorfa.com/api/connections/delete-connection)
(`DELETE /platform/connections/{connectionId}`) permanently removes a test connection.
[Delete connections](https://docs.polymorfa.com/api/connections/delete-connections)
(`POST /platform/connections/delete`) removes up to 100 test connections. For a real
Connection, both return `409` without removing anything.

```bash cURL
curl -X DELETE "https://api.polymorfa.com/platform/connections/$CONNECTION_ID" \
  -H "Authorization: Bearer $POLYMORFA_KEY"
```

```typescript TypeScript
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:

1. Request a quote with
   [Quote connection tier change](https://docs.polymorfa.com/api/connections/quote-connection-tier-change)
   (`POST /platform/connections/{connectionId}/tier-quotes`). The quote shows the
   full charge and effective time. It expires after ten minutes and does not
   change the Connection.
2. Confirm the returned `quoteId` with
   [Set connection tier override](https://docs.polymorfa.com/api/connections/set-connection-tier-override)
   (`PATCH /platform/connections/{connectionId}`).
3. Poll [Get connection tier change](https://docs.polymorfa.com/api/connections/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](https://docs.polymorfa.com/billing/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:**

1. Read the Connection with [Get connection](https://docs.polymorfa.com/api/connections/get-connection) and
   note `configuration.revisions.connection`.
2. Send it as `revision` to
   [Update connection](https://docs.polymorfa.com/api/connections/update-connection)
   (`PUT /platform/connections/{connectionId}`), with the fields to set and the
   overrides to remove:

```json JSON
{
  "revision": 2,
  "configuration": {
    "set": { "historySync": { "mode": "deliver" } },
    "reset": ["historySync.requestFull"]
  }
}
```

```typescript TypeScript
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](https://docs.polymorfa.com/api/connection-configuration/get-connection-configuration-defaults)
and [Update Connection configuration defaults](https://docs.polymorfa.com/api/connection-configuration/update-connection-configuration-defaults)
(`GET` or `PUT /platform/connection-configuration`). 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](https://docs.polymorfa.com/messaging/linked-device-controls#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](https://docs.polymorfa.com/messaging/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](https://docs.polymorfa.com/billing/spending-budgets).
- **View usage**: opens the Connection's charges and metered usage in its owning
  project. See [Usage and credits](https://docs.polymorfa.com/billing/usage#explore-consumption).

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](https://docs.polymorfa.com/testing/inspector/devices#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.

## See also

- [Create a Connection with QuickLink](https://docs.polymorfa.com/connections/quicklink)
- [Connection capabilities](https://docs.polymorfa.com/connections/capabilities)
- [Webhooks](https://docs.polymorfa.com/development/webhooks)
