Zoho Projects API Documentation
Text copied
File not found

Record Comments

Get All Comments

Retrieve all comments for a record. Use this API to view comments with pagination and sorting support.

GET

/api/v3/portal/[PORTAL_ID]/module/[MODULE_ID]/entity/[ENTITY_ID]/comments

OAuth Scope:

ZohoProjects.custom_fields.READ

Path Parameters

Param Name
Data Type
Description

Query Parameters

Param Name
Data Type
Description

Request Example

Request Example
  • cURL
  • Deluge
  • Node.js
  • Ruby
  • PHP
  • Python
  • C
  • C#
  • C++
  • Clojure
  • Go
  • HTTP
  • Java
  • JS Fetch
  • JSON
  • Kotlin
  • Objective-C
  • OCaml
  • PowerShell
  • R
  • Swift

curl -X GET \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments?page=1&per_page=10&sort_by=ASC%28last_modified_time%29' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'

url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments";
params = Map();
params.put("page", 1);
params.put("per_page", 10);
params.put("sort_by", "ASC(last_modified_time)");
response = invokeUrl
[
    url: url
    type: GET
    parameters: params
    connection: "projects"
];
info response;
const https = require('https');
const url = new URL('https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments');
url.searchParams.append('page', '1');
url.searchParams.append('per_page', '10');
url.searchParams.append('sort_by', 'ASC(last_modified_time)');

const options = {
  hostname: url.hostname,
  path: url.pathname + url.search,
  method: 'GET',
  headers: {
    'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
  }
};

const req = https.request(options, (res) => {
  let data = '';
  res.on('data', (chunk) => { data += chunk; });
  res.on('end', () => { console.log(JSON.parse(data)); });
});

req.on('error', (err) => { console.error(err); });
req.end();
require 'net/http'
require 'uri'
require 'json'

url = URI("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments")
params = {
  "page" => "1",
  "per_page" => "10",
  "sort_by" => "ASC(last_modified_time)"
}
url.query = URI.encode_www_form(params)

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"

response = http.request(request)
puts response.read_body
<?php
$params = [
    'page' => '1',
    'per_page' => '10',
    'sort_by' => 'ASC(last_modified_time)',
];
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments" . "?" . http_build_query($params);

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => $url,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
  ],
]);

$response = curl_exec($curl);
curl_close($curl);

echo $response;
import requests

url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments"

params = {
    "page": "1",
    "per_page": "10",
    "sort_by": "ASC(last_modified_time)"
}

headers = {
    "Authorization": "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa",
}

response = requests.get(url, headers=headers, params=params)

print(response.json())
#include <stdio.h>
#include <string.h>
#include <curl/curl.h>

int main(void) {
    CURL *curl = curl_easy_init();
    if (curl) {
        char *enc_page = curl_easy_escape(curl, "1", 0);
        char *enc_per_page = curl_easy_escape(curl, "10", 0);
        char *enc_sort_by = curl_easy_escape(curl, "ASC(last_modified_time)", 0);
        char url[2048];
        snprintf(url, sizeof(url), "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments?page=%s&per_page=%s&sort_by=%s", enc_page, enc_per_page, enc_sort_by);

        struct curl_slist *headers = NULL;
        headers = curl_slist_append(headers, "Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");

        curl_easy_setopt(curl, CURLOPT_URL, url);
        curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
        curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "GET");

        CURLcode res = curl_easy_perform(curl);
        if (res != CURLE_OK)
            fprintf(stderr, "curl failed: %s\n", curl_easy_strerror(res));

        curl_free(enc_page);
        curl_free(enc_per_page);
        curl_free(enc_sort_by);
        curl_slist_free_all(headers);
        curl_easy_cleanup(curl);
    }
    return 0;
}
using System.Net.Http;
using System.Text;
using System.Web;

var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");

var query = HttpUtility.ParseQueryString(string.Empty);
query["page"] = "1";
query["per_page"] = "10";
query["sort_by"] = "ASC(last_modified_time)";
var uriBuilder = new UriBuilder("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments") { Query = query.ToString() };
var request = new HttpRequestMessage(HttpMethod.Get, uriBuilder.Uri);

var response = await client.SendAsync(request);
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
#include <iostream>
#include <string>
#include <curl/curl.h>

static size_t WriteCallback(void* contents, size_t size, size_t nmemb, std::string* output) {
    output->append((char*)contents, size * nmemb);
    return size * nmemb;
}

int main() {
    CURL* curl = curl_easy_init();
    if (curl) {
        std::string response;
        char* enc_page = curl_easy_escape(curl, "1", 0);
        char* enc_per_page = curl_easy_escape(curl, "10", 0);
        char* enc_sort_by = curl_easy_escape(curl, "ASC(last_modified_time)", 0);
        std::string url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments";
        url += "?page=" + std::string(enc_page);
        url += "&per_page=" + std::string(enc_per_page);
        url += "&sort_by=" + std::string(enc_sort_by);

        struct curl_slist* headers = NULL;
        headers = curl_slist_append(headers, "Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");

        curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
        curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
        curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "GET");
        curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
        curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response);

        CURLcode res = curl_easy_perform(curl);
        if (res == CURLE_OK)
            std::cout << response << std::endl;
        else
            std::cerr << curl_easy_strerror(res) << std::endl;

        curl_free(enc_page);
        curl_free(enc_per_page);
        curl_free(enc_sort_by);
        curl_slist_free_all(headers);
        curl_easy_cleanup(curl);
    }
    return 0;
}
(require '[clj-http.client :as client])

(let [enc-page (java.net.URLEncoder/encode "1" "UTF-8")
      enc-per_page (java.net.URLEncoder/encode "10" "UTF-8")
      enc-sort_by (java.net.URLEncoder/encode "ASC(last_modified_time)" "UTF-8")
      url (str "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments" "?page=" enc-page "&per_page=" enc-per_page "&sort_by=" enc-sort_by)]
(def response
  (client/get url
    {:headers {"Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"}
     :as :json}))

(println (:body response))
package main

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

func main() {
    req, _ := http.NewRequest("GET", "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments", nil)
    q := req.URL.Query()
    q.Add("page", "1")
    q.Add("per_page", "10")
    q.Add("sort_by", "ASC(last_modified_time)")
    req.URL.RawQuery = q.Encode()
    req.Header.Add("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")

    resp, _ := http.DefaultClient.Do(req)
    defer resp.Body.Close()
    body, _ := io.ReadAll(resp.Body)
    fmt.Println(string(body))
}
GET https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments?page=1&per_page=10&sort_by=ASC%28last_modified_time%29 HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments?page=1&per_page=10&sort_by=ASC%28last_modified_time%29
Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa
HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();

SSLContext sslContext = SSLContext.getDefault();
SSLConnectionSocketFactory sslConnectionSocketFactory = new SSLConnectionSocketFactory(sslContext, NoopHostnameVerifier.INSTANCE);
CloseableHttpClient httpclient = httpClientBuilder.setSSLSocketFactory(sslConnectionSocketFactory).build();

URIBuilder uriBuilder = new URIBuilder("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments");
uriBuilder.addParameter("page", "1");
uriBuilder.addParameter("per_page", "10");
uriBuilder.addParameter("sort_by", "ASC(last_modified_time)");
HttpUriRequest requestObj = new HttpGet(uriBuilder.build());
requestObj.addHeader("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");

HttpResponse response = httpclient.execute(requestObj);

HttpEntity responseEntity = response.getEntity();
Object responseObject = EntityUtils.toString(responseEntity);
String responseString = responseObject.toString();
const url = 'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments';

const params = new URLSearchParams({
  'page': '1',
  'per_page': '10',
  'sort_by': 'ASC(last_modified_time)'
});

const options = {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
  }
};

fetch(url + '?' + params.toString(), options)
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error(error));
page = 1
per_page = 10
sort_by = "ASC(last_modified_time)"
import java.net.HttpURLConnection
import java.net.URL
import okhttp3.HttpUrl.Companion.toHttpUrl

