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

# Move to trash

> Requires a valid token for this workspace and the current account’s Studio permissions. Requires a read & write token. Writes are not automatically retried by the SDK. Folder operations use bounded durable discovery. Trash permanently removes intersecting share/publish links; restore does not recreate them.



## OpenAPI

````yaml /api/openapi.json post /workspaces/{workspace}/entries/{entry}/trash
openapi: 3.1.0
info:
  title: FLEX Media Studio REST API
  version: 1.0.0
  description: >-
    Workspace-scoped API for self-hosted FLEX Media Studio. Set the server URL
    to your own application before sending requests.
servers:
  - url: https://your-app.example/media-studio/rest/v1
    description: Replace with your own Studio installation.
security:
  - studioToken: []
paths:
  /workspaces/{workspace}/entries/{entry}/trash:
    post:
      tags:
        - Files
      summary: Move to trash
      description: >-
        Requires a valid token for this workspace and the current account’s
        Studio permissions. Requires a read & write token. Writes are not
        automatically retried by the SDK. Folder operations use bounded durable
        discovery. Trash permanently removes intersecting share/publish links;
        restore does not recreate them.
      operationId: trash
      parameters:
        - name: workspace
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-9A-HJKMNP-TV-Z]{26}$
            example: 01M6TF7X1MD67JKPT1BRPZSAJ6
        - name: entry
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-9A-HJKMNP-TV-Z]{26}$
            example: 01M6TF7X1MD67JKPT1BRPZSAJ6
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                revision:
                  type: integer
                  minimum: 1
                requestId:
                  type: string
                  minLength: 16
                  maxLength: 64
              required:
                - revision
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Entry'
        '202':
          description: >-
            Durable folder operation admitted. Use status/advance/cancel; the
            SDK awaits completion.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TreeOperationResult'
        '401':
          description: Token missing, invalid, revoked or expired.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            Token scope or current account permissions do not allow this
            operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Resource unavailable in this token’s workspace and tenant.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Revision or state conflict.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Validation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '423':
          description: A durable workspace mutation is still preparing.
        '429':
          description: Request rate exceeded; respect Retry-After.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          headers:
            Retry-After:
              schema:
                type: string
              description: Seconds before retrying.
components:
  schemas:
    Entry:
      type: object
      properties:
        id:
          type: string
          pattern: ^[0-9A-HJKMNP-TV-Z]{26}$
          example: 01M6TF7X1MD67JKPT1BRPZSAJ6
        kind:
          type: string
          enum:
            - file
            - folder
        name:
          type: string
        revision:
          type: integer
          minimum: 1
        size:
          type: integer
          minimum: 0
        mediaType:
          type: string
        width:
          type:
            - integer
            - 'null'
        height:
          type:
            - integer
            - 'null'
        versionId:
          anyOf:
            - type: string
              pattern: ^[0-9A-HJKMNP-TV-Z]{26}$
              example: 01M6TF7X1MD67JKPT1BRPZSAJ6
            - type: 'null'
        thumbnailUrl:
          type:
            - string
            - 'null'
        previewUrl:
          type:
            - string
            - 'null'
      required:
        - id
        - name
        - kind
        - revision
    TreeOperationResult:
      type: object
      required:
        - treeOperation
        - items
      properties:
        items:
          type: array
          maxItems: 100
          items:
            $ref: '#/components/schemas/Entry'
        treeOperation:
          type: object
          required:
            - id
            - state
            - operation
            - discovered
            - examined
            - error
          properties:
            id:
              type: string
            state:
              type: string
              enum:
                - preparing
                - completed
                - failed
                - cancelled
            operation:
              type: string
              enum:
                - trash
                - restore
            discovered:
              type: integer
              minimum: 0
            examined:
              type: integer
              minimum: 0
            error:
              type:
                - string
                - 'null'
    Error:
      type: object
      properties:
        message:
          type: string
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
  securitySchemes:
    studioToken:
      type: http
      scheme: bearer
      description: >-
        A workspace API token created in AI → API & SDK. This is not an MCP
        token.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.