Cognition Labs Knowledge API

Organization knowledge entries and folders.

Operations 8

GET /knowledge List all knowledge entries and folders #
POST /knowledge Create a knowledge entry #
PUT /knowledge/{knowledge_id} Update a knowledge entry #
DELETE /knowledge/{knowledge_id} Delete a knowledge entry #
GET /v1/knowledge List knowledge #
POST /v1/knowledge Create knowledge #
DELETE /v1/knowledge/{note_id} Delete knowledge #
PUT /v1/knowledge/{note_id} Update knowledge #

Documentation

📖
Documentation
https://docs.devin.ai/api-reference/overview
📖
APIReference
https://docs.devin.ai/api-reference/v1/sessions/create-a-new-devin-session
📖
APIReference
https://docs.devin.ai/api-reference/v1/sessions/send-a-message-to-an-existing-devin-session
📖
APIReference
https://docs.devin.ai/api-reference/v3/sessions/post-organizations-sessions-messages
📖
APIReference
https://docs.devin.ai/api-reference/v1/attachments/upload-files-for-devin-to-work-with
📖
APIReference
https://docs.devin.ai/api-reference/v1/attachments/download-attachment-files
📖
APIReference
https://docs.devin.ai/api-reference/v1/knowledge/list-knowledge
📖
APIReference
https://docs.devin.ai/api-reference/v1/knowledge/create-knowledge
📖
APIReference
https://docs.devin.ai/api-reference/v1/playbooks/list-playbooks
📖
APIReference
https://docs.devin.ai/api-reference/v1/playbooks/create-playbook
📖
APIReference
https://docs.devin.ai/api-reference/v1/secrets/list-secrets
📖
APIReference
https://docs.devin.ai/api-reference/v1/secrets/create-secret
📖
Documentation
https://docs.devin.ai/admin/security
📖
Documentation
https://docs.devin.ai/api-reference/v3/overview
📖
Documentation
https://docs.devin.ai/api-reference/getting-started/teams-quickstart
📖
APIReference
https://docs.devin.ai/api-reference/v3/users/members-users
📖
Documentation
https://docs.devin.ai/api-reference/getting-started/enterprise-quickstart
📖
APIReference
https://docs.devin.ai/api-reference/v2/organizations/list-organizations
📖
APIReference
https://docs.devin.ai/api-reference/v2/api-keys/list-enterprise-api-keys
📖
Documentation
https://docs.devin.ai/admin/billing/usage
📖
Documentation
https://docs.devin.ai/admin/billing/enterprise
📖
APIReference
https://docs.devin.ai/api-reference/v3/consumption/consumption-daily

Specifications

Schemas & Data

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/cognition-labs-knowledge-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

cognition-labs-knowledge-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Cognition Labs Knowledge API
  version: '1.0'
  description: 'Operations tagged Knowledge across 2 of this provider''s published API definitions: cognition-labs-openapi.yml, cognition-labs-openapi.yaml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.devin.ai/v1
  description: Legacy v1 API (apk_user_*/apk_* keys)
- url: https://api.devin.ai/v3
  description: Current v3 organizations/enterprise API (cog_ keys)
- url: https://api.devin.ai
  description: Devin Production Server
security:
- bearerAuth: []
tags:
- name: Knowledge
  description: Organization knowledge entries and folders.
