> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://devin.ferndocs.com/api-reference/v-3/update-organizations-knowledge-notes-by-org-id-note-id/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://devin.ferndocs.com/_mcp/server. # Update an org-level note PUT https://api.devin.ai/v3/organizations/{org_id}/knowledge/notes/{note_id} Content-Type: application/json Update a note for an organization. Reference: https://devin.ferndocs.com/api-reference/v-3/update-organizations-knowledge-notes-by-org-id-note-id ## Authentication - `Authorization` header (bearer token, required) — Personal API Key (apk_user_*) or Service API Key (apk_*) ## Request ### Path parameters - `note_id` (string, required) — Knowledge note ID (prefix: note-) - `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 provides detailed guidelines on the organization's data privacy policies and compliance requirements.", "name": "Data Privacy Guidelines", "trigger": "data privacy" } ``` **Response** ```json { "access_type": "enterprise", "body": "This note provides detailed guidelines on the organization's data privacy policies and compliance requirements.", "created_at": 1685606400, "folder_id": "folder-789xyz", "folder_path": "/Compliance/Policies", "is_enabled": true, "macro": "apply_data_privacy_template", "name": "Data Privacy Guidelines", "note_id": "note-abc123def456", "org_id": "org-456def789ghi", "pinned_repo": "compliance-docs", "trigger": "data privacy", "updated_at": 1688294400 } ``` **SDK Code** ```python import requests url = "https://api.devin.ai/v3/organizations/org_id/knowledge/notes/note-abc123def456" payload = { "body": "This note provides detailed guidelines on the organization's data privacy policies and compliance requirements.", "name": "Data Privacy Guidelines", "trigger": "data privacy" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.put(url, json=payload, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.devin.ai/v3/organizations/org_id/knowledge/notes/note-abc123def456'; const options = { method: 'PUT', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: '{"body":"This note provides detailed guidelines on the organization\'s data privacy policies and compliance requirements.","name":"Data Privacy Guidelines","trigger":"data privacy"}' }; 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/note-abc123def456" payload := strings.NewReader("{\n \"body\": \"This note provides detailed guidelines on the organization's data privacy policies and compliance requirements.\",\n \"name\": \"Data Privacy Guidelines\",\n \"trigger\": \"data privacy\"\n}") req, _ := http.NewRequest("PUT", url, payload) req.Header.Add("Authorization", "Bearer ") 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/note-abc123def456") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Put.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"body\": \"This note provides detailed guidelines on the organization's data privacy policies and compliance requirements.\",\n \"name\": \"Data Privacy Guidelines\",\n \"trigger\": \"data privacy\"\n}" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.put("https://api.devin.ai/v3/organizations/org_id/knowledge/notes/note-abc123def456") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"body\": \"This note provides detailed guidelines on the organization's data privacy policies and compliance requirements.\",\n \"name\": \"Data Privacy Guidelines\",\n \"trigger\": \"data privacy\"\n}") .asString(); ``` ```php request('PUT', 'https://api.devin.ai/v3/organizations/org_id/knowledge/notes/note-abc123def456', [ 'body' => '{ "body": "This note provides detailed guidelines on the organization\'s data privacy policies and compliance requirements.", "name": "Data Privacy Guidelines", "trigger": "data privacy" }', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.devin.ai/v3/organizations/org_id/knowledge/notes/note-abc123def456"); var request = new RestRequest(Method.PUT); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"body\": \"This note provides detailed guidelines on the organization's data privacy policies and compliance requirements.\",\n \"name\": \"Data Privacy Guidelines\",\n \"trigger\": \"data privacy\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [ "body": "This note provides detailed guidelines on the organization's data privacy policies and compliance requirements.", "name": "Data Privacy Guidelines", "trigger": "data privacy" ] 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/note-abc123def456")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "PUT" 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() ```