fun main() {
    val urlBuilder = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments".toHttpUrl().newBuilder()
    urlBuilder.addQueryParameter("page", "1")
    urlBuilder.addQueryParameter("per_page", "10")
    urlBuilder.addQueryParameter("sort_by", "ASC(last_modified_time)")
    val url = URL(urlBuilder.build().toString())
    val conn = url.openConnection() as HttpURLConnection
    conn.requestMethod = "GET"
    conn.setRequestProperty("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")

    val response = conn.inputStream.bufferedReader().readText()
    println(response)
}
NSString *encodedPage = [@"1" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *encodedPer_page = [@"10" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *encodedSort_by = [@"ASC(last_modified_time)" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *urlString = [NSString stringWithFormat:@"https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments?page=%@&per_page=%@&sort_by=%@", encodedPage, encodedPer_page, encodedSort_by];
NSURL *url = [NSURL URLWithString:urlString];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
[request setHTTPMethod:@"GET"];
[request setValue:@"Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa" forHTTPHeaderField:@"Authorization"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *task = [session dataTaskWithRequest:request
    completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
        NSString *result = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
        NSLog(@"%@", result);
}];
[task resume];
open Lwt
open Cohttp_lwt_unix

let () =
  let enc_page = Uri.pct_encode "1" in
  let enc_per_page = Uri.pct_encode "10" in
  let enc_sort_by = Uri.pct_encode "ASC(last_modified_time)" in
  let uri = Uri.of_string ("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments" ^ "?page=" ^ enc_page ^ "&per_page=" ^ enc_per_page ^ "&sort_by=" ^ enc_sort_by) in
  let headers = Cohttp.Header.init ()
    |> fun h -> Cohttp.Header.add h "Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
  in
  Lwt_main.run (
    Client.get ~headers uri >>= fun (_, body) ->
    Cohttp_lwt.Body.to_string body >|= fun s ->
    print_endline s)
$headers = @{
    "Authorization" = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
}

$params = @{
    page = "1"
    per_page = "10"
    sort_by = "ASC(last_modified_time)"
}
$queryString = ($params.GetEnumerator() | ForEach-Object { "$($_.Key)=$([System.Uri]::EscapeDataString($_.Value))" }) -join "&"
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments" + "?" + $queryString

$response = Invoke-RestMethod -Uri $url -Method GET -Headers $headers

$response | ConvertTo-Json
library(httr)

url <- "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments"

params <- list(
  page = "1",
  per_page = "10",
  sort_by = "ASC(last_modified_time)"
)

response <- GET(
  url,
  add_headers(Authorization = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"),
  query = params
)

content(response, "text")
import Foundation

var components = URLComponents(string: "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments")!
components.queryItems = [
    URLQueryItem(name: "page", value: "1"),
    URLQueryItem(name: "per_page", value: "10"),
    URLQueryItem(name: "sort_by", value: "ASC(last_modified_time)")
]
let url = components.url!
var request = URLRequest(url: url)
request.httpMethod = "GET"
request.setValue("Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa", forHTTPHeaderField: "Authorization")

let semaphore = DispatchSemaphore(value: 0)
let task = URLSession.shared.dataTask(with: request) { data, response, error in
    if let data = data, let result = String(data: data, encoding: .utf8) {
        print(result)
    }
    semaphore.signal()
}
task.resume()
semaphore.wait()

Sample Input

page : 1 per_page : 10 sort_by : "ASC(last_modified_time)"

Sample Response

200{ "comments" : [ { "id" : "108250000001866007", "content" : "first comment", "created_by" : { "id" : "67336035", "zpuid" : "108250000000051003", "name" : "Ross Davis", "email" : "ross.davis@zylker.com", "is_client_user" : false, "first_name" : "Ross", "last_name" : "Davis", "full_name" : "Ross Davis", "business_hours_id" : "108250000001657017" }, "attachments" : [ { "attachment_id" : "108250000001866029", "name" : "Image 679x679 04-01-2026 20:50:50:900.jpg", "type" : "image/jpeg", "size" : "18236", "third_party_file_id" : "k58sx8a7bc1c8b21945fea00fe125de5f643a", "entity_id" : "108250000001866007", "entity_type" : "custom_module_comment", "app_domain" : "workdrive", "app_id" : "1", "app_name" : "", "created_by" : "67336035", "created_time" : "1767540051974", "associated_by" : "67336035", "associated_by_name" : "Reece Turner", "associated_time_long" : "1767540053894", "preview_url" : "https://previewengine.zoho.com/thumbnail/WD/k58sx8a7bc1c8b21945fea00fe125de5f643a?x-cli-msg=eyJtb2R1bGUiOiJyaXNrIiwiZW50aXR5X2lkIjoiLTFfMTA4MjUwMDAwMDAxODY2MDA3In0&size=l", "download_url" : "https://download.zoho.com/v1/workdrive/download/k58sx8a7bc1c8b21945fea00fe125de5f643a?x-cli-msg=%7B%22module%22%3A%22risk%22%2C%22entity_id%22%3A%22-1_108250000001866007%22%7D", "permanent_url" : "https://workdrive.zoho.com/file/k58sx8a7bc1c8b21945fea00fe125de5f643a?authId=%7B%22module%22%3A%22risk%22%2C%22entity_id%22%3A%22-1_108250000001866007%22%7D", "uploadedZpuid" : "108250000000051003", "parentFolderId" : "la6u1ca30e51816c944c8892d1cb9bd377398", "trashed" : false } ], "created_time" : "2026-01-04T15:10:17.174Z", "updated_time" : "2026-01-04T15:10:17.174Z", "updatedBy" : { "id" : "67336035", "zpuid" : "108250000000051003", "name" : "Marcus", "email" : "marcus.reed@zylker.com", "is_client_user" : false, "first_name" : "Marcus", "last_name" : "Reed", "full_name" : "Marcus Reed", "business_hours_id" : "108250000001657017" }, "deletedTime" : "1969-12-31T23:59:59.999Z", "commentId" : "108250000001866007" }, { "id" : "108250000001866013", "content" : "second comment", "created_by" : { "id" : "67336035", "zpuid" : "108250000000051003", "name" : "Marcus", "email" : "marcus.reed@zylker.com", "is_client_user" : false, "first_name" : "Marcus", "last_name" : "Reed", "full_name" : "Marcus Reed", "business_hours_id" : "108250000001657017" }, "attachments" : [ ], "created_time" : "2026-01-04T15:10:22.597Z", "updated_time" : "2026-01-04T15:10:22.597Z", "updatedBy" : { "id" : "67336035", "zpuid" : "108250000000051003", "name" : "Reece", "email" : "reece.turner@zylker.com", "is_client_user" : false, "first_name" : "reece", "last_name" : "Turner", "full_name" : "Reece Turner", "business_hours_id" : "108250000001657017" }, "deletedTime" : "1969-12-31T23:59:59.999Z", "commentId" : "108250000001866013" } ], "pageInfo" : { "per_page" : "100", "has_next_page" : false, "count" : "2", "page" : "1" } }

Get Comment Detail

Retrieve the details of a specific comment from a record. Use this API to fetch a single comment using its ID.

GET

/api/v3/portal/[PORTAL_ID]/module/[MODULE_ID]/entity/[ENTITY_ID]/comments/[COMMENT_ID]

OAuth Scope:

ZohoProjects.custom_fields.READ

Path Parameters

Param Name
Data Type
Description

Request Example

Request Example
  • cURL
  • Deluge
  • Node.js
  • Ruby
  • PHP
  • Python
  • C
  • C#
  • C++
  • Clojure
  • Go
  • HTTP
  • Java
  • JS Fetch
  • Kotlin
  • Objective-C
  • OCaml
  • PowerShell
  • R
  • Swift

curl -X GET \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'

url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]";
response = invokeUrl
[
    url: url
    type: GET
    connection: "projects"
];
info response;
const https = require('https');
const url = new URL('https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]');

const options = {
  hostname: url.hostname,
  path: url.pathname + url.search,
  method: 'GET',
  headers: {
    'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
  }
};

const req = https.request(options, (res) => {
  let data = '';
  res.on('data', (chunk) => { data += chunk; });
  res.on('end', () => { console.log(JSON.parse(data)); });
});

req.on('error', (err) => { console.error(err); });
req.end();
require 'net/http'
require 'uri'
require 'json'

url = URI("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"

response = http.request(request)
puts response.read_body
<?php
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]";

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => $url,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
  ],
]);