paths:
  /knowledge:
    get:
      operationId: listKnowledge
      tags:
      - Knowledge
      summary: List all knowledge entries and folders
      responses:
        '200':
          description: Knowledge entries and folders for the organization.
          content:
            application/json:
              schema:
                type: object
                properties:
                  knowledge:
                    type: array
                    items:
                      $ref: '#/components/schemas/KnowledgeEntry'
                  folders:
                    type: array
                    items:
                      $ref: '#/components/schemas/KnowledgeFolder'
    post:
      operationId: createKnowledge
      tags:
      - Knowledge
      summary: Create a knowledge entry
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KnowledgeInput'
      responses:
        '200':
          description: The created knowledge entry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KnowledgeEntry'
        '422':
          $ref: '#/components/responses/ValidationError'
    servers:
    - url: https://api.devin.ai/v1
      description: Legacy v1 API (apk_user_*/apk_* keys)
    - url: https://api.devin.ai/v3
      description: Current v3 organizations/enterprise API (cog_ keys)
  /knowledge/{knowledge_id}:
    parameters:
    - name: knowledge_id
      in: path
      required: true
      schema:
        type: string
    put:
      operationId: updateKnowledge
      tags:
      - Knowledge
      summary: Update a knowledge entry
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KnowledgeInput'
      responses:
        '200':
          description: The updated knowledge entry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KnowledgeEntry'
        '422':
          $ref: '#/components/responses/ValidationError'
    delete:
      operationId: deleteKnowledge
      tags:
      - Knowledge
      summary: Delete a knowledge entry
      responses:
        '200':
          description: Deletion confirmation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
        '422':
          $ref: '#/components/responses/ValidationError'
    servers:
    - url: https://api.devin.ai/v1
      description: Legacy v1 API (apk_user_*/apk_* keys)
    - url: https://api.devin.ai/v3
      description: Current v3 organizations/enterprise API (cog_ keys)
  /v1/knowledge:
    get:
      tags:
      - Knowledge
      summary: List knowledge
      description: Gets all knowledge and folders in your current organization. This endpoint will not return system knowledge (repo indexes or built-in knowledge) managed by Cognition.
      responses:
        '200':
          description: List of all knowledge and folders
          content:
            application/json:
              schema:
                type: object
                properties:
                  knowledge:
                    type: array
                    items:
                      $ref: '#/components/schemas/KnowledgeResponse'
                  folders:
                    type: array
                    items:
                      $ref: '#/components/schemas/KnowledgeFolderResponse'
                required:
                - knowledge
                - folders
              examples:
                list-knowledge-response:
                  summary: Example response listing knowledge and folders
                  value:
                    knowledge:
                    - $ref: '#/components/examples/knowledge-response/value'
                    folders:
                    - id: folder-xxx
                      name: Fetching data
                      description: Knowledge related to what websites or APIs Devin should use to complete certain tasks
                      created_at: '2024-01-01T00:00:00Z'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
      operationId: getV1Knowledge
      x-operation-id-source: derived
    post:
      tags:
      - Knowledge
      summary: Create knowledge
      description: Create a new piece of knowledge.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KnowledgeRequest'
      responses:
        '200':
          description: Knowledge created. Returns the newly created knowledge.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KnowledgeResponse'
              examples:
                create-knowledge-response:
                  summary: Example response for creating a knowledge
                  value:
                    $ref: '#/components/examples/knowledge-response/value'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
      operationId: postV1Knowledge
      x-operation-id-source: derived
    servers:
    - url: https://api.devin.ai
      description: Devin Production Server
  /v1/knowledge/{note_id}:
    delete:
      tags:
      - Knowledge
      summary: Delete knowledge
      description: Permanently delete a piece of knowledge by its ID. This action cannot be undone.
      parameters:
      - name: note_id
        in: path
        required: true
        description: The ID of the knowledge to delete
        schema:
          type: string
      responses:
        '204':
          description: Knowledge successfully deleted
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      operationId: deleteV1KnowledgeByNoteId
      x-operation-id-source: derived
    put:
      tags:
      - Knowledge
      summary: Update knowledge
      description: Update the name, body, or trigger of a piece of knowledge.
      parameters:
      - name: note_id
        in: path
        required: true
        description: The ID of the knowledge to update
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KnowledgeRequest'
        required: true
      responses:
        '200':
          description: Knowledge successfully updated. Returns the updated knowledge.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KnowledgeResponse'
              examples:
                update-knowledge-response:
                  summary: Example response for updating a knowledge
                  value:
                    $ref: '#/components/examples/knowledge-response/value'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      operationId: putV1KnowledgeByNoteId
      x-operation-id-source: derived
    servers:
    - url: https://api.devin.ai
      description: Devin Production Server
