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

# Stop recording

> Stop recording the box screen



## OpenAPI

````yaml post /boxes/{boxId}/actions/recording/stop
openapi: 3.0.0
info:
  title: GBOX Open API
  description: GBOX Open API Documentation
  version: '1.0'
  contact: {}
servers:
  - url: https://gbox.ai/api/v1
    description: Production Server
security: []
tags: []
paths:
  /boxes/{boxId}/actions/recording/stop:
    post:
      tags:
        - UI Action
      summary: Stop recording
      description: Stop recording the box screen
      operationId: UIActionController_stopRecording
      parameters:
        - name: boxId
          required: true
          in: path
          description: Box ID
          schema:
            example: c9bdc193-b54b-4ddb-a035-5ac0c598d32d
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RecordingStopResult'
              examples:
                Basic:
                  summary: Basic recording
                  value:
                    storageKey: storage://gbox/recording/1234567890
                    presignedUrl: >-
                      https://gbox.ai/api/v1/boxes/1234567890/recording/1234567890
      security:
        - bearer: []
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import GboxSDK from "gbox-sdk";

            const gboxSDK = new GboxSDK({
              apiKey: process.env["GBOX_API_KEY"] // This is the default and can be omitted
            });

            async function main() {
              const box = await gboxSDK.create({ type: "android" });

              console.log("Starting recording...");
              await box.action.recording.start();
             
              console.log("Tapping on chrome app...");
              await box.action.tap({ target: "chrome app" });

              console.info(`sleeping for 5 seconds...`);
              await new Promise((resolve) => setTimeout(resolve, 5000));

              console.log("Stopping recording...");
              const result = await box.action.recording.stop();

              console.log(`Download URL: ${result.presignedUrl}`);
            }

            main();
        - lang: Python
          source: >-
            import os

            import time

            from gbox_sdk import GboxSDK


            gbox_sdk = GboxSDK(api_key=os.environ["GBOX_API_KEY"])  # This is
            the default and can be omitted


            box = gbox_sdk.create(type="android")


            print("Starting recording...")

            box.action.recording.start()


            print("Tapping on chrome app...")

            box.action.tap(target="chrome app")


            print("sleeping for 5 seconds...")

            time.sleep(5)


            print("Stopping recording...")

            result = box.action.recording.stop()


            print(f"Download URL: {result.presigned_url}")
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\t\"time\"\n\n\t\"github.com/gbox/gbox-sdk-go\"\n)\n\nfunc main() {\n\tgboxSDK := gbox.NewGboxSDK(os.Getenv(\"GBOX_API_KEY\"))\n\n\tbox, err := gboxSDK.Create(context.Background(), gbox.CreateBoxRequest{\n\t\tType: \"android\",\n\t})\n\tif err != nil {\n\t\tlog.Fatalf(\"Failed to create box: %v\", err)\n\t}\n\n\tfmt.Println(\"Starting recording...\")\n\terr = box.Action.Recording.Start(context.Background())\n\tif err != nil {\n\t\tlog.Fatalf(\"Failed to start recording: %v\", err)\n\t}\n\n\tfmt.Println(\"Tapping on chrome app...\")\n\terr = box.Action.Tap(context.Background(), gbox.TapRequest{\n\t\tTarget: \"chrome app\",\n\t})\n\tif err != nil {\n\t\tlog.Fatalf(\"Failed to tap: %v\", err)\n\t}\n\n\tfmt.Println(\"sleeping for 5 seconds...\")\n\ttime.Sleep(5 * time.Second)\n\n\tfmt.Println(\"Stopping recording...\")\n\tresult, err := box.Action.Recording.Stop(context.Background())\n\tif err != nil {\n\t\tlog.Fatalf(\"Failed to stop recording: %v\", err)\n\t}\n\n\tfmt.Printf(\"Download URL: %s\\n\", result.PresignedURL)\n}"
components:
  schemas:
    RecordingStopResult:
      type: object
      properties:
        storageKey:
          type: string
          description: >-
            Storage key of the recording. Before the box is deleted, you can use
            this storageKey with the endpoint `box/:boxId/storage/presigned-url`
            to get a downloadable URL for the recording.
          example: storage://gbox/recording/1234567890
        presignedUrl:
          type: string
          description: >-
            Presigned URL of the recording. This is a temporary downloadable URL
            with an expiration time for accessing the recording file.
          example: https://gbox.ai/api/v1/boxes/1234567890/recording/1234567890
      title: Recording Stop Result
      description: Recording stop result
      required:
        - storageKey
        - presignedUrl
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: >-
        Enter your API Key in the format: Bearer <token>. Get it from
        https://gbox.ai

````