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

# Stop Recording

> Stop the session's active MP4 recording so it can be downloaded.

## Overview

Stops the active recording and finalizes the MP4 container. After this returns, the file is downloadable via [`GET /browser/sessions/{id}/recording`](/api-reference/endpoint/recording-download).

## Path Parameters

<ParamField path="id" type="string" required={true}>
  Browser session ID (UUID).
</ParamField>

## Example Request

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://api.scrapengine.io/api/v1/browser/sessions/baa3f390-fa6e-4a24-b84a-a575a5f3a9c7/recording/stop" \
    -H "Authorization: Bearer $SCRAPENGINE_API_KEY"
  ```
</CodeGroup>

## Response

### Success Response (200)

<ResponseField name="recordingId" type="string">
  Identifier of the recording that was stopped.
</ResponseField>

<ResponseField name="status" type="string">
  Final state — `stopped`.
</ResponseField>

**Example Response:**

```json theme={null}
{
  "recordingId": "rec-01HX3...",
  "status": "stopped"
}
```

### Error Responses

| Status | Description                                        |
| ------ | -------------------------------------------------- |
| `401`  | Unauthorized — invalid or missing API key.         |
| `404`  | Session not found, or no recording is in progress. |
