Replace your Plan comment text
curl --request PUT \
--url https://api.coderabbit.ai/v1/code/tasks/{task_id}/plan/comments/{comment_id} \
--header 'Content-Type: application/json' \
--header 'x-coderabbitai-api-key: <api-key>' \
--data '
{
"version": 4503599627370495,
"sha256": "<string>",
"text": "<string>",
"org_id": "<string>"
}
'import requests
url = "https://api.coderabbit.ai/v1/code/tasks/{task_id}/plan/comments/{comment_id}"
payload = {
"version": 4503599627370495,
"sha256": "<string>",
"text": "<string>",
"org_id": "<string>"
}
headers = {
"x-coderabbitai-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-coderabbitai-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
version: 4503599627370495,
sha256: '<string>',
text: '<string>',
org_id: '<string>'
})
};
fetch('https://api.coderabbit.ai/v1/code/tasks/{task_id}/plan/comments/{comment_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/code/tasks/{task_id}/plan/comments/{comment_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'version' => 4503599627370495,
'sha256' => '<string>',
'text' => '<string>',
'org_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.coderabbit.ai/v1/code/tasks/{task_id}/plan/comments/{comment_id}"
payload := strings.NewReader("{\n \"version\": 4503599627370495,\n \"sha256\": \"<string>\",\n \"text\": \"<string>\",\n \"org_id\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-coderabbitai-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.coderabbit.ai/v1/code/tasks/{task_id}/plan/comments/{comment_id}")
.header("x-coderabbitai-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"version\": 4503599627370495,\n \"sha256\": \"<string>\",\n \"text\": \"<string>\",\n \"org_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coderabbit.ai/v1/code/tasks/{task_id}/plan/comments/{comment_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-coderabbitai-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"version\": 4503599627370495,\n \"sha256\": \"<string>\",\n \"text\": \"<string>\",\n \"org_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"task_id": "<string>",
"version": 4503599627370495,
"sha256": "<string>",
"revision": 4503599627370495,
"threads": [
{
"id": "<string>",
"status": "open",
"location": {
"start_offset": 4503599627370495,
"end_offset": 4503599627370495,
"quote": "<string>"
},
"comments": [
{
"id": "<string>",
"text": "<string>",
"author": {
"user_id": "<string>",
"display_name": "<string>",
"handle": "<string>",
"avatar_url": "<string>"
},
"created_at": "<string>",
"updated_at": "<string>"
}
]
}
]
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"retry_after": 4503599627370495
}
}{
"error": {
"code": "unauthenticated",
"message": "<string>",
"retry_after": 4503599627370495
}
}{
"error": {
"code": "forbidden",
"message": "<string>",
"retry_after": 4503599627370495
}
}{
"error": {
"code": "not_found",
"message": "<string>",
"retry_after": 4503599627370495
}
}{
"error": {
"code": "head_changed",
"message": "<string>",
"retry_after": 4503599627370495
}
}{
"error": {
"code": "precondition_failed",
"message": "<string>",
"retry_after": 4503599627370495
}
}{
"error": {
"code": "payload_too_large",
"message": "<string>",
"retry_after": 4503599627370495
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "<string>",
"retry_after": 4503599627370495
}
}{
"error": {
"code": "internal_error",
"message": "<string>",
"retry_after": 4503599627370495
}
}{
"error": {
"code": "unavailable",
"message": "<string>",
"retry_after": 4503599627370495
}
}Replace your Plan comment text
Only the original author may replace a comment. Supply the complete text; existing serialized mention tokens in that text are retained, and removed tokens remove mentions. Uses the current plan version and sha256. Does not change the thread status or plan approval.
PUT
/
v1
/
code
/
tasks
/
{task_id}
/
plan
/
comments
/
{comment_id}
Replace your Plan comment text
curl --request PUT \
--url https://api.coderabbit.ai/v1/code/tasks/{task_id}/plan/comments/{comment_id} \
--header 'Content-Type: application/json' \
--header 'x-coderabbitai-api-key: <api-key>' \
--data '
{
"version": 4503599627370495,
"sha256": "<string>",
"text": "<string>",
"org_id": "<string>"
}
'import requests
url = "https://api.coderabbit.ai/v1/code/tasks/{task_id}/plan/comments/{comment_id}"
payload = {
"version": 4503599627370495,
"sha256": "<string>",
"text": "<string>",
"org_id": "<string>"
}
headers = {
"x-coderabbitai-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-coderabbitai-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
version: 4503599627370495,
sha256: '<string>',
text: '<string>',
org_id: '<string>'
})
};
fetch('https://api.coderabbit.ai/v1/code/tasks/{task_id}/plan/comments/{comment_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/code/tasks/{task_id}/plan/comments/{comment_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'version' => 4503599627370495,
'sha256' => '<string>',
'text' => '<string>',
'org_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.coderabbit.ai/v1/code/tasks/{task_id}/plan/comments/{comment_id}"
payload := strings.NewReader("{\n \"version\": 4503599627370495,\n \"sha256\": \"<string>\",\n \"text\": \"<string>\",\n \"org_id\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-coderabbitai-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.coderabbit.ai/v1/code/tasks/{task_id}/plan/comments/{comment_id}")
.header("x-coderabbitai-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"version\": 4503599627370495,\n \"sha256\": \"<string>\",\n \"text\": \"<string>\",\n \"org_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coderabbit.ai/v1/code/tasks/{task_id}/plan/comments/{comment_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-coderabbitai-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"version\": 4503599627370495,\n \"sha256\": \"<string>\",\n \"text\": \"<string>\",\n \"org_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"task_id": "<string>",
"version": 4503599627370495,
"sha256": "<string>",
"revision": 4503599627370495,
"threads": [
{
"id": "<string>",
"status": "open",
"location": {
"start_offset": 4503599627370495,
"end_offset": 4503599627370495,
"quote": "<string>"
},
"comments": [
{
"id": "<string>",
"text": "<string>",
"author": {
"user_id": "<string>",
"display_name": "<string>",
"handle": "<string>",
"avatar_url": "<string>"
},
"created_at": "<string>",
"updated_at": "<string>"
}
]
}
]
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"retry_after": 4503599627370495
}
}{
"error": {
"code": "unauthenticated",
"message": "<string>",
"retry_after": 4503599627370495
}
}{
"error": {
"code": "forbidden",
"message": "<string>",
"retry_after": 4503599627370495
}
}{
"error": {
"code": "not_found",
"message": "<string>",
"retry_after": 4503599627370495
}
}{
"error": {
"code": "head_changed",
"message": "<string>",
"retry_after": 4503599627370495
}
}{
"error": {
"code": "precondition_failed",
"message": "<string>",
"retry_after": 4503599627370495
}
}{
"error": {
"code": "payload_too_large",
"message": "<string>",
"retry_after": 4503599627370495
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "<string>",
"retry_after": 4503599627370495
}
}{
"error": {
"code": "internal_error",
"message": "<string>",
"retry_after": 4503599627370495
}
}{
"error": {
"code": "unavailable",
"message": "<string>",
"retry_after": 4503599627370495
}
}Authorizations
API key for authentication. You can create an API key from the CodeRabbit dashboard.
Path Parameters
Required string length:
1 - 200Required string length:
1 - 200Body
application/json
Was this page helpful?