POST
/
v1
/
knowledge
Create knowledge
curl --request POST \
  --url https://api.devin.ai/v1/knowledge \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "body": "<string>",
  "name": "<any>",
  "parent_folder_id": "<string>",
  "trigger_description": "<string>",
  "pinned_repo": "all"
}'
{
  "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"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Information about a piece of knowledge

body
string
required

The content of the knowledge. Devin will read this when the knowledge gets triggered

name
any
required

The name of the knowledge, used only for displaying the knowledge on the knowledge page

trigger_description
string
required

The description of when this knowledge should be used by Devin

parent_folder_id
string

The id of the folder that this knowledge is located in. Null if the knowledge is not located in any folder

pinned_repo
string | null

Pin knowledge to specific repositories. Valid values:

  • null: No pinning (default)
  • "all": Pin to all repositories
  • "owner/repo": Pin to specific repository
Example:

"all"

Response

Knowledge created. Returns the newly created knowledge.

Information about a piece of knowledge

body
string
required

The content of the knowledge. Devin will read this when the knowledge gets triggered

name
any
required

The name of the knowledge, used only for displaying the knowledge on the knowledge page

trigger_description
string
required

The description of when this knowledge should be used by Devin

id
string
required

The id of the knowledge

created_at
string<date-time>
required

Creation timestamp (ISO 8601)

parent_folder_id
string

The id of the folder that this knowledge is located in. Null if the knowledge is not located in any folder

pinned_repo
string | null

Pin knowledge to specific repositories. Valid values:

  • null: No pinning (default)
  • "all": Pin to all repositories
  • "owner/repo": Pin to specific repository
Example:

"all"