Update a learning
curl --request PATCH \
--url https://api.coderabbit.ai/v1/learnings/{learning_id} \
--header 'Content-Type: application/json' \
--header 'x-coderabbitai-api-key: <api-key>' \
--data '
{
"learning": "<string>",
"org_name": "<string>",
"org_id": "<string>"
}
'import requests
url = "https://api.coderabbit.ai/v1/learnings/{learning_id}"
payload = {
"learning": "<string>",
"org_name": "<string>",
"org_id": "<string>"
}
headers = {
"x-coderabbitai-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-coderabbitai-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({learning: '<string>', org_name: '<string>', org_id: '<string>'})
};
fetch('https://api.coderabbit.ai/v1/learnings/{learning_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Update a learning
Replaces canonical learning text and refreshes its LanceDB embedding. The text is trimmed and recognized credentials are redacted before persistence and indexing. Enterprise plan and learning:write permission required.
PATCH
/
v1
/
learnings
/
{learning_id}
Update a learning
curl --request PATCH \
--url https://api.coderabbit.ai/v1/learnings/{learning_id} \
--header 'Content-Type: application/json' \
--header 'x-coderabbitai-api-key: <api-key>' \
--data '
{
"learning": "<string>",
"org_name": "<string>",
"org_id": "<string>"
}
'import requests
url = "https://api.coderabbit.ai/v1/learnings/{learning_id}"
payload = {
"learning": "<string>",
"org_name": "<string>",
"org_id": "<string>"
}
headers = {
"x-coderabbitai-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-coderabbitai-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({learning: '<string>', org_name: '<string>', org_id: '<string>'})
};
fetch('https://api.coderabbit.ai/v1/learnings/{learning_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));- CLI Tool
- MCP Server
coderabbit api request -X PATCH "/learnings/$LEARNING_ID" --input request.json
This operation isn’t a tool on the CodeRabbit MCP server. Call it over REST or from the CLI.
Authorizations
See Authentication for the key types and where to create a key.
Body
application/json
Response
Learning updated and, when shared, reindexed.
Was this page helpful?