Brainfish Authentication API

Authentication and token validation operations

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 2

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /v1/auth/validate Check an access token and get user info · Validate access token #
Ask an LLM
“How do I test that my access token works?”
“Can I verify a token without an agent key?”
Tell an agent
Validate my current access token and show the user it belongs to.
Check whether this access token is still valid.
POST /v1/auth/revoke Revoke an access token · Revoke access token #
Ask an LLM
“How do I invalidate an access token I no longer need?”
“Can a revoked token ever be restored?”
Tell an agent destructive · confirm first
Revoke the access token I'm using right now.
Invalidate this access token so it can't be used for API calls.

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:brainfish-authentication-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

brainfish-authentication-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Brainfish Public Authentication 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: Authentication
  description: Authentication and token validation operations
paths:
  /v1/auth/validate:
    post:
      summary: Validate access token
      description: 'Validate an access token and return user information. This endpoint is useful for testing authentication setup and verifying token validity.


        Only requires the access token header - no agent key needed.'
      operationId: validateToken
      tags:
      - Authentication
      security:
      - BearerAuth: []
      responses:
        '200':
          description: Token is valid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenValidationResponse'
              example:
                valid: true
                user:
                  id: user-123
                  name: John Doe
                  email: john@example.com
                  teamId: team-456
                  teamName: Acme Corp
                timestamp: '2024-01-15T10:30:00Z'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /v1/auth/revoke:
    post:
      summary: Revoke access token
      description: 'Revoke the access token used to authenticate this request. Once revoked, the token will no longer be valid for API calls.


        **Warning**: This action cannot be undone. You will need to create a new access token to continue using the API.'
      operationId: revokeToken
      tags:
      - Authentication
      security:
      - BearerAuth: []
      responses:
        '200':
          description: Token successfully revoked
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenRevokeResponse'
              example:
                success: true
                message: Access token has been revoked successfully
                timestamp: '2024-01-15T10:30:00Z'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: Token not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: not_found
                message: API key not found
                timestamp: '2024-01-15T10:30:00Z'
        '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'
    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'
  schemas:
    TokenRevokeResponse:
      type: object
      required:
      - success
      - message
      - timestamp
      properties:
        success:
          type: boolean
          description: Indicates if the token was successfully revoked
          example: true
        message:
          type: string
          description: Confirmation message
          example: Access token has been revoked successfully
        timestamp:
          type: string
          format: date-time
          description: Revocation timestamp
          example: '2024-01-15T10:30:00Z'
    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
    TokenValidationResponse:
      type: object
      required:
      - valid
      - user
      - timestamp
      properties:
        valid:
          type: boolean
          description: Indicates if the token is valid
          example: true
        user:
          type: object
          description: User information associated with the token
          required:
          - id
          - name
          - email
          - teamId
          properties:
            id:
              type: string
              description: User ID
              example: user-123
            name:
              type: string
              description: User's full name
              example: John Doe
            email:
              type: string
              format: email
              description: User's email address
              example: john@example.com
            teamId:
              type: string
              description: Team ID the user belongs to
              example: team-456
            teamName:
              type: string
              description: Team name
              example: Acme Corp
        timestamp:
          type: string
          format: date-time
          description: Validation timestamp
          example: '2024-01-15T10:30:00Z'
  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.

        '