Brainfish Collections API

Collection management operations including create, read, update, list, and delete

Operations 5

GET /v1/collections List collections #
POST /v1/collections Create collection #
GET /v1/collections/{id} Get collection #
PUT /v1/collections/{id} Update collection #
DELETE /v1/collections/{id} Delete collection #

Documentation

Specifications

Other Resources

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/brainfish-collections-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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. See our Privacy Policy and Terms.

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

OpenAPI Specification

brainfish-collections-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Brainfish Public Collections API
  description: The Brainfish API is organized around REST.
  version: 1.0.0
  contact:
    name: Brainfish API Support
    email: support@brainfish.ai
    url: https://help.brainfi.sh/articles/api-reference-7mjzVCAmeM
  license:
    name: Proprietary
servers:
- url: https://api.brainfi.sh
  description: Production server
tags:
- name: Collections
  description: Collection management operations including create, read, update, list, and delete
paths:
  /v1/collections:
    get:
      summary: List collections
      description: List all collections the authenticated user has access to.
      operationId: listCollections
      tags:
      - Collections
      security:
      - BearerAuth: []
      parameters:
      - name: sortBy
        in: query
        description: Field to sort by
        schema:
          type: string
          enum:
          - updatedAt
          - index
          - name
          default: updatedAt
      - name: direction
        in: query
        description: Sort direction
        schema:
          type: string
          enum:
          - ASC
          - DESC
          default: DESC
      - name: limit
        in: query
        description: Maximum number of results to return (1-100)
        schema:
          type: integer
          minimum: 1
          maximum: 100
          default: 25
      - name: offset
        in: query
        description: Offset for pagination
        schema:
          type: integer
          minimum: 0
          default: 0
      responses:
        '200':
          description: List of collections
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionListResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
    post:
      summary: Create collection
      description: Create a new collection.
      operationId: createCollection
      tags:
      - Collections
      security:
      - BearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCollectionRequest'
            examples:
              simpleCollection:
                summary: Create a simple collection
                value:
                  name: Knowledge Base
                  description: Company knowledge base articles
                  color: '#4E5C6E'
              publicCollection:
                summary: Create a public collection
                value:
                  name: Help Center
                  description: Public help documentation
                  siteEnabled: true
                  sharing: true
      responses:
        '200':
          description: Collection created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /v1/collections/{id}:
    get:
      summary: Get collection
      description: Retrieve a collection by its ID.
      operationId: getCollection
      tags:
      - Collections
      security:
      - BearerAuth: []
      parameters:
      - name: id
        in: path
        required: true
        description: Collection ID
        schema:
          type: string
      responses:
        '200':
          description: Collection details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
    put:
      summary: Update collection
      description: Update an existing collection. Only provided fields will be updated.
      operationId: updateCollection
      tags:
      - Collections
      security:
      - BearerAuth: []
      parameters:
      - name: id
        in: path
        required: true
        description: Collection ID
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCollectionRequest'
            examples:
              updateName:
                summary: Update collection name
                value:
                  name: Updated Knowledge Base
              updateVisibility:
                summary: Make collection public
                value:
                  siteEnabled: true
      responses:
        '200':
          description: Collection updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
    delete:
      summary: Delete collection
      description: 'Delete a collection. This will also delete all documents within the collection.

        Cannot delete the last collection in a team.'
      operationId: deleteCollection
      tags:
      - Collections
      security:
      - BearerAuth: []
      parameters:
      - name: id
        in: path
        required: true
        description: Collection ID
        schema:
          type: string
      responses:
        '200':
          description: Collection deleted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteCollectionResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          description: Cannot delete the last collection
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  responses:
    Unauthorized:
      description: Authentication required or invalid credentials
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            missingToken:
              summary: Missing authentication token
              value:
                error: authentication_required
                message: 'Authentication required. Use Authorization: Bearer <token> header'
                timestamp: '2024-01-15T10:30:00Z'
                requestId: req-abc123
            missingAgentKey:
              summary: Missing agent key
              value:
                error: authentication_required
                message: Agent key is required
                timestamp: '2024-01-15T10:30:00Z'
                requestId: req-def456
            invalidCredentials:
              summary: Invalid credentials
              value:
                error: authentication_required
                message: Invalid or missing authentication credentials
                timestamp: '2024-01-15T10:30:00Z'
                requestId: req-ghi789
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: internal_error
            message: An unexpected error occurred
            requestId: req-abc123
            timestamp: '2024-01-15T10:30:00Z'
    UnprocessableEntity:
      description: Invalid request format or unknown message type
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationError'
          examples:
            emptyQuery:
              summary: Empty query validation error
              value:
                error: validation_failed
                message: Request validation failed
                validationErrors:
                - field: query
                  message: Query cannot be empty
                  code: invalid_string
                timestamp: '2024-01-15T10:30:00Z'
                requestId: req-val123
            invalidConversationId:
              summary: Invalid conversation ID format
              value:
                error: validation_failed
                message: Request validation failed
                validationErrors:
                - field: conversationId
                  message: Invalid conversation ID format
                  code: invalid_string
                timestamp: '2024-01-15T10:30:00Z'
                requestId: req-val456
            queryTooLong:
              summary: Query exceeds maximum length
              value:
                error: validation_failed
                message: Request validation failed
                validationErrors:
                - field: query
                  message: Query must be 2000 characters or less
                  code: too_big
                timestamp: '2024-01-15T10:30:00Z'
                requestId: req-val789
    TooManyRequests:
      description: Rate limit exceeded
      headers:
        X-RateLimit-Limit:
          schema:
            type: integer
          description: Request limit per time window
        X-RateLimit-Remaining:
          schema:
            type: integer
          description: Remaining requests in current window
        X-RateLimit-Reset:
          schema:
            type: integer
          description: Time when rate limit resets (Unix timestamp)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: rate_limit_exceeded
            message: 'Too many requests. Rate limit: 25 requests per minute'
            timestamp: '2024-01-15T10:30:00Z'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: not_found
            message: Document not found
            timestamp: '2024-01-15T10:30:00Z'
            requestId: req-notfound123
  schemas:
    DeleteCollectionResponse:
      type: object
      required:
      - success
      - timestamp
      properties:
        success:
          type: boolean
          description: Whether the deletion was successful
          example: true
        timestamp:
          type: string
          format: date-time
          description: Response timestamp
    CreateCollectionRequest:
      type: object
      required:
      - name
      properties:
        name:
          type: string
          description: Collection name
          minLength: 1
          example: Knowledge Base
        description:
          type: string
          description: Collection description
          example: Company knowledge base articles
        icon:
          type: string
          description: Collection icon (emoji or icon name)
          example: 📚
        color:
          type: string
          pattern: ^#[0-9A-Fa-f]{6}$
          description: Collection color in hex format
          example: '#4E5C6E'
        permission:
          type: string
          enum:
          - read
          - read_write
          description: Default permission for collection members
        sharing:
          type: boolean
          description: Whether sharing is enabled
        siteEnabled:
          type: boolean
          description: Whether the collection is public on site
    Error:
      type: object
      required:
      - error
      - message
      properties:
        error:
          type: string
          description: Error type or code
        message:
          type: string
          description: Human-readable error message
        details:
          type: object
          additionalProperties: true
          description: Additional error details
        timestamp:
          type: string
          format: date-time
          description: Error timestamp
        requestId:
          type: string
          description: Unique request identifier for debugging
    CollectionResponse:
      type: object
      required:
      - data
      - timestamp
      properties:
        data:
          $ref: '#/components/schemas/Collection'
        timestamp:
          type: string
          format: date-time
          description: Response timestamp
    CollectionListResponse:
      type: object
      required:
      - data
      - pagination
      - timestamp
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Collection'
        pagination:
          type: object
          required:
          - offset
          - limit
          - total
          properties:
            offset:
              type: integer
              example: 0
            limit:
              type: integer
              example: 25
            total:
              type: integer
              example: 10
        timestamp:
          type: string
          format: date-time
          description: Response timestamp
    ValidationError:
      allOf:
      - $ref: '#/components/schemas/Error'
      - type: object
        properties:
          validationErrors:
            type: array
            items:
              type: object
              properties:
                field:
                  type: string
                  description: Field that failed validation
                message:
                  type: string
                  description: Validation error message
                code:
                  type: string
                  description: Validation error code
    Collection:
      type: object
      required:
      - id
      - name
      - url
      properties:
        id:
          type: string
          description: Unique collection identifier
          example: col-123
        url:
          type: string
          description: Collection URL path
          example: /collection/knowledge-base-abc123
        urlId:
          type: string
          description: URL-friendly collection identifier
        name:
          type: string
          description: Collection name
          example: Knowledge Base
        description:
          type: string
          description: Collection description
        icon:
          type: string
          description: Collection icon
        color:
          type: string
          description: Collection color in hex format
          example: '#4E5C6E'
        index:
          type: string
          description: Collection sort index
        permission:
          type:
          - string
          - 'null'
          enum:
          - read
          - read_write
          description: Default permission level
        sharing:
          type: boolean
          description: Whether sharing is enabled
        siteEnabled:
          type: boolean
          description: Whether the collection is public on site
        documents:
          type: array
          items:
            type: object
          description: Document structure within the collection
        createdAt:
          type: string
          format: date-time
          description: Creation timestamp
        updatedAt:
          type: string
          format: date-time
          description: Last update timestamp
        deletedAt:
          type:
          - string
          - 'null'
          format: date-time
          description: Deletion timestamp
    UpdateCollectionRequest:
      type: object
      properties:
        name:
          type: string
          description: Collection name
          minLength: 1
        description:
          type: string
          description: Collection description
        icon:
          type: string
          description: Collection icon (emoji or icon name)
        color:
          type: string
          pattern: ^#[0-9A-Fa-f]{6}$
          description: Collection color in hex format
        permission:
          type:
          - string
          - 'null'
          enum:
          - read
          - read_write
          description: Default permission for collection members
        sharing:
          type: boolean
          description: Whether sharing is enabled
        siteEnabled:
          type: boolean
          description: Whether the collection is public on site
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Token
      description: 'Bearer token authentication. Include your API token in the Authorization header.


        Example: `Authorization: Bearer bf_api_xxxxx`


        Create tokens in your Brainfish dashboard under Settings → API Tokens.

        '
    AccessToken:
      type: apiKey
      in: header
      name: access-token
      description: '**Deprecated**: Use Bearer authentication instead.


        Legacy access token header for backward compatibility. Must start with `bf_api_`.


        Create tokens in your Brainfish dashboard under Settings → API Tokens.

        '
    AgentKey:
      type: apiKey
      in: header
      name: agent-key
      description: 'Agent key identifier that specifies which AI agent/widget to use for the request.


        Find agent keys in your Brainfish dashboard under Agents. Click on any agent key to copy it.

        '