Delete a learning
curl --request DELETE \
--url https://api.coderabbit.ai/v1/learnings/{learning_id} \
--header 'x-coderabbitai-api-key: <api-key>'import requests
url = "https://api.coderabbit.ai/v1/learnings/{learning_id}"
headers = {"x-coderabbitai-api-key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'x-coderabbitai-api-key': '<api-key>'}};
fetch('https://api.coderabbit.ai/v1/learnings/{learning_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.coderabbit.ai/v1/learnings/{learning_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"x-coderabbitai-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.coderabbit.ai/v1/learnings/{learning_id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-coderabbitai-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.coderabbit.ai/v1/learnings/{learning_id}")
.header("x-coderabbitai-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coderabbit.ai/v1/learnings/{learning_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-coderabbitai-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_bodyDelete Learning
Idempotently deletes a canonical learning from PostgreSQL, the LanceDB knowledge index, and patterned-learning caches. Enterprise plan and learning:write permission required.
DELETE
/
v1
/
learnings
/
{learning_id}
Delete a learning
curl --request DELETE \
--url https://api.coderabbit.ai/v1/learnings/{learning_id} \
--header 'x-coderabbitai-api-key: <api-key>'import requests
url = "https://api.coderabbit.ai/v1/learnings/{learning_id}"
headers = {"x-coderabbitai-api-key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'x-coderabbitai-api-key': '<api-key>'}};
fetch('https://api.coderabbit.ai/v1/learnings/{learning_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.coderabbit.ai/v1/learnings/{learning_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"x-coderabbitai-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.coderabbit.ai/v1/learnings/{learning_id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-coderabbitai-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.coderabbit.ai/v1/learnings/{learning_id}")
.header("x-coderabbitai-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coderabbit.ai/v1/learnings/{learning_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-coderabbitai-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_bodyDelete Learning
Requires the
learning:write permission. Workspace API key owners must also remain workspace admins.API key eligibility
User and workspace API keys can delete Learnings. Legacy organization API keys and agentic API keys cannot use this endpoint. A workspace API key must select one organization for every request by providing that organizationās Git provider ID asorg_id.
Deletion behavior
Deletion is idempotent. CodeRabbit removes the canonical record and the vector used for review retrieval even when either is already absent, so retrying the request is safe.Rate limit
The Learnings write endpoints share a limit of 10 requests per minute per organization.Authorizations
API key for authentication. You can create an API key from the CodeRabbit dashboard.
Path Parameters
Learning ID returned by GET or POST /v1/learnings.
Query Parameters
Required for workspace API keys; the git-provider organization ID to target. Ignored for organization keys.
Response
Learning deleted or already absent.
Was this page helpful?