> ## 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.

# Set clipboard

> Set the clipboard content



## OpenAPI

````yaml post /boxes/{boxId}/actions/clipboard
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/clipboard:
    post:
      tags:
        - UI Action
      summary: Set clipboard
      description: Set the clipboard content
      operationId: UIActionController_setClipboard
      parameters:
        - name: boxId
          required: true
          in: path
          description: Box ID
          schema:
            example: c9bdc193-b54b-4ddb-a035-5ac0c598d32d
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetClipboard'
      responses:
        '200':
          description: ''
      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" });

              // Get screen layout
              await box.action.clipboard.set("Hello, world!");

              // Print clipboard content
              console.log(await box.action.clipboard.get());
            }

            main();
        - lang: Python
          source: |-
            import os
            from gbox_sdk import GboxSDK

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

                # Create Android box
                box = gbox_sdk.create(type="android")

                # Set clipboard content
                box.action.clipboard.set("Hello, world!")

                # Print clipboard content
                print(box.action.clipboard.get())

            if __name__ == "__main__":
                main()
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\n\t\"github.com/gbox/gbox-sdk-go\"\n)\n\nfunc main() {\n\tgboxSDK := gbox.NewGboxSDK(os.Getenv(\"GBOX_API_KEY\")) // This is the default and can be omitted\n\n\t// Create Android box\n\tbox, err := gboxSDK.Create(context.Background(), gbox.CreateRequest{Type: \"android\"})\n\tif err != nil {\n\t\tlog.Fatalf(\"Failed to create box: %v\", err)\n\t}\n\n\t// Set clipboard content\n\terr = box.Action.Clipboard.Set(context.Background(), \"Hello, world!\")\n\tif err != nil {\n\t\tlog.Fatalf(\"Failed to set clipboard: %v\", err)\n\t}\n\n\t// Get clipboard content\n\tcontent, err := box.Action.Clipboard.Get(context.Background())\n\tif err != nil {\n\t\tlog.Fatalf(\"Failed to get clipboard: %v\", err)\n\t}\n\n\tfmt.Println(content)\n}"
components:
  schemas:
    SetClipboard:
      type: object
      properties:
        content:
          type: string
          description: The content to set the clipboard content
          example: Hello, world!
      title: Set Clipboard Content
      description: Set the clipboard content
      required:
        - content
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: >-
        Enter your API Key in the format: Bearer <token>. Get it from
        https://gbox.ai

````