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

# Organize into a folder

> One-call BFF: resolve a tag by name (creating it when missing), then assign it to every listed file. The verb users and AI agents actually want — 'put these recordings into this folder'. **Pro license required.** A Basic key is rejected with `400` and `you are not a magic meal kits PRO user`.



## OpenAPI

````yaml /api-reference/plaud/openapi.json post /plaud/files/organize
openapi: 3.1.0
info:
  title: Magic Meal Kits — Plaud API
  version: 1.0.0
  description: >-
    Read your Plaud voice-recorder library — recordings, transcripts, AI
    summaries, note tabs, devices, and search — through your Magic Meal Kits
    server. Backs the **Plaud (Magic Meal Kits)** Make.com app.


    Your Plaud account credentials live server-side (Secret Manager) on your
    deployment; callers only send the MMK API key. Every endpoint requires a
    **Pro** license — a Basic key is rejected with `400` and `you are not a
    magic meal kits PRO user`.
  license:
    name: Proprietary
    identifier: LicenseRef-Proprietary
servers:
  - url: https://{deployment}/api/v1
    description: Your Magic Meal Kits deployment
    variables:
      deployment:
        default: magic-meal-kits-xxxxx.run.app
        description: Your Cloud Run host (without protocol)
security:
  - ApiKeyAuth: []
tags:
  - name: User
    description: Account profile and membership.
  - name: Files
    description: List, inspect, and bundle recordings.
  - name: Content
    description: Transcripts, summaries, note tabs, and audio.
  - name: Search
    description: Full-text search across transcripts.
  - name: Devices
    description: Bound Plaud hardware.
  - name: Webhooks
    description: Polling source for new-recording triggers.
  - name: Folders
    description: 'Tags (used as folders): list, create, assign/clear, and one-call organize.'
  - name: AI
    description: >-
      Auto transcribe + summarize, task status, transcription quota, and summary
      models.
  - name: System
    description: Diagnostics, membership, config, and background-task status.
paths:
  /plaud/files/organize:
    post:
      tags:
        - Folders
      summary: Organize into a folder
      description: >-
        One-call BFF: resolve a tag by name (creating it when missing), then
        assign it to every listed file. The verb users and AI agents actually
        want — 'put these recordings into this folder'. **Pro license
        required.** A Basic key is rejected with `400` and `you are not a magic
        meal kits PRO user`.
      operationId: organizePlaudFiles
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrganizeFilesRequest'
            example:
              file_ids:
                - f1
                - f2
              tag_name: Interviews
              color: '#46cf6c'
              match_mode: fold
              create_if_missing: true
      responses:
        '200':
          description: Organize result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizeFilesResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/PlaudAuthError'
        '502':
          $ref: '#/components/responses/UpstreamError'
components:
  schemas:
    OrganizeFilesRequest:
      type: object
      required:
        - file_ids
        - tag_name
      properties:
        file_ids:
          type: array
          items:
            type: string
          minItems: 1
        tag_name:
          type: string
        color:
          type: string
          description: Optional; only used when creating a new tag.
        icon:
          type: string
          description: Optional 4-char hex glyph code; only used when creating.
        match_mode:
          type: string
          enum:
            - exact
            - fold
          default: exact
          description: '`exact` = case-sensitive match; `fold` = case-insensitive.'
        create_if_missing:
          type: boolean
          default: true
          description: Create the tag when no match exists.
    OrganizeFilesResponse:
      type: object
      properties:
        tag:
          $ref: '#/components/schemas/Filetag'
        tag_created:
          type: boolean
          description: True if the tag was created during this call.
        files_assigned:
          type: integer
    Filetag:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        color:
          type: string
          description: '`#rrggbb`.'
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
  responses:
    BadRequest:
      description: >-
        Invalid request (e.g. missing/blank required field), or the Pro-license
        gate: a Basic key is rejected with `400` and `you are not a magic meal
        kits PRO user`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    PlaudAuthError:
      description: >-
        Plaud credentials rejected (revoked/expired) — reconnect your Plaud
        account.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    UpstreamError:
      description: >-
        Plaud upstream returned an error (surfaced as `502` with
        `upstream_status`/`upstream_msg`).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
      description: >-
        Your deployment's API key (MMK_API_KEY). Your Plaud account credentials
        are stored server-side — you do not send them.

````