Cognition AI Knowledge API
Operations for managing knowledge
Operations for managing knowledge
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
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.curl "https://apis.io/api/v1/apis/cognition-knowledge-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
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: 3.2.0
info:
title: Devin External Attachments Knowledge API
version: 1.0.0
description: 'The Devin External API enables you to programmatically create and interact with Devin sessions. This RESTful API allows you to integrate Devin into your own applications, automate workflows, and build powerful tools on top of Devin.
**Note**: The External API is currently in alpha. While we strive to maintain backward compatibility, some endpoints may change as we improve the API.
'
servers:
- url: https://api.devin.ai
description: Devin Production Server
security:
- bearerAuth: []
tags:
- name: Knowledge
description: Operations for managing knowledge
paths:
/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'
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'
/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'
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'
components:
schemas:
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
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)
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
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'
responses:
UnauthorizedError:
description: Unauthorized - Invalid or missing API key
content:
application/json:
schema:
type: object
properties:
detail:
type: string
example: Missing or invalid Authorization header
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
NotFoundError:
description: Resource not found
content:
application/json:
schema:
type: object
properties:
detail:
type: string
example: The requested resource does not exist
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
externalDocs:
description: Visit Devin's documentation page for more info
url: https://docs.devin.ai