$response = curl_exec($curl);
curl_close($curl);

echo $response;
import requests

url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]"

headers = {
    "Authorization": "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa",
}

response = requests.get(url, headers=headers)

print(response.json())
#include <stdio.h>
#include <string.h>
#include <curl/curl.h>

int main(void) {
    CURL *curl = curl_easy_init();
    if (curl) {
        struct curl_slist *headers = NULL;
        headers = curl_slist_append(headers, "Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");

        curl_easy_setopt(curl, CURLOPT_URL, "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]");
        curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
        curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "GET");

        CURLcode res = curl_easy_perform(curl);
        if (res != CURLE_OK)
            fprintf(stderr, "curl failed: %s\n", curl_easy_strerror(res));

        curl_slist_free_all(headers);
        curl_easy_cleanup(curl);
    }
    return 0;
}
using System.Net.Http;
using System.Text;
using System.Web;

var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");

var request = new HttpRequestMessage(HttpMethod.Get, "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]");

var response = await client.SendAsync(request);
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
#include <iostream>
#include <string>
#include <curl/curl.h>

static size_t WriteCallback(void* contents, size_t size, size_t nmemb, std::string* output) {
    output->append((char*)contents, size * nmemb);
    return size * nmemb;
}

int main() {
    CURL* curl = curl_easy_init();
    if (curl) {
        std::string response;
        struct curl_slist* headers = NULL;
        headers = curl_slist_append(headers, "Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");

        curl_easy_setopt(curl, CURLOPT_URL, "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]");
        curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
        curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "GET");
        curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
        curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response);

        CURLcode res = curl_easy_perform(curl);
        if (res == CURLE_OK)
            std::cout << response << std::endl;
        else
            std::cerr << curl_easy_strerror(res) << std::endl;

        curl_slist_free_all(headers);
        curl_easy_cleanup(curl);
    }
    return 0;
}
(require '[clj-http.client :as client])

(def response
  (client/get "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]"
    {:headers {"Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"}
     :as :json}))

(println (:body response))
package main

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

func main() {
    req, _ := http.NewRequest("GET", "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]", nil)
    req.Header.Add("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")

    resp, _ := http.DefaultClient.Do(req)
    defer resp.Body.Close()
    body, _ := io.ReadAll(resp.Body)
    fmt.Println(string(body))
}
GET https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID] HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]
Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa
HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();

SSLContext sslContext = SSLContext.getDefault();
SSLConnectionSocketFactory sslConnectionSocketFactory = new SSLConnectionSocketFactory(sslContext, NoopHostnameVerifier.INSTANCE);
CloseableHttpClient httpclient = httpClientBuilder.setSSLSocketFactory(sslConnectionSocketFactory).build();

URIBuilder uriBuilder = new URIBuilder("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]");
HttpUriRequest requestObj = new HttpGet(uriBuilder.build());
requestObj.addHeader("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");

HttpResponse response = httpclient.execute(requestObj);

HttpEntity responseEntity = response.getEntity();
Object responseObject = EntityUtils.toString(responseEntity);
String responseString = responseObject.toString();
const url = 'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]';

const options = {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
  }
};

fetch(url, options)
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error(error));
import java.net.HttpURLConnection
import java.net.URL
import okhttp3.HttpUrl.Companion.toHttpUrl

fun main() {
    val url = URL("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]")
    val conn = url.openConnection() as HttpURLConnection
    conn.requestMethod = "GET"
    conn.setRequestProperty("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")

    val response = conn.inputStream.bufferedReader().readText()
    println(response)
}
NSURL *url = [NSURL URLWithString:@"https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]"];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
[request setHTTPMethod:@"GET"];
[request setValue:@"Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa" forHTTPHeaderField:@"Authorization"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *task = [session dataTaskWithRequest:request
    completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
        NSString *result = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
        NSLog(@"%@", result);
}];
[task resume];
open Lwt
open Cohttp_lwt_unix

let () =
  let uri = Uri.of_string "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]" in
  let headers = Cohttp.Header.init ()
    |> fun h -> Cohttp.Header.add h "Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
  in
  Lwt_main.run (
    Client.get ~headers uri >>= fun (_, body) ->
    Cohttp_lwt.Body.to_string body >|= fun s ->
    print_endline s)
$headers = @{
    "Authorization" = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
}

$response = Invoke-RestMethod -Uri "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]" -Method GET -Headers $headers

$response | ConvertTo-Json
library(httr)

url <- "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]"

