---
title: Stop Session
slug: devicepark/sdk-documentation/sessions/stop-session
description: Stop an active Device Park session.
docTags: 
createdAt: 2026-08-10T08:03:44.631Z
---

Stop a session when its Appium test interaction is complete. Stopping a session ends that interaction period but does not release the allocation.

This distinction matters because the same allocation can be used to start another session afterward.

## Before You Begin

Keep the `sessionId` returned by Start Session. Make sure the test runner has finished sending Appium commands before stopping the session.

## SDK Method

| Java                                | Node.js                                   | .NET                                         |
| ----------------------------------- | ----------------------------------------- | -------------------------------------------- |
| `client.sessions().stop(sessionId)` | `await client.sessions().stop(sessionId)` | `await client.Sessions.StopAsync(sessionId)` |

## Parameter

| Parameter   | Required | Description                          |
| ----------- | -------- | ------------------------------------ |
| `sessionId` | Yes      | Identifier returned by Start Session |

The identifier is sent as the session resource path. There is no request body and no customer-supplied header.

## Examples

:::CodeblockTabs
```java
client.sessions().stop("session-123");
```

```typescript
await client.sessions().stop("session-123");
```

```csharp
await client.Sessions.StopAsync("session-123");
```
:::

## Result

The method returns `void`/`Promise<void>` when the stop operation succeeds. It does not return an updated `Session`.

Use [List Sessions](docId\:yDnbFyoHkKjGUefb_-6rf) if the runner needs the finalized session record.

## What Happens Next?

- Start another session with the same active `allocationId`, or
- Collect logs and recordings, then release the allocation if no more sessions are needed.

Do not call allocation deletion as a substitute for stopping the session. Stop the session first.

:::hint{type="info"}
Stopping a session keeps the allocation active. Release the allocation only after the final session that uses it.
:::
