Stable Baseline Folders API

Folder CRUD and reparenting.

GitHub OpenAPI

Operations 5

POST /tools/listFolders listFolders #
POST /tools/createFolder createFolder #
POST /tools/updateFolder updateFolder #
POST /tools/deleteFolder deleteFolder #
POST /tools/reorderFolders reorderFolders #

Specifications

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/stablebaseline-io:stablebaseline-io-folders-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

stablebaseline-io-folders-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Stable Baseline REST Folders API
  version: 0.4.0
  description: 'REST adapter over the Stable Baseline MCP tool catalogue. Every operation maps 1:1 to an MCP tool; the same handlers serve both surfaces. Auth: OAuth 2.1 (Bearer) or API key with prefix `sta_*` (also Bearer). The full tool catalogue and per-category guides live at https://stablebaseline.io/docs/mcp.'
  contact:
    name: Stable Baseline
    url: https://stablebaseline.io/contact
  license:
    name: Proprietary SaaS, see Terms
    url: https://stablebaseline.io/terms
servers:
- url: https://api.stablebaseline.io/functions/v1/cloud-serve/api/v1
  description: Production
security:
- bearerAuth: []
tags:
- name: Folders
  description: Folder CRUD and reparenting.
paths:
  /tools/listFolders:
    post:
      summary: listFolders
      description: List folders in a project. Use parentId for nested folders. For full tree, use getProjectHierarchy instead.
      operationId: listFolders
      tags:
      - Folders
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                projectId:
                  type: string
                parentId:
                  type: string
                query:
                  type: string
                limit:
                  type: number
                offset:
                  type: number
                fromDate:
                  type: string
                  description: ISO 8601 date filter (from).
                toDate:
                  type: string
                  description: ISO 8601 date filter (to).
                dateField:
                  type: string
                  description: 'Date field to filter. Default: updated_at.'
                fields:
                  type: array
                  items:
                    type: string
                  description: 'Field projection. Valid fields: id, projectId, parentId, name, position, createdAt, updatedAt.'
              required:
              - projectId
      responses:
        '200':
          description: 'Tool result (shape varies per tool: refer to the tool''s docs for the exact return value).'
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '400':
          description: Validation error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Authenticated but lacking the required permission or feature flag.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Resource not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: 'Conflict: the record changed since you read it, or one with that name already exists. Read it again, then retry.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Body did not match the tool's input schema.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '423':
          description: 'The credential is valid but its organisation''s own database is locked (code `org_locked`, details.action `contact_admin`). Not a sign-in problem: signing in again does not help.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: 'Too many requests. With the code `rate_limited`, the organisation is past its request limit: wait the number of seconds in the Retry-After header, then try again. Any other code is a limit of the tool itself.'
          headers:
            Retry-After:
              description: Whole seconds to wait before trying again. Sent with the code `rate_limited`.
              schema:
                type: integer
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/RateLimitedResponse'
                - $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: 'Not available for a moment. Either the credential is valid but its organisation''s own database cannot be reached right now (code `org_unavailable`), or the credential could not be checked right now for a reason of ours (code `service_unavailable`: it was not judged, so keep it and do not sign in again). Either way details.action is `retry_later`: try again after the Retry-After header''s seconds.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /tools/createFolder:
    post:
      summary: createFolder
      description: Create a folder in a project. Supports nesting via parentId.
      operationId: createFolder
      tags:
      - Folders
      parameters:
      - name: Idempotency-Key
        in: header
        required: false
        description: 'Optional. Any 1 to 255 visible characters, new for each request you mean to make once (a UUID works). Kept 24 hours for your API key and organisation: the same key with the same request again returns the first answer (with the header Idempotent-Replayed: true) and does nothing twice; while the first call is still running, 409 with code idempotency_key_in_use and Retry-After; the same key with a different request, 422 with code idempotency_key_reused. A call that answered with an error frees its key, so the retry runs again.'
        schema:
          type: string
          minLength: 1
          maxLength: 255
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                projectId:
                  type: string
                parentId:
                  type: string
                name:
                  type: string
                position:
                  type: number
              required:
              - projectId
              - name
      responses:
        '200':
          description: 'Tool result (shape varies per tool: refer to the tool''s docs for the exact return value).'
          headers:
            Idempotent-Replayed:
              description: 'true when this is the first answer for the same Idempotency-Key, replayed: nothing was done again.'
              schema:
                type: string
                enum:
                - 'true'
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '400':
          description: Validation error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Authenticated but lacking the required permission or feature flag.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Resource not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: 'Conflict: the record changed since you read it, or one with that name already exists. Read it again, then retry. With the code `idempotency_key_in_use`, a call with the same Idempotency-Key is still running: nothing new was started; send the same request again after the Retry-After header''s seconds.'
          headers:
            Retry-After:
              description: Whole seconds to wait before sending the same request again. Sent with the code `idempotency_key_in_use`.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: 'Body did not match the tool''s input schema. With the code `idempotency_key_reused`, the Idempotency-Key was already used for a different request: send a new key.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '423':
          description: 'The credential is valid but its organisation''s own database is locked (code `org_locked`, details.action `contact_admin`). Not a sign-in problem: signing in again does not help.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: 'Too many requests. With the code `rate_limited`, the organisation is past its request limit: wait the number of seconds in the Retry-After header, then try again. Any other code is a limit of the tool itself.'
          headers:
            Retry-After:
              description: Whole seconds to wait before trying again. Sent with the code `rate_limited`.
              schema:
                type: integer
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/RateLimitedResponse'
                - $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: 'Not available for a moment. Either the credential is valid but its organisation''s own database cannot be reached right now (code `org_unavailable`), or the credential could not be checked right now for a reason of ours (code `service_unavailable`: it was not judged, so keep it and do not sign in again). Either way details.action is `retry_later`: try again after the Retry-After header''s seconds.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /tools/updateFolder:
    post:
      summary: updateFolder
      description: 'Update a folder: rename it, move it or reorder it. `parentId` moves it under another folder of its project. To move the folder WITH EVERYTHING IN IT into another project, in any workspace of the same organisation, give `projectId` (the project it moves to) and, if you like, `parentId` (a folder of that project; omit it for the project''s top level). Its subfolders, documents and boards go with it, and their pictures, diagrams, attachments, versions and links keep working; their DOC and WBD numbers stay. Moving it out of its project needs, for the folder and everything in it, the right to delete it there or to be the one who made it, and the right to add where it goes; at most 500 items in one move, all of it or none of it. Rename or reorder in a separate call. Give `dryRun: true` to see what would move and anything that would refuse, with nothing changed.'
      operationId: updateFolder
      tags:
      - Folders
      parameters:
      - name: Idempotency-Key
        in: header
        required: false
        description: 'Optional. Any 1 to 255 visible characters, new for each request you mean to make once (a UUID works). Kept 24 hours for your API key and organisation: the same key with the same request again returns the first answer (with the header Idempotent-Replayed: true) and does nothing twice; while the first call is still running, 409 with code idempotency_key_in_use and Retry-After; the same key with a different request, 422 with code idempotency_key_reused. A call that answered with an error frees its key, so the retry runs again.'
        schema:
          type: string
          minLength: 1
          maxLength: 255
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                folderId:
                  type: string
                parentId:
                  type: string
                  description: 'The folder to move it under: in its own project, or with projectId in that project. Null for the top level.'
                name:
                  type: string
                position:
                  type: number
                projectId:
                  type: string
                  description: 'Optional. The project to move the folder into, with everything in it: another project, in any workspace of the same organisation.'
                dryRun:
                  type: boolean
                  description: Optional. true answers what would move and anything that would refuse, and changes nothing.
              required:
              - folderId
      responses:
        '200':
          description: 'Tool result (shape varies per tool: refer to the tool''s docs for the exact return value).'
          headers:
            Idempotent-Replayed:
              description: 'true when this is the first answer for the same Idempotency-Key, replayed: nothing was done again.'
              schema:
                type: string
                enum:
                - 'true'
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '400':
          description: Validation error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Authenticated but lacking the required permission or feature flag.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Resource not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: 'Conflict: the record changed since you read it, or one with that name already exists. Read it again, then retry. With the code `idempotency_key_in_use`, a call with the same Idempotency-Key is still running: nothing new was started; send the same request again after the Retry-After header''s seconds.'
          headers:
            Retry-After:
              description: Whole seconds to wait before sending the same request again. Sent with the code `idempotency_key_in_use`.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: 'Body did not match the tool''s input schema. With the code `idempotency_key_reused`, the Idempotency-Key was already used for a different request: send a new key.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '423':
          description: 'The credential is valid but its organisation''s own database is locked (code `org_locked`, details.action `contact_admin`). Not a sign-in problem: signing in again does not help.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: 'Too many requests. With the code `rate_limited`, the organisation is past its request limit: wait the number of seconds in the Retry-After header, then try again. Any other code is a limit of the tool itself.'
          headers:
            Retry-After:
              description: Whole seconds to wait before trying again. Sent with the code `rate_limited`.
              schema:
                type: integer
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/RateLimitedResponse'
                - $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: 'Not available for a moment. Either the credential is valid but its organisation''s own database cannot be reached right now (code `org_unavailable`), or the credential could not be checked right now for a reason of ours (code `service_unavailable`: it was not judged, so keep it and do not sign in again). Either way details.action is `retry_later`: try again after the Retry-After header''s seconds.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /tools/deleteFolder:
    post:
      summary: deleteFolder
      description: Delete a folder recursively, including all nested folders and documents.
      operationId: deleteFolder
      tags:
      - Folders
      parameters:
      - name: Idempotency-Key
        in: header
        required: false
        description: 'Optional. Any 1 to 255 visible characters, new for each request you mean to make once (a UUID works). Kept 24 hours for your API key and organisation: the same key with the same request again returns the first answer (with the header Idempotent-Replayed: true) and does nothing twice; while the first call is still running, 409 with code idempotency_key_in_use and Retry-After; the same key with a different request, 422 with code idempotency_key_reused. A call that answered with an error frees its key, so the retry runs again.'
        schema:
          type: string
          minLength: 1
          maxLength: 255
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                folderId:
                  type: string
              required:
              - folderId
      responses:
        '200':
          description: 'Tool result (shape varies per tool: refer to the tool''s docs for the exact return value).'
          headers:
            Idempotent-Replayed:
              description: 'true when this is the first answer for the same Idempotency-Key, replayed: nothing was done again.'
              schema:
                type: string
                enum:
                - 'true'
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '400':
          description: Validation error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Authenticated but lacking the required permission or feature flag.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Resource not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: 'Conflict: the record changed since you read it, or one with that name already exists. Read it again, then retry. With the code `idempotency_key_in_use`, a call with the same Idempotency-Key is still running: nothing new was started; send the same request again after the Retry-After header''s seconds.'
          headers:
            Retry-After:
              description: Whole seconds to wait before sending the same request again. Sent with the code `idempotency_key_in_use`.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: 'Body did not match the tool''s input schema. With the code `idempotency_key_reused`, the Idempotency-Key was already used for a different request: send a new key.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '423':
          description: 'The credential is valid but its organisation''s own database is locked (code `org_locked`, details.action `contact_admin`). Not a sign-in problem: signing in again does not help.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: 'Too many requests. With the code `rate_limited`, the organisation is past its request limit: wait the number of seconds in the Retry-After header, then try again. Any other code is a limit of the tool itself.'
          headers:
            Retry-After:
              description: Whole seconds to wait before trying again. Sent with the code `rate_limited`.
              schema:
                type: integer
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/RateLimitedResponse'
                - $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: 'Not available for a moment. Either the credential is valid but its organisation''s own database cannot be reached right now (code `org_unavailable`), or the credential could not be checked right now for a reason of ours (code `service_unavailable`: it was not judged, so keep it and do not sign in again). Either way details.action is `retry_later`: try again after the Retry-After header''s seconds.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /tools/reorderFolders:
    post:
      summary: reorderFolders
      description: Batch-reorder folders within a parent (or project root) by setting sibling positions. Pass [{folderId, position}, ...] where position is a non-negative integer; usually you renumber siblings sequentially as 0, 1, 2…. To MOVE a folder to a different parent and set its position there, use updateFolder({parentId, position}) instead.
      operationId: reorderFolders
      tags:
      - Folders
      parameters:
      - name: Idempotency-Key
        in: header
        required: false
        description: 'Optional. Any 1 to 255 visible characters, new for each request you mean to make once (a UUID works). Kept 24 hours for your API key and organisation: the same key with the same request again returns the first answer (with the header Idempotent-Replayed: true) and does nothing twice; while the first call is still running, 409 with code idempotency_key_in_use and Retry-After; the same key with a different request, 422 with code idempotency_key_reused. A call that answered with an error frees its key, so the retry runs again.'
        schema:
          type: string
          minLength: 1
          maxLength: 255
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                items:
                  type: array
                  description: List of folder position updates. All folders must belong to the same project.
                  items:
                    type: object
                    properties:
                      folderId:
                        type: string
                      position:
                        type: number
                    required:
                    - folderId
                    - position
                  minItems: 1
              required:
              - items
      responses:
        '200':
          description: 'Tool result (shape varies per tool: refer to the tool''s docs for the exact return value).'
          headers:
            Idempotent-Replayed:
              description: 'true when this is the first answer for the same Idempotency-Key, replayed: nothing was done again.'
              schema:
                type: string
                enum:
                - 'true'
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '400':
          description: Validation error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Authenticated but lacking the required permission or feature flag.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Resource not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: 'Conflict: the record changed since you read it, or one with that name already exists. Read it again, then retry. With the code `idempotency_key_in_use`, a call with the same Idempotency-Key is still running: nothing new was started; send the same request again after the Retry-After header''s seconds.'
          headers:
            Retry-After:
              description: Whole seconds to wait before sending the same request again. Sent with the code `idempotency_key_in_use`.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: 'Body did not match the tool''s input schema. With the code `idempotency_key_reused`, the Idempotency-Key was already used for a different request: send a new key.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '423':
          description: 'The credential is valid but its organisation''s own database is locked (code `org_locked`, details.action `contact_admin`). Not a sign-in problem: signing in again does not help.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: 'Too many requests. With the code `rate_limited`, the organisation is past its request limit: wait the number of seconds in the Retry-After header, then try again. Any other code is a limit of the tool itself.'
          headers:
            Retry-After:
              description: Whole seconds to wait before trying again. Sent with the code `rate_limited`.
              schema:
                type: integer
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/RateLimitedResponse'
                - $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: 'Not available for a moment. Either the credential is valid but its organisation''s own database cannot be reached right now (code `org_unavailable`), or the credential could not be checked right now for a reason of ours (code `service_unavailable`: it was not judged, so keep it and do not sign in again). Either way details.action is `retry_later`: try again after the Retry-After header''s seconds.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: Stable error code (e.g. `permission_denied`, `not_found`, `validation_failed`).
            message:
              type: string
              description: Human-readable explanation.
            details:
              type: object
              additionalProperties: true
              description: Optional context.
          required:
          - code
          - message
      required:
      - error
    RateLimitedResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: Always `rate_limited`.
            message:
              type: string
              description: One sentence saying the organisation is past its limit and how long to wait.
            retry_after:
              type: integer
              description: Whole seconds to wait before trying again. The same value as the Retry-After header.
            rate:
              type: number
              description: How many requests a second the organisation may send, across all its API keys and connections.
            burst:
              type: number
              description: How many requests it may send at once after a quiet spell.
          required:
          - code
          - message
          - retry_after
          - rate
          - burst
      required:
      - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Either an MCP API key (prefix `sta_`, mint at https://app.stablebaseline.io/settings/developers) or an OAuth 2.1 access token. Every OAuth endpoint lives under this function, and the authoritative list is at https://api.stablebaseline.io/functions/v1/cloud-serve/.well-known/oauth-authorization-server: authorise at https://api.stablebaseline.io/functions/v1/cloud-serve/oauth/authorize, exchange at https://api.stablebaseline.io/functions/v1/cloud-serve/oauth/token.'