response <- GET(
  url,
  add_headers(Authorization = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")
)

content(response, "text")
import Foundation

let url = URL(string: "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]")!
var request = URLRequest(url: url)
request.httpMethod = "GET"
request.setValue("Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa", forHTTPHeaderField: "Authorization")

let semaphore = DispatchSemaphore(value: 0)
let task = URLSession.shared.dataTask(with: request) { data, response, error in
    if let data = data, let result = String(data: data, encoding: .utf8) {
        print(result)
    }
    semaphore.signal()
}
task.resume()
semaphore.wait()

Sample Response

200{ "id" : "7000000115191", "content" : "sampel comment 2", "created_by" : { "id" : "25450833", "zpuid" : "7000000002411", "name" : "Reece", "email" : "reece.turner@zylker.com", "is_client_user" : false, "first_name" : "Reece", "last_name" : "Turner", "full_name" : "Reece Turner" }, "attachments" : [ ], "created_time" : "2025-02-26T09:13:04.592Z", "updated_time" : "2025-02-26T09:14:05.464Z", "updatedBy" : { "id" : "25450833", "zpuid" : "7000000002411", "name" : "Reece", "email" : "reece.turner@zylker.com", "is_client_user" : false, "first_name" : "Reece", "last_name" : "Turner", "full_name" : "Reece Turner" }, "deletedTime" : "1969-12-31T23:59:59.999Z", "commentId" : "7000000115191" }

Add Comment

Add a comment to a record. Use this API to post a new comment, with optional attachments.

POST

/api/v3/portal/[PORTAL_ID]/module/[MODULE_ID]/entity/[ENTITY_ID]/comments

OAuth Scope:

ZohoProjects.custom_fields.CREATE

Path Parameters

Param Name
Data Type
Description

Body Parameters

Param Name
Data Type
Description

Request Example

Request Example
  • cURL
  • Deluge
  • Node.js
  • Ruby
  • PHP
  • Python
  • C
  • C#
  • C++
  • Clojure
  • Go
  • HTTP
  • Java
  • JS Fetch
  • JSON
  • Kotlin
  • Objective-C
  • OCaml
  • PowerShell
  • R
  • Swift

curl -X POST \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa' \
-H 'Content-Type: application/json' \
-d '{"content":"Sample content","attachments":[{"add":[{"attachment_id":"40000000987652"}],"remove":[{"attachment_id":"40000000987652"}],"attachment_id":"40000000987652"}],"thirdparty_id":["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]}'

url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments";
params = Map();
params.put("content", "Sample content");
params.put("attachments", [{"add":[{"attachment_id":"40000000987652"}],"remove":[{"attachment_id":"40000000987652"}],"attachment_id":"40000000987652"}]);
params.put("thirdparty_id", ["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]);
response = invokeUrl
[
    url: url
    type: POST
    parameters: params.toString()
    connection: "projects"
];
info response;
const https = require('https');
const url = new URL('https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments');

const payload = JSON.stringify({"content":"Sample content","attachments":[{"add":[{"attachment_id":"40000000987652"}],"remove":[{"attachment_id":"40000000987652"}],"attachment_id":"40000000987652"}],"thirdparty_id":["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]});

const options = {
  hostname: url.hostname,
  path: url.pathname + url.search,
  method: 'POST',
  headers: {
    'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa',
    'Content-Type': 'application/json',
    'Content-Length': Buffer.byteLength(payload)
  }
};

const req = https.request(options, (res) => {
  let data = '';
  res.on('data', (chunk) => { data += chunk; });
  res.on('end', () => { console.log(JSON.parse(data)); });
});

req.on('error', (err) => { console.error(err); });
req.write(payload);
req.end();
require 'net/http'
require 'uri'
require 'json'

url = URI("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
request["Content-Type"] = "application/json"
request.body = '{"content":"Sample content","attachments":[{"add":[{"attachment_id":"40000000987652"}],"remove":[{"attachment_id":"40000000987652"}],"attachment_id":"40000000987652"}],"thirdparty_id":["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]}'

response = http.request(request)
puts response.read_body
<?php
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments";

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => $url,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => '{"content":"Sample content","attachments":[{"add":[{"attachment_id":"40000000987652"}],"remove":[{"attachment_id":"40000000987652"}],"attachment_id":"40000000987652"}],"thirdparty_id":["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]}',
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa",
    "Content-Type: application/json"
  ],
]);

$response = curl_exec($curl);
curl_close($curl);

echo $response;
import requests

url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments"

headers = {
    "Authorization": "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa",
    "Content-Type": "application/json",
}

payload = '{"content":"Sample content","attachments":[{"add":[{"attachment_id":"40000000987652"}],"remove":[{"attachment_id":"40000000987652"}],"attachment_id":"40000000987652"}],"thirdparty_id":["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]}'

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

print(response.json())
#include <stdio.h>
#include <string.h>
#include <curl/curl.h>

int main(void) {
    CURL *curl = curl_easy_init();
    if (curl) {
        struct curl_slist *headers = NULL;
        headers = curl_slist_append(headers, "Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
        headers = curl_slist_append(headers, "Content-Type: application/json");

        curl_easy_setopt(curl, CURLOPT_URL, "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments");
        curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
        curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
        curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "{\"content\":\"Sample content\",\"attachments\":[{\"add\":[{\"attachment_id\":\"40000000987652\"}],\"remove\":[{\"attachment_id\":\"40000000987652\"}],\"attachment_id\":\"40000000987652\"}],\"thirdparty_id\":[\"a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0\"]}");

        CURLcode res = curl_easy_perform(curl);
        if (res != CURLE_OK)
            fprintf(stderr, "curl failed: %s\n", curl_easy_strerror(res));

        curl_slist_free_all(headers);
        curl_easy_cleanup(curl);
    }
    return 0;
}
using System.Net.Http;
using System.Text;
using System.Web;

var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");

var request = new HttpRequestMessage(HttpMethod.Post, "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments");
request.Content = new StringContent(
    @"{""content"":""Sample content"",""attachments"":[{""add"":[{""attachment_id"":""40000000987652""}],""remove"":[{""attachment_id"":""40000000987652""}],""attachment_id"":""40000000987652""}],""thirdparty_id"":[""a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0""]}",
    Encoding.UTF8,
    "application/json"
);

var response = await client.SendAsync(request);
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
#include <iostream>
#include <string>
#include <curl/curl.h>

static size_t WriteCallback(void* contents, size_t size, size_t nmemb, std::string* output) {
    output->append((char*)contents, size * nmemb);
    return size * nmemb;
}

int main() {
    CURL* curl = curl_easy_init();
    if (curl) {
        std::string response;
        struct curl_slist* headers = NULL;
        headers = curl_slist_append(headers, "Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
        headers = curl_slist_append(headers, "Content-Type: application/json");

        curl_easy_setopt(curl, CURLOPT_URL, "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments");
        curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
        curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
        curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
        curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response);
        curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "{\"content\":\"Sample content\",\"attachments\":[{\"add\":[{\"attachment_id\":\"40000000987652\"}],\"remove\":[{\"attachment_id\":\"40000000987652\"}],\"attachment_id\":\"40000000987652\"}],\"thirdparty_id\":[\"a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0\"]}");

        CURLcode res = curl_easy_perform(curl);
        if (res == CURLE_OK)
            std::cout << response << std::endl;
        else
            std::cerr << curl_easy_strerror(res) << std::endl;

        curl_slist_free_all(headers);
        curl_easy_cleanup(curl);
    }
    return 0;
}
(require '[clj-http.client :as client])

(def response
  (client/post "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments"
    {:headers {"Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
                "Content-Type" "application/json"}
     :body "{\"content\":\"Sample content\",\"attachments\":[{\"add\":[{\"attachment_id\":\"40000000987652\"}],\"remove\":[{\"attachment_id\":\"40000000987652\"}],\"attachment_id\":\"40000000987652\"}],\"thirdparty_id\":[\"a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0\"]}"
     :as :json}))

(println (:body response))
package main

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

func main() {
    payload := strings.NewReader("{\"content\":\"Sample content\",\"attachments\":[{\"add\":[{\"attachment_id\":\"40000000987652\"}],\"remove\":[{\"attachment_id\":\"40000000987652\"}],\"attachment_id\":\"40000000987652\"}],\"thirdparty_id\":[\"a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0\"]}")
    req, _ := http.NewRequest("POST", "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments", payload)
    req.Header.Add("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")
    req.Header.Add("Content-Type", "application/json")

    resp, _ := http.DefaultClient.Do(req)
    defer resp.Body.Close()
    body, _ := io.ReadAll(resp.Body)
    fmt.Println(string(body))
}
POST https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments
Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa
Content-Type: application/json

{"content":"Sample content","attachments":[{"add":[{"attachment_id":"40000000987652"}],"remove":[{"attachment_id":"40000000987652"}],"attachment_id":"40000000987652"}],"thirdparty_id":["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]}
HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();

SSLContext sslContext = SSLContext.getDefault();
SSLConnectionSocketFactory sslConnectionSocketFactory = new SSLConnectionSocketFactory(sslContext, NoopHostnameVerifier.INSTANCE);
CloseableHttpClient httpclient = httpClientBuilder.setSSLSocketFactory(sslConnectionSocketFactory).build();

URIBuilder uriBuilder = new URIBuilder("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments");
HttpUriRequest requestObj = new HttpPost(uriBuilder.build());
requestObj.addHeader("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");

HttpEntityEnclosingRequestBase requestBase = (HttpEntityEnclosingRequestBase) requestObj;
String requestBody = "{\"content\":\"Sample content\",\"attachments\":[{\"add\":[{\"attachment_id\":\"40000000987652\"}],\"remove\":[{\"attachment_id\":\"40000000987652\"}],\"attachment_id\":\"40000000987652\"}],\"thirdparty_id\":[\"a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0\"]}";
requestBase.setEntity(new StringEntity(requestBody, HTTP.UTF_8));

HttpResponse response = httpclient.execute(requestObj);

HttpEntity responseEntity = response.getEntity();
Object responseObject = EntityUtils.toString(responseEntity);
String responseString = responseObject.toString();
const url = 'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments';

const options = {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({"content":"Sample content","attachments":[{"add":[{"attachment_id":"40000000987652"}],"remove":[{"attachment_id":"40000000987652"}],"attachment_id":"40000000987652"}],"thirdparty_id":["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]})
};

fetch(url, options)
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error(error));
{"content":"Sample content","attachments":[{"add":[{"attachment_id":"40000000987652"}],"remove":[{"attachment_id":"40000000987652"}],"attachment_id":"40000000987652"}],"thirdparty_id":["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]}
import java.net.HttpURLConnection
import java.net.URL
import okhttp3.HttpUrl.Companion.toHttpUrl

fun main() {
    val url = URL("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments")
    val conn = url.openConnection() as HttpURLConnection
    conn.requestMethod = "POST"
    conn.setRequestProperty("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")
    conn.setRequestProperty("Content-Type", "application/json")
    conn.doOutput = true
    conn.outputStream.bufferedWriter().use { it.write("""{"content":"Sample content","attachments":[{"add":[{"attachment_id":"40000000987652"}],"remove":[{"attachment_id":"40000000987652"}],"attachment_id":"40000000987652"}],"thirdparty_id":["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]}""") }

    val response = conn.inputStream.bufferedReader().readText()
    println(response)
}
NSURL *url = [NSURL URLWithString:@"https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments"];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
[request setHTTPMethod:@"POST"];
[request setValue:@"Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa" forHTTPHeaderField:@"Authorization"];
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
NSData *body = [@"{\"content\":\"Sample content\",\"attachments\":[{\"add\":[{\"attachment_id\":\"40000000987652\"}],\"remove\":[{\"attachment_id\":\"40000000987652\"}],\"attachment_id\":\"40000000987652\"}],\"thirdparty_id\":[\"a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0\"]}" dataUsingEncoding:NSUTF8StringEncoding];
[request setHTTPBody:body];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *task = [session dataTaskWithRequest:request
    completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
        NSString *result = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
        NSLog(@"%@", result);
}];
[task resume];
open Lwt
open Cohttp_lwt_unix

let () =
  let uri = Uri.of_string "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments" in
  let headers = Cohttp.Header.init ()
    |> fun h -> Cohttp.Header.add h "Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
    |> fun h -> Cohttp.Header.add h "Content-Type" "application/json"
  in
  let body = Cohttp_lwt.Body.of_string {json|{"content":"Sample content","attachments":[{"add":[{"attachment_id":"40000000987652"}],"remove":[{"attachment_id":"40000000987652"}],"attachment_id":"40000000987652"}],"thirdparty_id":["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]}|json} in
  Lwt_main.run (
    Client.post ~headers ~body uri >>= fun (_, body) ->
    Cohttp_lwt.Body.to_string body >|= fun s ->
    print_endline s)
$headers = @{
    "Authorization" = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
    "Content-Type" = "application/json"
}

$body = @'
{"content":"Sample content","attachments":[{"add":[{"attachment_id":"40000000987652"}],"remove":[{"attachment_id":"40000000987652"}],"attachment_id":"40000000987652"}],"thirdparty_id":["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]}
'@

$response = Invoke-RestMethod -Uri "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments" -Method POST -Headers $headers -Body $body

$response | ConvertTo-Json
library(httr)

url <- "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments"

response <- POST(
  url,
  add_headers(Authorization = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"),
  content_type_json(),
  body = "{\"content\":\"Sample content\",\"attachments\":[{\"add\":[{\"attachment_id\":\"40000000987652\"}],\"remove\":[{\"attachment_id\":\"40000000987652\"}],\"attachment_id\":\"40000000987652\"}],\"thirdparty_id\":[\"a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0\"]}"
)

content(response, "text")
import Foundation

let url = URL(string: "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.setValue("Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa", forHTTPHeaderField: "Authorization")
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
request.httpBody = """
{"content":"Sample content","attachments":[{"add":[{"attachment_id":"40000000987652"}],"remove":[{"attachment_id":"40000000987652"}],"attachment_id":"40000000987652"}],"thirdparty_id":["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]}
""".data(using: .utf8)

let semaphore = DispatchSemaphore(value: 0)
let task = URLSession.shared.dataTask(with: request) { data, response, error in
    if let data = data, let result = String(data: data, encoding: .utf8) {
        print(result)
    }
    semaphore.signal()
}
task.resume()
semaphore.wait()

Sample Input

Content-Type: application/json
{ "content" : "Sample content", "attachments" : [ { "add" : [ { "attachment_id" : "40000000987652" } ], "remove" : [ { "attachment_id" : "40000000987652" } ], "attachment_id" : "40000000987652" } ], "thirdparty_id" : [ "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0" ] }

Sample Response

200{ "id" : "7000000115191", "content" : "<div>sampel comment</div>", "created_by" : { "id" : "25450833", "zpuid" : "7000000002411", "name" : "Hugo Yarborough", "email" : "hugo.yarborough@zylker.com", "is_client_user" : false, "first_name" : "Hugo", "last_name" : "Yarborough", "full_name" : "Hugo Yarborough" }, "attachments" : [ ], "created_time" : "2025-02-26T09:13:04.592Z", "updated_time" : "2025-02-26T09:13:04.592Z", "updatedBy" : { "id" : "25450833", "zpuid" : "7000000002411", "name" : "Hugo Yarborough", "email" : "hugo.yarborough@zylker.com", "is_client_user" : false, "first_name" : "Hugo", "last_name" : "Yarborough", "full_name" : "Hugo Yarborough" }, "deletedTime" : "1969-12-31T23:59:59.999Z", "commentId" : "7000000115191" }

Update Record Comment

Modify details of an existing comment in a record. Use this API to modify comment content or associated attachments.

PATCH

/api/v3/portal/[PORTAL_ID]/module/[MODULE_ID]/entity/[ENTITY_ID]/comments/[COMMENT_ID]

OAuth Scope:

ZohoProjects.custom_fields.UPDATE

Path Parameters

Param Name
Data Type
Description

Body Parameters

Param Name
Data Type
Description

Request Example

Request Example
  • cURL
  • Deluge
  • Node.js
  • Ruby
  • PHP
  • Python
  • C
  • C#
  • C++
  • Clojure
  • Go
  • HTTP
  • Java
  • JS Fetch
  • JSON
  • Kotlin
  • Objective-C
  • OCaml
  • PowerShell
  • R
  • Swift

curl -X PATCH \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa' \
-H 'Content-Type: application/json' \
-d '{"content":"Sample content","attachments":[{"add":[{"attachment_id":"40000000987652"}],"remove":[{"attachment_id":"40000000987652"}],"attachment_id":"40000000987652"}],"thirdparty_id":["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]}'

url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]";
params = Map();
params.put("content", "Sample content");
params.put("attachments", [{"add":[{"attachment_id":"40000000987652"}],"remove":[{"attachment_id":"40000000987652"}],"attachment_id":"40000000987652"}]);
params.put("thirdparty_id", ["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]);
response = invokeUrl
[
    url: url
    type: PATCH
    parameters: params.toString()
    connection: "projects"
];
info response;
const https = require('https');
const url = new URL('https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]');

const payload = JSON.stringify({"content":"Sample content","attachments":[{"add":[{"attachment_id":"40000000987652"}],"remove":[{"attachment_id":"40000000987652"}],"attachment_id":"40000000987652"}],"thirdparty_id":["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]});

const options = {
  hostname: url.hostname,
  path: url.pathname + url.search,
  method: 'PATCH',
  headers: {
    'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa',
    'Content-Type': 'application/json',
    'Content-Length': Buffer.byteLength(payload)
  }
};

const req = https.request(options, (res) => {
  let data = '';
  res.on('data', (chunk) => { data += chunk; });
  res.on('end', () => { console.log(JSON.parse(data)); });
});

req.on('error', (err) => { console.error(err); });
req.write(payload);
req.end();
require 'net/http'
require 'uri'
require 'json'

url = URI("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]")

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

request = Net::HTTP::Patch.new(url)
request["Authorization"] = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
request["Content-Type"] = "application/json"
request.body = '{"content":"Sample content","attachments":[{"add":[{"attachment_id":"40000000987652"}],"remove":[{"attachment_id":"40000000987652"}],"attachment_id":"40000000987652"}],"thirdparty_id":["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]}'

response = http.request(request)
puts response.read_body
<?php
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]";

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => $url,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => "PATCH",
  CURLOPT_POSTFIELDS => '{"content":"Sample content","attachments":[{"add":[{"attachment_id":"40000000987652"}],"remove":[{"attachment_id":"40000000987652"}],"attachment_id":"40000000987652"}],"thirdparty_id":["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]}',
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa",
    "Content-Type: application/json"
  ],
]);

$response = curl_exec($curl);
curl_close($curl);

echo $response;
import requests

url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]"

headers = {
    "Authorization": "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa",
    "Content-Type": "application/json",
}

payload = '{"content":"Sample content","attachments":[{"add":[{"attachment_id":"40000000987652"}],"remove":[{"attachment_id":"40000000987652"}],"attachment_id":"40000000987652"}],"thirdparty_id":["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]}'

response = requests.patch(url, headers=headers, data=payload)

print(response.json())
#include <stdio.h>
#include <string.h>
#include <curl/curl.h>

int main(void) {
    CURL *curl = curl_easy_init();
    if (curl) {
        struct curl_slist *headers = NULL;
        headers = curl_slist_append(headers, "Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
        headers = curl_slist_append(headers, "Content-Type: application/json");

        curl_easy_setopt(curl, CURLOPT_URL, "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]");
        curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
        curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "PATCH");
        curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "{\"content\":\"Sample content\",\"attachments\":[{\"add\":[{\"attachment_id\":\"40000000987652\"}],\"remove\":[{\"attachment_id\":\"40000000987652\"}],\"attachment_id\":\"40000000987652\"}],\"thirdparty_id\":[\"a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0\"]}");

        CURLcode res = curl_easy_perform(curl);
        if (res != CURLE_OK)
            fprintf(stderr, "curl failed: %s\n", curl_easy_strerror(res));

        curl_slist_free_all(headers);
        curl_easy_cleanup(curl);
    }
    return 0;
}
using System.Net.Http;
using System.Text;
using System.Web;

var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");

var request = new HttpRequestMessage(HttpMethod.Patch, "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]");
request.Content = new StringContent(
    @"{""content"":""Sample content"",""attachments"":[{""add"":[{""attachment_id"":""40000000987652""}],""remove"":[{""attachment_id"":""40000000987652""}],""attachment_id"":""40000000987652""}],""thirdparty_id"":[""a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0""]}",
    Encoding.UTF8,
    "application/json"
);

var response = await client.SendAsync(request);
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
#include <iostream>
#include <string>
#include <curl/curl.h>

static size_t WriteCallback(void* contents, size_t size, size_t nmemb, std::string* output) {
    output->append((char*)contents, size * nmemb);
    return size * nmemb;
}

int main() {
    CURL* curl = curl_easy_init();
    if (curl) {
        std::string response;
        struct curl_slist* headers = NULL;
        headers = curl_slist_append(headers, "Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
        headers = curl_slist_append(headers, "Content-Type: application/json");

        curl_easy_setopt(curl, CURLOPT_URL, "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]");
        curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
        curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "PATCH");
        curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
        curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response);
        curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "{\"content\":\"Sample content\",\"attachments\":[{\"add\":[{\"attachment_id\":\"40000000987652\"}],\"remove\":[{\"attachment_id\":\"40000000987652\"}],\"attachment_id\":\"40000000987652\"}],\"thirdparty_id\":[\"a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0\"]}");

        CURLcode res = curl_easy_perform(curl);
        if (res == CURLE_OK)
            std::cout << response << std::endl;
        else
            std::cerr << curl_easy_strerror(res) << std::endl;

        curl_slist_free_all(headers);
        curl_easy_cleanup(curl);
    }
    return 0;
}
(require '[clj-http.client :as client])

(def response
  (client/patch "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]"
    {:headers {"Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
                "Content-Type" "application/json"}
     :body "{\"content\":\"Sample content\",\"attachments\":[{\"add\":[{\"attachment_id\":\"40000000987652\"}],\"remove\":[{\"attachment_id\":\"40000000987652\"}],\"attachment_id\":\"40000000987652\"}],\"thirdparty_id\":[\"a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0\"]}"
     :as :json}))

(println (:body response))
package main

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

func main() {
    payload := strings.NewReader("{\"content\":\"Sample content\",\"attachments\":[{\"add\":[{\"attachment_id\":\"40000000987652\"}],\"remove\":[{\"attachment_id\":\"40000000987652\"}],\"attachment_id\":\"40000000987652\"}],\"thirdparty_id\":[\"a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0\"]}")
    req, _ := http.NewRequest("PATCH", "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]", payload)
    req.Header.Add("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")
    req.Header.Add("Content-Type", "application/json")

    resp, _ := http.DefaultClient.Do(req)
    defer resp.Body.Close()
    body, _ := io.ReadAll(resp.Body)
    fmt.Println(string(body))
}
PATCH https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID] HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]
Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa
Content-Type: application/json

{"content":"Sample content","attachments":[{"add":[{"attachment_id":"40000000987652"}],"remove":[{"attachment_id":"40000000987652"}],"attachment_id":"40000000987652"}],"thirdparty_id":["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]}
HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();

SSLContext sslContext = SSLContext.getDefault();
SSLConnectionSocketFactory sslConnectionSocketFactory = new SSLConnectionSocketFactory(sslContext, NoopHostnameVerifier.INSTANCE);
CloseableHttpClient httpclient = httpClientBuilder.setSSLSocketFactory(sslConnectionSocketFactory).build();

URIBuilder uriBuilder = new URIBuilder("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]");
HttpUriRequest requestObj = new HttpPatch(uriBuilder.build());
requestObj.addHeader("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");

HttpEntityEnclosingRequestBase requestBase = (HttpEntityEnclosingRequestBase) requestObj;
String requestBody = "{\"content\":\"Sample content\",\"attachments\":[{\"add\":[{\"attachment_id\":\"40000000987652\"}],\"remove\":[{\"attachment_id\":\"40000000987652\"}],\"attachment_id\":\"40000000987652\"}],\"thirdparty_id\":[\"a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0\"]}";
requestBase.setEntity(new StringEntity(requestBody, HTTP.UTF_8));

HttpResponse response = httpclient.execute(requestObj);

HttpEntity responseEntity = response.getEntity();
Object responseObject = EntityUtils.toString(responseEntity);
String responseString = responseObject.toString();
const url = 'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]';

const options = {
  method: 'PATCH',
  headers: {
    'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({"content":"Sample content","attachments":[{"add":[{"attachment_id":"40000000987652"}],"remove":[{"attachment_id":"40000000987652"}],"attachment_id":"40000000987652"}],"thirdparty_id":["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]})
};

fetch(url, options)
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error(error));
{"content":"Sample content","attachments":[{"add":[{"attachment_id":"40000000987652"}],"remove":[{"attachment_id":"40000000987652"}],"attachment_id":"40000000987652"}],"thirdparty_id":["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]}
import java.net.HttpURLConnection
import java.net.URL
import okhttp3.HttpUrl.Companion.toHttpUrl

fun main() {
    val url = URL("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]")
    val conn = url.openConnection() as HttpURLConnection
    conn.requestMethod = "PATCH"
    conn.setRequestProperty("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")
    conn.setRequestProperty("Content-Type", "application/json")
    conn.doOutput = true
    conn.outputStream.bufferedWriter().use { it.write("""{"content":"Sample content","attachments":[{"add":[{"attachment_id":"40000000987652"}],"remove":[{"attachment_id":"40000000987652"}],"attachment_id":"40000000987652"}],"thirdparty_id":["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]}""") }

    val response = conn.inputStream.bufferedReader().readText()
    println(response)
}
NSURL *url = [NSURL URLWithString:@"https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]"];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
[request setHTTPMethod:@"PATCH"];
[request setValue:@"Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa" forHTTPHeaderField:@"Authorization"];
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
NSData *body = [@"{\"content\":\"Sample content\",\"attachments\":[{\"add\":[{\"attachment_id\":\"40000000987652\"}],\"remove\":[{\"attachment_id\":\"40000000987652\"}],\"attachment_id\":\"40000000987652\"}],\"thirdparty_id\":[\"a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0\"]}" dataUsingEncoding:NSUTF8StringEncoding];
[request setHTTPBody:body];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *task = [session dataTaskWithRequest:request
    completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
        NSString *result = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
        NSLog(@"%@", result);
}];
[task resume];
open Lwt
open Cohttp_lwt_unix

let () =
  let uri = Uri.of_string "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]" in
  let headers = Cohttp.Header.init ()
    |> fun h -> Cohttp.Header.add h "Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
    |> fun h -> Cohttp.Header.add h "Content-Type" "application/json"
  in
  let body = Cohttp_lwt.Body.of_string {json|{"content":"Sample content","attachments":[{"add":[{"attachment_id":"40000000987652"}],"remove":[{"attachment_id":"40000000987652"}],"attachment_id":"40000000987652"}],"thirdparty_id":["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]}|json} in
  Lwt_main.run (
    Client.patch ~headers ~body uri >>= fun (_, body) ->
    Cohttp_lwt.Body.to_string body >|= fun s ->
    print_endline s)
$headers = @{
    "Authorization" = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
    "Content-Type" = "application/json"
}

$body = @'
{"content":"Sample content","attachments":[{"add":[{"attachment_id":"40000000987652"}],"remove":[{"attachment_id":"40000000987652"}],"attachment_id":"40000000987652"}],"thirdparty_id":["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]}
'@

$response = Invoke-RestMethod -Uri "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]" -Method PATCH -Headers $headers -Body $body

$response | ConvertTo-Json
library(httr)

url <- "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]"

response <- PATCH(
  url,
  add_headers(Authorization = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"),
  content_type_json(),
  body = "{\"content\":\"Sample content\",\"attachments\":[{\"add\":[{\"attachment_id\":\"40000000987652\"}],\"remove\":[{\"attachment_id\":\"40000000987652\"}],\"attachment_id\":\"40000000987652\"}],\"thirdparty_id\":[\"a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0\"]}"
)

content(response, "text")
import Foundation

let url = URL(string: "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]")!
var request = URLRequest(url: url)
request.httpMethod = "PATCH"
request.setValue("Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa", forHTTPHeaderField: "Authorization")
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
request.httpBody = """
{"content":"Sample content","attachments":[{"add":[{"attachment_id":"40000000987652"}],"remove":[{"attachment_id":"40000000987652"}],"attachment_id":"40000000987652"}],"thirdparty_id":["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]}
""".data(using: .utf8)

let semaphore = DispatchSemaphore(value: 0)
let task = URLSession.shared.dataTask(with: request) { data, response, error in
    if let data = data, let result = String(data: data, encoding: .utf8) {
        print(result)
    }
    semaphore.signal()
}
task.resume()
semaphore.wait()

Sample Input

Content-Type: application/json
{ "content" : "Sample content", "attachments" : [ { "add" : [ { "attachment_id" : "40000000987652" } ], "remove" : [ { "attachment_id" : "40000000987652" } ], "attachment_id" : "40000000987652" } ], "thirdparty_id" : [ "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0" ] }

Sample Response

200{ "id" : "7000000115191", "content" : "<div>sampel comment 2<br /></div>", "created_by" : { "id" : "25450833", "zpuid" : "7000000002411", "name" : "Hugo Yarborough", "email" : "hugo.yarborough@zylker.com", "is_client_user" : false, "first_name" : "Hugo", "last_name" : "Yarborough", "full_name" : "Hugo Yarborough" }, "attachments" : [ ], "created_time" : "2025-02-26T09:13:04.592Z", "updated_time" : "2025-02-26T09:14:05.464Z", "updatedBy" : { "id" : "25450833", "zpuid" : "7000000002411", "name" : "Hugo Yarborough", "email" : "hugo.yarborough@zylker.com", "is_client_user" : false, "first_name" : "Hugo", "last_name" : "Yarborough", "full_name" : "Hugo Yarborough" }, "deletedTime" : "1969-12-31T23:59:59.999Z", "commentId" : "7000000115191" }

Delete Record Comment

Remove a comment from a record. Use this API to remove a comment permanently.

DELETE

/api/v3/portal/[PORTAL_ID]/module/[MODULE_ID]/entity/[ENTITY_ID]/comments/[COMMENT_ID]

OAuth Scope:

ZohoProjects.custom_fields.DELETE

Path Parameters

Param Name
Data Type
Description

Request Example

Request Example
  • cURL
  • Deluge
  • Node.js
  • Ruby
  • PHP
  • Python
  • C
  • C#
  • C++
  • Clojure
  • Go
  • HTTP
  • Java
  • JS Fetch
  • Kotlin
  • Objective-C
  • OCaml
  • PowerShell
  • R
  • Swift

curl -X DELETE \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'

url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]";
response = invokeUrl
[
    url: url
    type: DELETE
    connection: "projects"
];
info response;
const https = require('https');
const url = new URL('https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]');

const options = {
  hostname: url.hostname,
  path: url.pathname + url.search,
  method: 'DELETE',
  headers: {
    'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
  }
};

const req = https.request(options, (res) => {
  let data = '';
  res.on('data', (chunk) => { data += chunk; });
  res.on('end', () => { console.log(JSON.parse(data)); });
});

req.on('error', (err) => { console.error(err); });
req.end();
require 'net/http'
require 'uri'
require 'json'

url = URI("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]")

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

request = Net::HTTP::Delete.new(url)
request["Authorization"] = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"

response = http.request(request)
puts response.read_body
<?php
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]";

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => $url,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
  ],
]);

$response = curl_exec($curl);
curl_close($curl);

echo $response;
import requests

url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]"

headers = {
    "Authorization": "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa",
}

response = requests.delete(url, headers=headers)

print(response.json())
#include <stdio.h>
#include <string.h>
#include <curl/curl.h>

int main(void) {
    CURL *curl = curl_easy_init();
    if (curl) {
        struct curl_slist *headers = NULL;
        headers = curl_slist_append(headers, "Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");

        curl_easy_setopt(curl, CURLOPT_URL, "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]");
        curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
        curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "DELETE");

        CURLcode res = curl_easy_perform(curl);
        if (res != CURLE_OK)
            fprintf(stderr, "curl failed: %s\n", curl_easy_strerror(res));

        curl_slist_free_all(headers);
        curl_easy_cleanup(curl);
    }
    return 0;
}
using System.Net.Http;
using System.Text;
using System.Web;

var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");

var request = new HttpRequestMessage(HttpMethod.Delete, "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]");

var response = await client.SendAsync(request);
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
#include <iostream>
#include <string>
#include <curl/curl.h>

static size_t WriteCallback(void* contents, size_t size, size_t nmemb, std::string* output) {
    output->append((char*)contents, size * nmemb);
    return size * nmemb;
}

int main() {
    CURL* curl = curl_easy_init();
    if (curl) {
        std::string response;
        struct curl_slist* headers = NULL;
        headers = curl_slist_append(headers, "Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");

        curl_easy_setopt(curl, CURLOPT_URL, "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]");
        curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
        curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "DELETE");
        curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
        curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response);

        CURLcode res = curl_easy_perform(curl);
        if (res == CURLE_OK)
            std::cout << response << std::endl;
        else
            std::cerr << curl_easy_strerror(res) << std::endl;

        curl_slist_free_all(headers);
        curl_easy_cleanup(curl);
    }
    return 0;
}
(require '[clj-http.client :as client])

(def response
  (client/delete "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]"
    {:headers {"Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"}
     :as :json}))

(println (:body response))
package main

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

func main() {
    req, _ := http.NewRequest("DELETE", "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]", nil)
    req.Header.Add("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")

    resp, _ := http.DefaultClient.Do(req)
    defer resp.Body.Close()
    body, _ := io.ReadAll(resp.Body)
    fmt.Println(string(body))
}
DELETE https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID] HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]
Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa
HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();

SSLContext sslContext = SSLContext.getDefault();
SSLConnectionSocketFactory sslConnectionSocketFactory = new SSLConnectionSocketFactory(sslContext, NoopHostnameVerifier.INSTANCE);
CloseableHttpClient httpclient = httpClientBuilder.setSSLSocketFactory(sslConnectionSocketFactory).build();

URIBuilder uriBuilder = new URIBuilder("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]");
HttpUriRequest requestObj = new HttpDelete(uriBuilder.build());
requestObj.addHeader("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");

HttpResponse response = httpclient.execute(requestObj);

HttpEntity responseEntity = response.getEntity();
Object responseObject = EntityUtils.toString(responseEntity);
String responseString = responseObject.toString();
const url = 'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]';

const options = {
  method: 'DELETE',
  headers: {
    'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
  }
};

fetch(url, options)
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error(error));
import java.net.HttpURLConnection
import java.net.URL
import okhttp3.HttpUrl.Companion.toHttpUrl

fun main() {
    val url = URL("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]")
    val conn = url.openConnection() as HttpURLConnection
    conn.requestMethod = "DELETE"
    conn.setRequestProperty("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")

    val response = conn.inputStream.bufferedReader().readText()
    println(response)
}
NSURL *url = [NSURL URLWithString:@"https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]"];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
[request setHTTPMethod:@"DELETE"];
[request setValue:@"Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa" forHTTPHeaderField:@"Authorization"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *task = [session dataTaskWithRequest:request
    completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
        NSString *result = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
        NSLog(@"%@", result);
}];
[task resume];
open Lwt
open Cohttp_lwt_unix

let () =
  let uri = Uri.of_string "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]" in
  let headers = Cohttp.Header.init ()
    |> fun h -> Cohttp.Header.add h "Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
  in
  Lwt_main.run (
    Client.delete ~headers uri >>= fun (_, body) ->
    Cohttp_lwt.Body.to_string body >|= fun s ->
    print_endline s)
$headers = @{
    "Authorization" = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
}

$response = Invoke-RestMethod -Uri "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]" -Method DELETE -Headers $headers

$response | ConvertTo-Json
library(httr)

url <- "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]"

response <- DELETE(
  url,
  add_headers(Authorization = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")
)

content(response, "text")
import Foundation

let url = URL(string: "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/comments/[COMMENT_ID]")!
var request = URLRequest(url: url)
request.httpMethod = "DELETE"
request.setValue("Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa", forHTTPHeaderField: "Authorization")

let semaphore = DispatchSemaphore(value: 0)
let task = URLSession.shared.dataTask(with: request) { data, response, error in
    if let data = data, let result = String(data: data, encoding: .utf8) {
        print(result)
    }
    semaphore.signal()
}
task.resume()
semaphore.wait()

Sample Response

204 No Content{ "status" : "success" }

Get Comments Count

Retrieve the total number of comments for a record.

GET

/api/v3/portal/[PORTAL_ID]/module/[MODULE_ID]/entity/[ENTITY_ID]/count

OAuth Scope:

ZohoProjects.custom_fields.READ

Path Parameters

Param Name
Data Type
Description

Request Example

Request Example
  • cURL
  • Deluge
  • Node.js
  • Ruby
  • PHP
  • Python
  • C
  • C#
  • C++
  • Clojure
  • Go
  • HTTP
  • Java
  • JS Fetch
  • Kotlin
  • Objective-C
  • OCaml
  • PowerShell
  • R
  • Swift

curl -X GET \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/count' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'

url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/count";
response = invokeUrl
[
    url: url
    type: GET
    connection: "projects"
];
info response;
const https = require('https');
const url = new URL('https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/count');

const options = {
  hostname: url.hostname,
  path: url.pathname + url.search,
  method: 'GET',
  headers: {
    'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
  }
};

const req = https.request(options, (res) => {
  let data = '';
  res.on('data', (chunk) => { data += chunk; });
  res.on('end', () => { console.log(JSON.parse(data)); });
});

req.on('error', (err) => { console.error(err); });
req.end();
require 'net/http'
require 'uri'
require 'json'

url = URI("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/count")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"

response = http.request(request)
puts response.read_body
<?php
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/count";

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => $url,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
  ],
]);

$response = curl_exec($curl);
curl_close($curl);

echo $response;
import requests

url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/count"

headers = {
    "Authorization": "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa",
}

response = requests.get(url, headers=headers)

print(response.json())
#include <stdio.h>
#include <string.h>
#include <curl/curl.h>

int main(void) {
    CURL *curl = curl_easy_init();
    if (curl) {
        struct curl_slist *headers = NULL;
        headers = curl_slist_append(headers, "Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");

        curl_easy_setopt(curl, CURLOPT_URL, "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/count");
        curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
        curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "GET");

        CURLcode res = curl_easy_perform(curl);
        if (res != CURLE_OK)
            fprintf(stderr, "curl failed: %s\n", curl_easy_strerror(res));

        curl_slist_free_all(headers);
        curl_easy_cleanup(curl);
    }
    return 0;
}
using System.Net.Http;
using System.Text;
using System.Web;

var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");

var request = new HttpRequestMessage(HttpMethod.Get, "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/count");

var response = await client.SendAsync(request);
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
#include <iostream>
#include <string>
#include <curl/curl.h>

static size_t WriteCallback(void* contents, size_t size, size_t nmemb, std::string* output) {
    output->append((char*)contents, size * nmemb);
    return size * nmemb;
}

int main() {
    CURL* curl = curl_easy_init();
    if (curl) {
        std::string response;
        struct curl_slist* headers = NULL;
        headers = curl_slist_append(headers, "Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");

        curl_easy_setopt(curl, CURLOPT_URL, "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/count");
        curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
        curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "GET");
        curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
        curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response);

        CURLcode res = curl_easy_perform(curl);
        if (res == CURLE_OK)
            std::cout << response << std::endl;
        else
            std::cerr << curl_easy_strerror(res) << std::endl;

        curl_slist_free_all(headers);
        curl_easy_cleanup(curl);
    }
    return 0;
}
(require '[clj-http.client :as client])

(def response
  (client/get "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/count"
    {:headers {"Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"}
     :as :json}))

(println (:body response))
package main

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

func main() {
    req, _ := http.NewRequest("GET", "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/count", nil)
    req.Header.Add("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")

    resp, _ := http.DefaultClient.Do(req)
    defer resp.Body.Close()
    body, _ := io.ReadAll(resp.Body)
    fmt.Println(string(body))
}
GET https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/count HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/count
Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa
HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();

SSLContext sslContext = SSLContext.getDefault();
SSLConnectionSocketFactory sslConnectionSocketFactory = new SSLConnectionSocketFactory(sslContext, NoopHostnameVerifier.INSTANCE);
CloseableHttpClient httpclient = httpClientBuilder.setSSLSocketFactory(sslConnectionSocketFactory).build();

URIBuilder uriBuilder = new URIBuilder("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/count");
HttpUriRequest requestObj = new HttpGet(uriBuilder.build());
requestObj.addHeader("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");

HttpResponse response = httpclient.execute(requestObj);

HttpEntity responseEntity = response.getEntity();
Object responseObject = EntityUtils.toString(responseEntity);
String responseString = responseObject.toString();
const url = 'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/count';

const options = {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
  }
};

fetch(url, options)
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error(error));
import java.net.HttpURLConnection
import java.net.URL
import okhttp3.HttpUrl.Companion.toHttpUrl

fun main() {
    val url = URL("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/count")
    val conn = url.openConnection() as HttpURLConnection
    conn.requestMethod = "GET"
    conn.setRequestProperty("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")

    val response = conn.inputStream.bufferedReader().readText()
    println(response)
}
NSURL *url = [NSURL URLWithString:@"https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/count"];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
[request setHTTPMethod:@"GET"];
[request setValue:@"Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa" forHTTPHeaderField:@"Authorization"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *task = [session dataTaskWithRequest:request
    completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
        NSString *result = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
        NSLog(@"%@", result);
}];
[task resume];
open Lwt
open Cohttp_lwt_unix

let () =
  let uri = Uri.of_string "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/count" in
  let headers = Cohttp.Header.init ()
    |> fun h -> Cohttp.Header.add h "Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
  in
  Lwt_main.run (
    Client.get ~headers uri >>= fun (_, body) ->
    Cohttp_lwt.Body.to_string body >|= fun s ->
    print_endline s)
$headers = @{
    "Authorization" = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
}

$response = Invoke-RestMethod -Uri "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/count" -Method GET -Headers $headers

$response | ConvertTo-Json
library(httr)

url <- "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/count"

response <- GET(
  url,
  add_headers(Authorization = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")
)

content(response, "text")
import Foundation

let url = URL(string: "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/module/1752587000000097269/entity/1752587000000097299/count")!
var request = URLRequest(url: url)
request.httpMethod = "GET"
request.setValue("Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa", forHTTPHeaderField: "Authorization")

let semaphore = DispatchSemaphore(value: 0)
let task = URLSession.shared.dataTask(with: request) { data, response, error in
    if let data = data, let result = String(data: data, encoding: .utf8) {
        print(result)
    }
    semaphore.signal()
}
task.resume()
semaphore.wait()

Sample Response

200{ "comments_count" : "6" }
AI Tools
ChatGPT Open in ChatGPT ↗ Open in ChatGPT to ask questions about this page
Claude Open in Claude ↗ Open in Claude to ask questions about this page
Copy as Markdown Copy this page as markdown to use with AI assistants
View as Markdown ↗ Open this page as markdown in a new tab
Copy OpenAPI Spec Copy the OpenAPI YAML to the clipboard
View as YAML ↗ Open the OpenAPI spec in a new tab
Download YAML Save the OpenAPI spec as a .yaml file