> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://devin.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://devin.ferndocs.com/_mcp/server.

# Create an org-level note

POST https://api.devin.ai/v3/organizations/{org_id}/knowledge/notes
Content-Type: application/json

Create a note for an organization.

Reference: https://devin.ferndocs.com/api-reference/v-3/create-organizations-knowledge-notes-by-org-id

## Authentication

- `Authorization` header (bearer token, required) — Personal API Key (apk_user_*) or Service API Key (apk_*)

## Request

### Path parameters

- `org_id` (string, required)

### Body (application/json)

This endpoint expects a KnowledgeNoteCreateRequest.

- `body` (string, required)
- `name` (string, required)
- `trigger` (string, required)
- `pinned_repo` (string, optional, nullable)

## Response

### 200

Successful Response

- `access_type` (enum, required) — Scope of the note: org or enterprise.
  - Allowed values: `enterprise`, `org`
- `body` (string, required) — Markdown body content of the note.
- `created_at` (integer, required) — ISO 8601 timestamp when the note was created.
- `folder_id` (string, required, nullable) — ID of the folder containing this note.
- `folder_path` (string, required) — Full path of the folder containing this note.
- `is_enabled` (boolean, required) — Whether the note is active and will be injected into sessions.
- `macro` (string, required, nullable) — Shortcut macro for quick reference.
- `name` (string, required) — Display name of the knowledge note.
- `note_id` (string, required) — Unique identifier for the knowledge note (prefix note-).
- `org_id` (string, required, nullable) — Organization that owns this note (prefix org-).
- `pinned_repo` (string, required, nullable) — Repository this note is pinned to, if any.
- `trigger` (string, required) — Describes when this note is automatically injected into sessions.
- `updated_at` (integer, required) — ISO 8601 timestamp of the last update.

## Errors

### 422 Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

## Types

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)

### ValidationErrorLocItems

## Examples

**Request**

```json
{
  "body": "This note outlines the best practices for API key management within the organization.",
  "name": "API Key Management Guidelines",
  "trigger": "api_key_best_practices"
}
```

**Response**

```json
{
  "access_type": "org",
  "body": "This note outlines the best practices for API key management within the organization.",
  "created_at": 1711929600,
  "folder_id": "folder_9a8b7c6d",
  "folder_path": "/Security/Best Practices",
  "is_enabled": true,
  "macro": "apply_security_tags",
  "name": "API Key Management Guidelines",
  "note_id": "note_123e4567-e89b-12d3-a456-426614174000",
  "org_id": "org_987654321",
  "pinned_repo": "devin-security-policies",
  "trigger": "api_key_best_practices",
  "updated_at": 1712016000
}
```

**SDK Code**

```python
import requests

url = "https://api.devin.ai/v3/organizations/org_id/knowledge/notes"

payload = {
    "body": "This note outlines the best practices for API key management within the organization.",
    "name": "API Key Management Guidelines",
    "trigger": "api_key_best_practices"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.devin.ai/v3/organizations/org_id/knowledge/notes';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"body":"This note outlines the best practices for API key management within the organization.","name":"API Key Management Guidelines","trigger":"api_key_best_practices"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.devin.ai/v3/organizations/org_id/knowledge/notes"

	payload := strings.NewReader("{\n  \"body\": \"This note outlines the best practices for API key management within the organization.\",\n  \"name\": \"API Key Management Guidelines\",\n  \"trigger\": \"api_key_best_practices\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.devin.ai/v3/organizations/org_id/knowledge/notes")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"body\": \"This note outlines the best practices for API key management within the organization.\",\n  \"name\": \"API Key Management Guidelines\",\n  \"trigger\": \"api_key_best_practices\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.devin.ai/v3/organizations/org_id/knowledge/notes")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"body\": \"This note outlines the best practices for API key management within the organization.\",\n  \"name\": \"API Key Management Guidelines\",\n  \"trigger\": \"api_key_best_practices\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.devin.ai/v3/organizations/org_id/knowledge/notes', [
  'body' => '{
  "body": "This note outlines the best practices for API key management within the organization.",
  "name": "API Key Management Guidelines",
  "trigger": "api_key_best_practices"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.devin.ai/v3/organizations/org_id/knowledge/notes");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"body\": \"This note outlines the best practices for API key management within the organization.\",\n  \"name\": \"API Key Management Guidelines\",\n  \"trigger\": \"api_key_best_practices\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "body": "This note outlines the best practices for API key management within the organization.",
  "name": "API Key Management Guidelines",
  "trigger": "api_key_best_practices"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.devin.ai/v3/organizations/org_id/knowledge/notes")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```