# sessions.destroy

Source: https://docs.scrappey.com/docs/sessions-destroy

> Cleanly shuts down a browser session and frees up system resources.

Destroy the session you started with [`sessions.create`](/docs/sessions-create) as soon as you're done, instead of waiting for the 200-second idle timeout to reclaim it.

## Parameters

| Parameter | Type | Required | Description |
| --------- | ------ | -------- | ------------------------------------------ |
| `session` | string | Yes | The ID of the session you want to destroy. |

## Request

```bash
curl -X POST "https://publisher.scrappey.com/api/v1?key=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "cmd": "sessions.destroy",
    "session": "my-session-id"
  }'
```

## Response

```json
{
    "solution": {},
    "data": "success",
    "timeElapsed": 14,
    "session": "my-session-id"
}
```

## Related concepts

Go deeper in the [Scrappey knowledge base](https://scrappey.com/qa):

- [Stateful web scraping](https://scrappey.com/qa/web-scraping-apis/what-is-stateful-web-scraping) — reusing cookies and state across requests