components:
  schemas:
    ValidationErrorBody:
      type: object
      properties:
        detail:
          type: array
          items:
            type: object
            properties:
              loc:
                type: array
                items:
                  type: string
              msg:
                type: string
              type:
                type: string
    KnowledgeInput:
      type: object
      required:
      - name
      - body
      - trigger_description
      properties:
        name:
          type: string
        body:
          type: string
        trigger_description:
          type: string
          description: Describes when this knowledge entry should apply.
        macro:
          type: string
        parent_folder_id:
          type: string
        pinned_repo:
          type: string
    KnowledgeEntry:
      allOf:
      - $ref: '#/components/schemas/KnowledgeInput'
      - type: object
        properties:
          id:
            type: string
          created_at:
            type: string
            format: date-time
          created_by:
            type: object
            properties:
              full_name:
                type: string
              id:
                type:
                - string
                - 'null'
              image_url:
                type:
                - string
                - 'null'
    KnowledgeFolder:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type: string
        created_at:
          type: string
          format: date-time
    KnowledgeFolderResponse:
      type: object
      description: Information about a knowledge folder
      properties:
        id:
          type: string
          description: The id of the folder
        name:
          type: string
          description: The name of the folder
        description:
          type: string
          description: The description of the folder, assists the auto-organization of knowledge
        created_at:
          type: string
          format: date-time
          description: Creation timestamp (ISO 8601)
    KnowledgeRequest:
      type: object
      description: Information about a piece of knowledge
      properties:
        body:
          type: string
          description: The content of the knowledge. Devin will read this when the knowledge gets triggered
        name:
          title: Name
          description: The name of the knowledge, used only for displaying the knowledge on the knowledge page
        parent_folder_id:
          type: string
          nullabe: true
          description: The id of the folder that this knowledge is located in. Null if the knowledge is not located in any folder
        trigger_description:
          type: string
          description: The description of when this knowledge should be used by Devin
        pinned_repo:
          type: string
          nullable: true
          description: "Pin knowledge to specific repositories. Valid values:\n- null: No pinning (default)\n- \"all\": Pin to all repositories  \n- \"owner/repo\": Pin to specific repository\n"
          example: all
      required:
      - name
      - body
      - trigger_description
    KnowledgeResponse:
      description: Information about a piece of knowledge
      allOf:
      - $ref: '#/components/schemas/KnowledgeRequest'
      - type: object
        properties:
          id:
            type: string
            description: The id of the knowledge
          created_at:
            type: string
            format: date-time
            description: Creation timestamp (ISO 8601)
        required:
        - id
        - created_at
  responses:
    ValidationError:
      description: The request payload failed validation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationErrorBody'
    UnauthorizedError:
      description: Unauthorized - Invalid or missing API key
      content:
        application/json:
          schema:
            type: object
            properties:
              detail:
                type: string
                example: Missing or invalid Authorization header
    NotFoundError:
      description: Resource not found
      content:
        application/json:
          schema:
            type: object
            properties:
              detail:
                type: string
                example: The requested resource does not exist
    ForbiddenError:
      description: Forbidden - User does not have permission to access the resource
      content:
        application/json:
          schema:
            type: object
            properties:
              detail:
                type: string
                example: You do not have permission to access this resource
  examples:
    knowledge-response:
      value:
        id: note-xxx
        name: Getting the weather
        body: Navigate to weather.com
        trigger_description: When the user asks about the weather
        parent_folder_id: folder-xxx
        created_at: '2024-01-01T00:00:00Z'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'v1/v2 keys are prefixed apk_user_* (personal) or apk_* (service). The current v3 API uses service-user or personal access tokens prefixed cog_. Passed as `Authorization: Bearer YOUR_API_KEY`.'
externalDocs:
  description: Visit Devin's documentation page for more info
  url: https://docs.devin.ai
x-refined-from:
- cognition-labs-openapi.yml
- cognition-labs-openapi.yaml