> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymorfa.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Sessions

> Create, pair, inspect, start, stop, restart, log out, and remove sessions.

A session represents one connected or testing number. Messaging API operations address a
session with its stable `session` identifier. The typed public status values are
`CONNECTING`, `CONNECTED`, and `DISCONNECTED`.

## Messaging API operations

| Action                     | Method and path                          |
| -------------------------- | ---------------------------------------- |
| List sessions              | `GET /api/sessions`                      |
| Create a session           | `POST /api/sessions`                     |
| Read or update a session   | `GET` or `PATCH /api/sessions/{session}` |
| Start                      | `POST /api/sessions/{session}/start`     |
| Stop                       | `POST /api/sessions/{session}/stop`      |
| Restart                    | `POST /api/sessions/{session}/restart`   |
| Log out                    | `POST /api/sessions/{session}/logout`    |
| Remove                     | `DELETE /api/sessions/{session}`         |
| Read the connected account | `GET /api/sessions/{session}/me`         |

Pair a supported session with `GET /api/{session}/pair/qr` or
`POST /api/{session}/pair/code`. Use the generated Messaging API endpoint page for
required request fields and the exact QR or pairing-code response.

## Platform API operations

The public Platform API also supports organization-authorized session
operations:

* `GET /v1/sessions` lists sessions and can filter by `projectId`.
* `POST /v1/sessions/{sessionId}/stop` requests a stop.
* `DELETE /v1/sessions/{sessionId}` removes a session.
* `PATCH /v1/sessions/{sessionId}` sets or clears the tier override.
* `POST /v1/sessions/stop` stops 1–100 sessions.
* `POST /v1/sessions/delete` removes 1–100 sessions.
* `POST /v1/sessions/testing` creates a testing number in an active
  development project.

The single-session Platform API paths accept a session UUID or stable session
slug. Batch requests use `sessionIds`; `ids` remains a deprecated compatibility
alias. Public Platform API operations accept an organization key or dashboard
bearer and reject project tokens.

## Testing numbers

Creating a testing number requires `projectId`. `name` is optional. `country`
can be `US`, `GB`, `BR`, or `IN` and defaults to `US`. The generated identifier
starts with `test_`, and the session does not start a real WhatsApp connection.

See [Session-management operations](/api/platform-api#session-management-operations)
for the strict request and result schemas.

## Where to go next

<Columns cols={2}>
  <Card title="Messaging API" icon="terminal" href="/api/overview">
    Browse pairing and lifecycle endpoint types.
  </Card>

  <Card title="Sandbox" icon="flask" href="/sandbox/introduction">
    Exchange messages between testing numbers.
  </Card>

  <Card title="Webhooks" icon="webhook" href="/api/webhooks">
    Subscribe to session events.
  </Card>

  <Card title="Platform API" icon="gear" href="/api/platform-api">
    Inspect typed session-management operations.
  </Card>
</Columns>
