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

# Delete album

> Delete an album and all its media files



## OpenAPI

````yaml delete /boxes/{boxId}/media/albums/{albumName}
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}/media/albums/{albumName}:
    delete:
      tags:
        - Media
      summary: Delete album
      description: Delete an album and all its media files
      operationId: MediaController_deleteAlbum
      parameters:
        - name: boxId
          required: true
          in: path
          description: Box ID
          schema:
            example: c9bdc193-b54b-4ddb-a035-5ac0c598d32d
            type: string
        - name: albumName
          required: true
          in: path
          description: Album name
          schema:
            example: Pictures
            type: string
      responses:
        '204':
          description: Album deleted successfully
      security:
        - bearer: []
      x-codeSamples:
        - lang: JavaScript
          source: "import GboxSDK from \"gbox-sdk\";\n\nconst gboxSDK = new GboxSDK({\n  apiKey: process.env[\"GBOX_API_KEY\"] // This is the default and can be omitted\n});\n\nasync function main() {\n  const box = await gboxSDK.create({ type: \"android\" });\n\n\tawait box.media.createAlbum({\n\t\tname: \"vacation-2024\",\n\t\tmedia: [\n\t\t\t\"/path/to/photo1.jpg\",\n\t\t\t\"/path/to/photo2.jpg\",\n\t\t]\n\t})\n\n  await box.media.deleteAlbum(\"vacation-2024\");\n}\n\nmain();"
        - lang: Python
          source: |-
            import os
            from gbox_sdk import GboxSDK

            def main():
                # Initialize GboxSDK with API key from environment variable
                gbox_sdk = GboxSDK(api_key=os.environ["GBOX_API_KEY"])

                # Create an Android box for media operations
                box = gbox_sdk.create(type="android")

                # Create an album with media files first
                box.media.create_album(
                    name="vacation-2024",
                    media=[
                        "/path/to/photo1.jpg",
                        "/path/to/photo2.jpg",
                    ]
                )

                # Delete the specific album by name
                box.media.delete_album("vacation-2024")

                print("✅ Album 'vacation-2024' deleted successfully")

            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\t// Initialize GboxSDK with API key from environment variable\n\tgboxSDK := gbox.NewGboxSDK(os.Getenv(\"GBOX_API_KEY\"))\n\n\t// Create an Android box for media operations\n\tbox, err := gboxSDK.Create(context.Background(), gbox.CreateOptions{Type: \"android\"})\n\tif err != nil {\n\t\tlog.Fatalf(\"Failed to create android box: %v\", err)\n\t}\n\n\t// Create an album with media files first\n\t_, err = box.Media.CreateAlbum(context.Background(), &gbox.CreateAlbumRequest{\n\t\tName: \"vacation-2024\",\n\t\tMedia: []string{\n\t\t\t\"/path/to/photo1.jpg\",\n\t\t\t\"/path/to/photo2.jpg\",\n\t\t},\n\t})\n\tif err != nil {\n\t\tlog.Fatalf(\"Failed to create album: %v\", err)\n\t}\n\n\t// Delete the specific album by name\n\terr = box.Media.DeleteAlbum(context.Background(), \"vacation-2024\")\n\tif err != nil {\n\t\tlog.Fatalf(\"Failed to delete album: %v\", err)\n\t}\n\n\tfmt.Println(\"✅ Album 'vacation-2024' deleted successfully\")\n}"
components:
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: >-
        Enter your API Key in the format: Bearer <token>. Get it from
        https://gbox.ai

````