This module covers user-related operations within Zoho Projects. Use this API to manage portal users, client users, and resources. You can retrieve user details, add or deactivate users, update user profiles, and view the projects a user is associated with.
Retrieve all users, client users, contacts, and resources in a specific portal. Use this API to access the complete list of users and their details within a portal.
GET
/api/v3/portal/[PORTAL_ID]/users
OAuth Scope:
ZohoProjects.users.READ
Path Parameters
Param Name
Data Type
Description
portal_id
String
required regex : [0-9]+
Unique, immutable identifier of the portal in Zoho Projects.
You can obtain it from the Get Portals API (the "id" field in the response).
Query Parameters
Param Name
Data Type
Description
type
int
Enter the user type. Accepted values are 1 (Users), 2 (Client Users), 3 (Client Contacts), 6 (Resources).
view_type
String
Enter the view type.Accepted values are 0 (Inactive), 1 (Active).
sort
String
Enter the sort criteria for the results. Example: alphabetical:asc. Accepted values: alphabetical, last_accessed_time, role, profile, added_time with asc or desc.
page
int
default : 1
Enter the page number.
per_page
int
limit : 1-200 default : 100
Enter the number of entries to be displayed per page.
filter
JSONObject
Enter the filter criteria to narrow down the user results.
criteria
JSONArray
max length : 10000 array size : >=0
Enter the list of filter conditions. Each condition is combined using the pattern.
cfid
int
Enter the ID of the custom field.
api_name
String
Enter the API name of the field.
field_name
String
Enter the field name.
criteria_condition
String
max length : 25
Enter the condition for the criteria (for example: is, contains, greater_than).
value
JSONArray
max length : 10000 array size : >=0
Enter the values for the criteria condition. Multiple values can be provided.
relative_columns
JSONArray
max length : 10000 array size : >=0
Enter the relative date filter details to filter records based on dynamic time.
cfid
int
Enter the ID of the custom field.
offset
int
Enter the offset value (hours or days) to add or subtract from the current date.
unit
String
Enter the unit for the offset. Accepted values: days or hours
prior
String
Specify how the offset is applied. Accepted values: before, after, add, or subtract
pattern
String
max length : 300
Enter the logical pattern to combine filter conditions (for example: 1 AND 2).
ids
String
Enter the user IDs.
company_ids
String
Enter the customer IDs.
You can obtain it from the Get Customers API (the "id" field in the response).
view
String
Enter the data view type. Accepted values: list, grid.
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
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]/users?type=1&view_type=1&sort=alphabetical%3Aasc&page=1&per_page=10&filter=%7B%22criteria%22%3A%5B%7B%22cfid%22%3A%224000000000242%22%2C%22api_name%22%3A%22-%22%2C%22field_name%22%3A%22project%22%2C%22criteria_condition%22%3A%22contains%22%2C%22value%22%3A%5B%221752587000000097269%22%5D%2C%22relative_columns%22%3A%5B%7B%22cfid%22%3A%224000000000242%22%2C%22offset%22%3A%221%22%2C%22unit%22%3A%22days%22%2C%22prior%22%3A%22before%22%7D%5D%7D%5D%2C%22pattern%22%3A%221%22%7D&ids=4000000029001&company_ids=170876000003941041&view=list' \ -H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
open Lwt
open Cohttp_lwt_unix
let () =
let enc_type = Uri.pct_encode "1" in
let enc_view_type = Uri.pct_encode "1" in
let enc_sort = Uri.pct_encode "alphabetical:asc" in
let enc_page = Uri.pct_encode "1" in
let enc_per_page = Uri.pct_encode "10" in
let enc_filter = Uri.pct_encode "{\"criteria\":[{\"cfid\":\"4000000000242\",\"api_name\":\"-\",\"field_name\":\"project\",\"criteria_condition\":\"contains\",\"value\":[\"1752587000000097269\"],\"relative_columns\":[{\"cfid\":\"4000000000242\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1\"}" in
let enc_ids = Uri.pct_encode "4000000029001" in
let enc_company_ids = Uri.pct_encode "170876000003941041" in
let enc_view = Uri.pct_encode "list" in
let uri = Uri.of_string ("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/users" ^ "?type=" ^ enc_type ^ "&view_type=" ^ enc_view_type ^ "&sort=" ^ enc_sort ^ "&page=" ^ enc_page ^ "&per_page=" ^ enc_per_page ^ "&filter=" ^ enc_filter ^ "&ids=" ^ enc_ids ^ "&company_ids=" ^ enc_company_ids ^ "&view=" ^ enc_view) 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)
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["status"] = "active";
query["search_term"] = "Zoho Projects";
query["page"] = "1";
query["per_page"] = "10";
var uriBuilder = new UriBuilder("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/users/[USER_ID]/projects") { 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);
open Lwt
open Cohttp_lwt_unix
let () =
let enc_status = Uri.pct_encode "active" in
let enc_search_term = Uri.pct_encode "Zoho Projects" in
let enc_page = Uri.pct_encode "1" in
let enc_per_page = Uri.pct_encode "10" in
let uri = Uri.of_string ("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/users/[USER_ID]/projects" ^ "?status=" ^ enc_status ^ "&search_term=" ^ enc_search_term ^ "&page=" ^ enc_page ^ "&per_page=" ^ enc_per_page) 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)
Retrieve the license details of portal and client users in a specific portal. Use this API to access the current license usage and availability for users within a portal.
GET
/api/v3/portal/[PORTAL_ID]/users/license-details
OAuth Scope:
ZohoProjects.users.READ
Path Parameters
Param Name
Data Type
Description
portal_id
String
required regex : [0-9]+
Unique, immutable identifier of the portal in Zoho Projects.
You can obtain it from the Get Portals API (the "id" field in the response).
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
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]/users/license-details' \ -H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/users/license-details";
response = invokeUrl
[
url: url
type: GET
connection: "projects"
];
info response;
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]/users/license-details");
var response = await client.SendAsync(request);
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
open Lwt
open Cohttp_lwt_unix
let () =
let uri = Uri.of_string "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/users/license-details" 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)
import Foundation
let url = URL(string: "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/users/license-details")!
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()
Add a new user to the Zoho Projects portal. Use this API to invite and grant access to a user within a portal.
POST
/api/v3/portal/[PORTAL_ID]/users
OAuth Scope:
ZohoProjects.users.CREATE
Path Parameters
Param Name
Data Type
Description
portal_id
String
required regex : [0-9]+
Unique, immutable identifier of the portal in Zoho Projects.
You can obtain it from the Get Portals API (the "id" field in the response).
Query Parameters
Param Name
Data Type
Description
userdetails
JSONArray
required
Enter the details of the users to add to the portal.
email_id
String
Enter the email ID.
email_template
int
Enter Email template ID based on this invitation mail will be sent
role_id
String
Enter the ID of the role to assign to the user.
profile_id
String
Enter the ID of the profile to assign to the user.
project_ids
JSONArray
max length : 600000 array size : 0-3000
Enter the IDs of the projects to assign to the user.
bulk_projects
JSONObject
max length : 200000
Enter the project assignment details for the user.
select_all
boolean
Specify whether all projects should be selected. Accepted values: true, false.
selected
JSONObject
max length : 200000
Enter the details of the selected projects to assign to the user.
group_ids
JSONArray
max length : 200000 array size : 0-10000
Enter the IDs of the project groups to assign to the user.
project_ids
JSONArray
max length : 200000 array size : 0-10000
Enter the IDs of the projects to assign to the user.
unselected
JSONObject
max length : 200000
Enter the details of the projects to exclude from the user's assignment.
group_ids
JSONArray
max length : 200000 array size : 0-10000
Enter the IDs of the project groups to exclude from the user's assignment.
project_ids
JSONArray
max length : 200000 array size : 0-10000
Enter the IDs of the projects to exclude from the user's assignment.
rateupdatedprojects
JSONObject
max length : 200000
Enter projects with the user’s rate per hour in JSON format.({"Project System ID":"Rate per hour"})E.g. {"21446000000471005":"20","21446000000471111":"20"}
costrateupdatedprojects
JSONObject
max length : 200000
Enter projects with the user’s cost per hour in JSON format. ({"Project System ID":"Cost per hour"})E.g.{"21446000000471005":"15","21446000000471111":"15"}
rate
String
Enter the rate per hour of the user. E.g. $50 per hour
cost_rate_per_hour
String
Enter the cost per hour of the user. E.g. $30 per hour
revenue_budget
String
Enter the revenue budget of the project. E.g. $10,000
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["userdetails"] = "[{\"email_id\":\"mark@zylker.com\",\"email_template\":\"-\",\"role_id\":\"8000000000991\",\"profile_id\":\"2223806000000022149\",\"project_ids\":[\"23806000074760021\"],\"bulk_projects\":{\"select_all\":\"false\",\"selected\":{\"group_ids\":[\"2380600000612345\"],\"project_ids\":[\"23806000074760021\"]},\"unselected\":{\"group_ids\":[\"2380600000612345\"],\"project_ids\":[\"23806000074760021\"]},\"rateupdatedprojects\":\"-\",\"costrateupdatedprojects\":\"-\"},\"rate\":\"55.00\",\"cost_rate_per_hour\":\"200\",\"revenue_budget\":\"14.00\",\"cost_budget\":\"20.00\",\"budget_threshold\":\"10.00\",\"include_projects\":\"8000000005863\",\"applyportalrate\":\"-\",\"reporting_manager\":\"-\",\"reporting_to\":\"8000000002411\",\"hourly_budget\":\"5.00\",\"hourly_budget_threshold\":\"3.00\",\"business_hours_id\":\"-\"}]";
var uriBuilder = new UriBuilder("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/users") { Query = query.ToString() };
var request = new HttpRequestMessage(HttpMethod.Post, uriBuilder.Uri);
var response = await client.SendAsync(request);
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
open Lwt
open Cohttp_lwt_unix
let () =
let enc_userdetails = Uri.pct_encode "[{\"email_id\":\"mark@zylker.com\",\"email_template\":\"-\",\"role_id\":\"8000000000991\",\"profile_id\":\"2223806000000022149\",\"project_ids\":[\"23806000074760021\"],\"bulk_projects\":{\"select_all\":\"false\",\"selected\":{\"group_ids\":[\"2380600000612345\"],\"project_ids\":[\"23806000074760021\"]},\"unselected\":{\"group_ids\":[\"2380600000612345\"],\"project_ids\":[\"23806000074760021\"]},\"rateupdatedprojects\":\"-\",\"costrateupdatedprojects\":\"-\"},\"rate\":\"55.00\",\"cost_rate_per_hour\":\"200\",\"revenue_budget\":\"14.00\",\"cost_budget\":\"20.00\",\"budget_threshold\":\"10.00\",\"include_projects\":\"8000000005863\",\"applyportalrate\":\"-\",\"reporting_manager\":\"-\",\"reporting_to\":\"8000000002411\",\"hourly_budget\":\"5.00\",\"hourly_budget_threshold\":\"3.00\",\"business_hours_id\":\"-\"}]" in
let uri = Uri.of_string ("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/users" ^ "?userdetails=" ^ enc_userdetails) in
let headers = Cohttp.Header.init ()
|> fun h -> Cohttp.Header.add h "Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
in
Lwt_main.run (
Client.post ~headers uri >>= fun (_, body) ->
Cohttp_lwt.Body.to_string body >|= fun s ->
print_endline s)
Add a new client user to the Zoho Projects portal. Use this API to invite and grant client-level access to a user within a portal.
POST
/api/v3/portal/[PORTAL_ID]/clientuser
OAuth Scope:
ZohoProjects.users.CREATE
Path Parameters
Param Name
Data Type
Description
portal_id
String
required regex : [0-9]+
Unique, immutable identifier of the portal in Zoho Projects.
You can obtain it from the Get Portals API (the "id" field in the response).
Query Parameters
Param Name
Data Type
Description
userdetails
JSONArray
required
Enter the client user details.
email_id
String
Enter the email ID of the client user.
email_template
int
Enter Email template ID based on this invitation mail will be sent
profile_id
String
Enter the profile ID of the client user.
company_name
String
Enter the customer name.
customer_type
int
Enter the customer type
company_id
String
Enter the customer ID.
project_ids
JSONArray
max length : 600000 array size : 0-3000
Enter the IDs of the projects to assign to the client user.
bulk_projects
JSONObject
max length : 200000
Enter the project assignment details for the client user.
select_all
boolean
Specify whether all projects should be selected. Accepted values: true, false.
selected
JSONObject
max length : 200000
Enter the details of the selected projects to assign to the client user.
group_ids
JSONArray
max length : 200000 array size : 0-10000
Enter the IDs of the project groups to assign to the client user.
project_ids
JSONArray
max length : 200000 array size : 0-10000
Enter the IDs of the projects to assign to the client user.
unselected
JSONObject
max length : 200000
Enter the details of the projects to exclude from the client user's assignment.
group_ids
JSONArray
max length : 200000 array size : 0-10000
Enter the IDs of the project groups to exclude from the client user's assignment.
project_ids
JSONArray
max length : 200000 array size : 0-10000
Enter the IDs of the projects to exclude from the client user's assignment.
rateupdatedprojects
JSONObject
max length : 200000
Enter projects with the user’s rate per hour in JSON format.({"Project System ID":"Rate per hour"})E.g. {"21446000000471005":"20","21446000000471111":"20"}
costrateupdatedprojects
JSONObject
max length : 200000
Enter projects with the user’s cost per hour in JSON format. ({"Project System ID":"Cost per hour"})E.g.{"21446000000471005":"15","21446000000471111":"15"}
rate
String
Enter the rate per hour. E.g. $50 per hour.
include_projects
String
Enter the project details to include.
cost_rate_per_hour
String
Enter the cost per hour. E.g. $30 per hour
revenue_budget
String
Enter the revenue budget of the project E.g. $10,000
cost_budget
String
Enter the project cost. E.g.$8,000
budget_threshold
String
Enter the budget threshold of the project E.g. $10,000
hourly_budget
String
Enter the hourly budget for the client user.
hourly_budget_threshold
String
Enter the hourly budget threshold for the client user.
force_add
boolean
Specify whether to convert existing contact users to client users.Accepted valuess: True or False.
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["userdetails"] = "[{\"email_id\":\"mark@zylker.com\",\"email_template\":\"-\",\"profile_id\":\"2223806000000022149\",\"company_name\":\"New Customer\",\"customer_type\":\"-\",\"company_id\":\"2223806000097701045\",\"project_ids\":[\"23806000074760021\"],\"bulk_projects\":{\"select_all\":\"false\",\"selected\":{\"group_ids\":[\"2380600000612345\"],\"project_ids\":[\"23806000074760021\"]},\"unselected\":{\"group_ids\":[\"2380600000612345\"],\"project_ids\":[\"23806000074760021\"]},\"rateupdatedprojects\":\"-\",\"costrateupdatedprojects\":\"-\"},\"rate\":\"55.00\",\"include_projects\":\"8000000005863\",\"cost_rate_per_hour\":\"200\",\"revenue_budget\":\"14.00\",\"cost_budget\":\"20.00\",\"budget_threshold\":\"10.00\",\"hourly_budget\":\"5.00\",\"hourly_budget_threshold\":\"3.00\"}]";
query["force_add"] = "true";
var uriBuilder = new UriBuilder("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/clientuser") { Query = query.ToString() };
var request = new HttpRequestMessage(HttpMethod.Post, uriBuilder.Uri);
var response = await client.SendAsync(request);
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
open Lwt
open Cohttp_lwt_unix
let () =
let enc_userdetails = Uri.pct_encode "[{\"email_id\":\"mark@zylker.com\",\"email_template\":\"-\",\"profile_id\":\"2223806000000022149\",\"company_name\":\"New Customer\",\"customer_type\":\"-\",\"company_id\":\"2223806000097701045\",\"project_ids\":[\"23806000074760021\"],\"bulk_projects\":{\"select_all\":\"false\",\"selected\":{\"group_ids\":[\"2380600000612345\"],\"project_ids\":[\"23806000074760021\"]},\"unselected\":{\"group_ids\":[\"2380600000612345\"],\"project_ids\":[\"23806000074760021\"]},\"rateupdatedprojects\":\"-\",\"costrateupdatedprojects\":\"-\"},\"rate\":\"55.00\",\"include_projects\":\"8000000005863\",\"cost_rate_per_hour\":\"200\",\"revenue_budget\":\"14.00\",\"cost_budget\":\"20.00\",\"budget_threshold\":\"10.00\",\"hourly_budget\":\"5.00\",\"hourly_budget_threshold\":\"3.00\"}]" in
let enc_force_add = Uri.pct_encode "true" in
let uri = Uri.of_string ("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/clientuser" ^ "?userdetails=" ^ enc_userdetails ^ "&force_add=" ^ enc_force_add) in
let headers = Cohttp.Header.init ()
|> fun h -> Cohttp.Header.add h "Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
in
Lwt_main.run (
Client.post ~headers uri >>= fun (_, body) ->
Cohttp_lwt.Body.to_string body >|= fun s ->
print_endline s)
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["notify"] = "true";
var uriBuilder = new UriBuilder("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/users/[USER_ID]/activate") { Query = query.ToString() };
var request = new HttpRequestMessage(HttpMethod.Post, uriBuilder.Uri);
var response = await client.SendAsync(request);
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
open Lwt
open Cohttp_lwt_unix
let () =
let enc_notify = Uri.pct_encode "true" in
let uri = Uri.of_string ("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/users/[USER_ID]/activate" ^ "?notify=" ^ enc_notify) in
let headers = Cohttp.Header.init ()
|> fun h -> Cohttp.Header.add h "Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
in
Lwt_main.run (
Client.post ~headers uri >>= fun (_, body) ->
Cohttp_lwt.Body.to_string body >|= fun s ->
print_endline s)
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["notify"] = "true";
var uriBuilder = new UriBuilder("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/users/[USER_ID]/deactivate") { Query = query.ToString() };
var request = new HttpRequestMessage(HttpMethod.Post, uriBuilder.Uri);
var response = await client.SendAsync(request);
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
open Lwt
open Cohttp_lwt_unix
let () =
let enc_notify = Uri.pct_encode "true" in
let uri = Uri.of_string ("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/users/[USER_ID]/deactivate" ^ "?notify=" ^ enc_notify) in
let headers = Cohttp.Header.init ()
|> fun h -> Cohttp.Header.add h "Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
in
Lwt_main.run (
Client.post ~headers uri >>= fun (_, body) ->
Cohttp_lwt.Body.to_string body >|= fun s ->
print_endline s)
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["notify"] = "true";
var uriBuilder = new UriBuilder("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/client-users/[CLIENT-USER_ID]/activate") { Query = query.ToString() };
var request = new HttpRequestMessage(HttpMethod.Post, uriBuilder.Uri);
var response = await client.SendAsync(request);
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
open Lwt
open Cohttp_lwt_unix
let () =
let enc_notify = Uri.pct_encode "true" in
let uri = Uri.of_string ("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/client-users/[CLIENT-USER_ID]/activate" ^ "?notify=" ^ enc_notify) in
let headers = Cohttp.Header.init ()
|> fun h -> Cohttp.Header.add h "Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
in
Lwt_main.run (
Client.post ~headers uri >>= fun (_, body) ->
Cohttp_lwt.Body.to_string body >|= fun s ->
print_endline s)
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["notify"] = "true";
var uriBuilder = new UriBuilder("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/client-users/[CLIENT-USER_ID]/deactivate") { Query = query.ToString() };
var request = new HttpRequestMessage(HttpMethod.Post, uriBuilder.Uri);
var response = await client.SendAsync(request);
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
open Lwt
open Cohttp_lwt_unix
let () =
let enc_notify = Uri.pct_encode "true" in
let uri = Uri.of_string ("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/client-users/[CLIENT-USER_ID]/deactivate" ^ "?notify=" ^ enc_notify) in
let headers = Cohttp.Header.init ()
|> fun h -> Cohttp.Header.add h "Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
in
Lwt_main.run (
Client.post ~headers uri >>= fun (_, body) ->
Cohttp_lwt.Body.to_string body >|= fun s ->
print_endline s)
Update the user profile and rate in the Zoho Projects portal.
POST
/api/v3/portal/[PORTAL_ID]/users/[USER_ID]
OAuth Scope:
ZohoProjects.users.UPDATE
Path Parameters
Param Name
Data Type
Description
portal_id
String
required regex : [0-9]+
Unique, immutable identifier of the portal in Zoho Projects.
You can obtain it from the Get Portals API (the "id" field in the response).
user_id
String
required regex : [0-9]+
Identifier of an user.
Obtained from the Get Users API - the "id" field in the response corresponds to user_id.
Query Parameters
Param Name
Data Type
Description
companyrole
int
Enter the role ID of the user.
You can obtain it from the Get Roles API (the "id" field in the response).
companyprofile
int
Enter the profile ID of the user.
You can obtain it from the Get Profiles API (the "id" field in the response).
invoice
String
Enter the invoice rate, e.g., $30 per hour.
costrate
String
Enter the cost per hour, e.g., $15 per hour.
isapplyportalrate
boolean
Specify whether the user rate applies at the portal level. Accepted values: true, false
bulkprojects
JSONObject
Enter the project details
select_all
boolean
Specify whether all projects should be selected. Accepted values: true, false.
selected
JSONObject
max length : 200000
Enter selected project details.
group_ids
JSONArray
max length : 200000 array size : 0-10000
Enter the project group IDs.
project_ids
JSONArray
max length : 200000 array size : 0-10000
Enter the project IDs.
unselected
JSONObject
max length : 200000
Enter unselected project details.
group_ids
JSONArray
max length : 200000 array size : 0-10000
Enter the project group IDs.
project_ids
JSONArray
max length : 200000 array size : 0-10000
Enter the project IDs.
rateupdatedprojects
JSONObject
max length : 200000
Enter projects with the user’s rate per hour in JSON format.({"Project System ID":"Rate per hour"})E.g. {"21446000000471005":"20","21446000000471111":"20"}
costrateupdatedprojects
JSONObject
max length : 200000
Enter projects with the user’s cost per hour in JSON format. ({"Project System ID":"Cost per hour"})E.g.{"21446000000471005":"15","21446000000471111":"15"}
reporting_manager
int
Specify the reporting manager.
reporting_to
int
Specify the reporting manager.
You can obtain it from the Get Portal Users API (the "id" field in the response).
notify
boolean
Specify whether the user should be notified about updates. Accepted values: true, false.
cost_effective_from_date
String
Date from which changes to Cost Per Hour should take effect.
business_hours_id
int
The business hours id of the user.
You can obtain it from the Get Business Hours API (the "id" field in the response).
skillset
JSONObject
max length : 500000
Enter the skill association details for the user.
add
JSONArray
max length : 500000 array size : 0-1000
Enter the skills to associate with the user.
id
int
required
Enter the skill ID.
level
String
regex : beginner|intermediate|advanced
Enter the proficiency level of the skill. Accepted values: beginner, intermediate, advanced
open Lwt
open Cohttp_lwt_unix
let () =
let enc_companyrole = Uri.pct_encode "170876000004915003" in
let enc_companyprofile = Uri.pct_encode "170876000003941041" in
let enc_invoice = Uri.pct_encode "30.00" in
let enc_costrate = Uri.pct_encode "15.00" in
let enc_isapplyportalrate = Uri.pct_encode "false" in
let enc_bulkprojects = Uri.pct_encode "{\"select_all\":\"false\",\"selected\":{\"group_ids\":[\"2380600000612345\"],\"project_ids\":[\"23806000074760021\"]},\"unselected\":{\"group_ids\":[\"2380600000612345\"],\"project_ids\":[\"23806000074760021\"]},\"rateupdatedprojects\":\"-\",\"costrateupdatedprojects\":\"-\"}" in
let enc_reporting_manager = Uri.pct_encode "8000000002411" in
let enc_reporting_to = Uri.pct_encode "8000000002411" in
let enc_notify = Uri.pct_encode "true" in
let enc_cost_effective_from_date = Uri.pct_encode "2024-08-21" in
let enc_business_hours_id = Uri.pct_encode "-" in
let enc_skillset = Uri.pct_encode "{\"add\":[{\"id\":\"-\",\"level\":\"-\"}],\"remove\":[{\"id\":\"-\"}]}" in
let uri = Uri.of_string ("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/users/[USER_ID]" ^ "?companyrole=" ^ enc_companyrole ^ "&companyprofile=" ^ enc_companyprofile ^ "&invoice=" ^ enc_invoice ^ "&costrate=" ^ enc_costrate ^ "&isapplyportalrate=" ^ enc_isapplyportalrate ^ "&bulkprojects=" ^ enc_bulkprojects ^ "&reporting_manager=" ^ enc_reporting_manager ^ "&reporting_to=" ^ enc_reporting_to ^ "¬ify=" ^ enc_notify ^ "&cost_effective_from_date=" ^ enc_cost_effective_from_date ^ "&business_hours_id=" ^ enc_business_hours_id ^ "&skillset=" ^ enc_skillset) in
let headers = Cohttp.Header.init ()
|> fun h -> Cohttp.Header.add h "Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
in
Lwt_main.run (
Client.post ~headers uri >>= fun (_, body) ->
Cohttp_lwt.Body.to_string body >|= fun s ->
print_endline s)
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]/users/[USER_ID]");
var response = await client.SendAsync(request);
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
open Lwt
open Cohttp_lwt_unix
let () =
let uri = Uri.of_string "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/users/[USER_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)
import Foundation
let url = URL(string: "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/users/[USER_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()
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["notify"] = "true";
query["reporting_manager"] = "8000000002411";
query["reporting_to"] = "8000000002411";
var uriBuilder = new UriBuilder("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/users/[USER_ID]") { Query = query.ToString() };
var request = new HttpRequestMessage(HttpMethod.Delete, uriBuilder.Uri);
var response = await client.SendAsync(request);
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
open Lwt
open Cohttp_lwt_unix
let () =
let enc_notify = Uri.pct_encode "true" in
let enc_reporting_manager = Uri.pct_encode "8000000002411" in
let enc_reporting_to = Uri.pct_encode "8000000002411" in
let uri = Uri.of_string ("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/users/[USER_ID]" ^ "?notify=" ^ enc_notify ^ "&reporting_manager=" ^ enc_reporting_manager ^ "&reporting_to=" ^ enc_reporting_to) 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)
Retrieve all users, client users, and contacts from the Zoho Projects portal.
GET
/api/v3.1/portal/[PORTAL_ID]/users
OAuth Scope:
ZohoProjects.users.READ
Path Parameters
Param Name
Data Type
Description
portal_id
String
required regex : [0-9]+
Unique, immutable identifier of the portal in Zoho Projects.
You can obtain it from the Get Portals API (the "id" field in the response).
Query Parameters
Param Name
Data Type
Description
type
String
Enter the user type. Accepted values are portal_user,client_user,client_contact
view_type
String
Enter the view type.Accepted values are active,inactive,active_read_only,inactive_read_only,subordinates_active,direct_reporters_active,activate_user_request,sandboxdevelopers,inactive_lite_user,active_lite_user
page
int
default : 1
Enter the page number.
per_page
int
default : 100
Enter the number of entries to be displayed per page.
filter
JSONObject
Enter the filter criteria.
criteria
JSONArray
max length : 10000 array size : >=0
Enter the criteria information.
module
String
Enter the module of the field.
field_name
String
Enter the field name.
module_name
String
Enter the module name.
criteria_condition
String
max length : 25
Enter the criteria condition.
value
JSONArray
max length : 10000 array size : >=0
Enter the criteria values.
pattern
String
max length : 300
Specify the filter pattern
sort_by
String
Enter the sort criteria. Accepted values: ASC(field_name) or DESC(field_name). Available fields: first_name, last_name, portal_profile, role, rate_per_hour, cost_rate_per_hour, business_hours, added_time, updated_time, last_accessed_on, and the api_name of a custom field.
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
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.1/portal/[PORTAL_ID]/users?type=portal_user&view_type=active&page=1&per_page=10&filter=%7B%22criteria%22%3A%5B%7B%22module%22%3A%22-%22%2C%22field_name%22%3A%22name%22%2C%22module_name%22%3A%22task%22%2C%22criteria_condition%22%3A%22contains%22%2C%22value%22%3A%5B%22Monica%22%5D%7D%5D%2C%22pattern%22%3A%221%22%7D&sort_by=ASC%28first_name%29' \ -H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
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["type"] = "portal_user";
query["view_type"] = "active";
query["page"] = "1";
query["per_page"] = "10";
query["filter"] = "{\"criteria\":[{\"module\":\"-\",\"field_name\":\"name\",\"module_name\":\"task\",\"criteria_condition\":\"contains\",\"value\":[\"Monica\"]}],\"pattern\":\"1\"}";
query["sort_by"] = "ASC(first_name)";
var uriBuilder = new UriBuilder("https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/users") { 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);
open Lwt
open Cohttp_lwt_unix
let () =
let enc_type = Uri.pct_encode "portal_user" in
let enc_view_type = Uri.pct_encode "active" in
let enc_page = Uri.pct_encode "1" in
let enc_per_page = Uri.pct_encode "10" in
let enc_filter = Uri.pct_encode "{\"criteria\":[{\"module\":\"-\",\"field_name\":\"name\",\"module_name\":\"task\",\"criteria_condition\":\"contains\",\"value\":[\"Monica\"]}],\"pattern\":\"1\"}" in
let enc_sort_by = Uri.pct_encode "ASC(first_name)" in
let uri = Uri.of_string ("https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/users" ^ "?type=" ^ enc_type ^ "&view_type=" ^ enc_view_type ^ "&page=" ^ enc_page ^ "&per_page=" ^ enc_per_page ^ "&filter=" ^ enc_filter ^ "&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)
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.1/portal/[PORTAL_ID]/users/[USER_ID]");
var response = await client.SendAsync(request);
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
open Lwt
open Cohttp_lwt_unix
let () =
let uri = Uri.of_string "https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/users/[USER_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)
import Foundation
let url = URL(string: "https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/users/[USER_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()
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["next_token"] = "eJxLtDK0qi62srBUsgYADmkC1A";
query["filter"] = "{\"criteria\":[{\"field_name\":\"portal_profile\",\"criteria_condition\":\"is\",\"value\":[\"1752587000000097269\"]}],\"pattern\":\"1\"}";
query["page"] = "1";
query["per_page"] = "10";
var uriBuilder = new UriBuilder("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/users/[USER_ID]/audit-logs") { 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);
open Lwt
open Cohttp_lwt_unix
let () =
let enc_next_token = Uri.pct_encode "eJxLtDK0qi62srBUsgYADmkC1A" in
let enc_filter = Uri.pct_encode "{\"criteria\":[{\"field_name\":\"portal_profile\",\"criteria_condition\":\"is\",\"value\":[\"1752587000000097269\"]}],\"pattern\":\"1\"}" in
let enc_page = Uri.pct_encode "1" in
let enc_per_page = Uri.pct_encode "10" in
let uri = Uri.of_string ("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/users/[USER_ID]/audit-logs" ^ "?next_token=" ^ enc_next_token ^ "&filter=" ^ enc_filter ^ "&page=" ^ enc_page ^ "&per_page=" ^ enc_per_page) 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)
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";
var uriBuilder = new UriBuilder("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/users/[USER_ID]/teams") { 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);
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 uri = Uri.of_string ("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/users/[USER_ID]/teams" ^ "?page=" ^ enc_page ^ "&per_page=" ^ enc_per_page) 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)
Modify the details of an existing user in the Zoho Projects portal. The user_id segment accepts the user's ZPUID or email address.
PATCH
/api/v3.1/portal/[PORTAL_ID]/users/[USER_ID]
OAuth Scope:
ZohoProjects.users.UPDATE
Path Parameters
Param Name
Data Type
Description
portal_id
String
required regex : [0-9]+
Unique, immutable identifier of the portal in Zoho Projects.
You can obtain it from the Get Portals API (the "id" field in the response).
user_id
String
required regex : [0-9]+
Identifier of an user.
Obtained from the Get Users API - the "id" field in the response corresponds to user_id.
Body Parameters
Param Name
Data Type
Description
portal_profile
JSONObject
Enter the profile details.
id
String
max length : 30
Enter the profile ID.
You can obtain it from the Get Profiles API (the "id" field in the response).
role
JSONObject
Enter the role details.
id
String
max length : 30
Enter the role ID.
You can obtain it from the Get Roles API (the "id" field in the response).
reporting_to
JSONObject
Enter the reporting manager details.
id
String
max length : 30
Enter the reporting manager ID.
You can obtain it from the Get Portal Users API (the "id" field in the response).
business_hours
JSONObject
Enter the business hours details.
id
String
max length : 30
Enter the business hours ID.
You can obtain it from the Get Business Hours API (the "id" field in the response).
bulk_projects
JSONObject
max length : 200000
Enter the project details
select_all
boolean
Specify whether all projects should be selected. Accepted values: true, false.
selected
JSONObject
max length : 200000
Enter selected project details.
group_ids
JSONArray
max length : 200000 array size : 0-10000
Enter the project group IDs.
You can obtain it from the Get Project Groups API (the "id" field in the response).
project_ids
JSONArray
max length : 200000 array size : 0-10000
Enter the project IDs.
You can obtain it from the Get Projects API (the "id" field in the response).
unselected
JSONObject
max length : 200000
Enter unselected project details.
group_ids
JSONArray
max length : 200000 array size : 0-10000
Enter the project group IDs.
You can obtain it from the Get Project Groups API (the "id" field in the response).
project_ids
JSONArray
max length : 200000 array size : 0-10000
Enter the project IDs.
You can obtain it from the Get Projects API (the "id" field in the response).
rateupdatedprojects
JSONObject
max length : 200000
Enter projects with the user’s rate per hour in JSON format.({"Project System ID":"Rate per hour"})E.g. {"21446000000471005":"20","21446000000471111":"20"}
costrateupdatedprojects
JSONObject
max length : 200000
Enter projects with the user’s cost per hour in JSON format. ({"Project System ID":"Cost per hour"})E.g.{"21446000000471005":"15","21446000000471111":"15"}
budget
JSONObject
Enter the budget details.
rate_per_hour
JSONObject
Enter the invoice rate, e.g., $30 per hour.
amount
double
Enter the amount.
cost_rate_per_hour
JSONObject
Enter the cost per hour, e.g., $15 per hour.
amount
double
Enter the amount.
cost_effective_from_date
String
Date from which changes to Cost Per Hour should take effect.
apply_portal_rate
boolean
Specify whether the user rate applies at the portal level. Accepted values: true, false
notify
boolean
Specify whether the user should be notified about updates. Accepted values: true, false.
skills
JSONArray
max length : 500000
Enter the skill association details for the user.
add
JSONArray
max length : 100000
Enter the skills to associate with the user.
id
String
required
Enter the skill ID.
level
String
regex : beginner|intermediate|advanced
Enter the proficiency level of the skill. Accepted values: beginner, intermediate, advanced
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.1/portal/[PORTAL_ID]/users/[USER_ID]");
request.Content = new StringContent(
@"{""portal_profile"":{""id"":""23806000006123455432""},""role"":{""id"":""23806000006123455432""},""reporting_to"":{""id"":""23806000006123455432""},""business_hours"":{""id"":""23806000006123455432""},""bulk_projects"":{""select_all"":false,""selected"":{""group_ids"":[""2380600000612345""],""project_ids"":[""23806000074760021""]},""unselected"":{""group_ids"":[""2380600000612345""],""project_ids"":[""23806000074760021""]},""rateupdatedprojects"":{""23806000074760021"":""20""},""costrateupdatedprojects"":{""23806000074760021"":""15""}},""budget"":{""rate_per_hour"":{""amount"":945.25},""cost_rate_per_hour"":{""amount"":510.75},""cost_effective_from_date"":""2024-08-21""},""apply_portal_rate"":false,""notify"":true,""skills"":[{""add"":[{""id"":""8000000123001"",""level"":""intermediate""}],""remove"":[{""id"":""8000000123002""}]}]}",
Encoding.UTF8,
"application/json"
);
var response = await client.SendAsync(request);
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
open Lwt
open Cohttp_lwt_unix
let () =
let uri = Uri.of_string "https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/users/[USER_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|{"portal_profile":{"id":"23806000006123455432"},"role":{"id":"23806000006123455432"},"reporting_to":{"id":"23806000006123455432"},"business_hours":{"id":"23806000006123455432"},"bulk_projects":{"select_all":false,"selected":{"group_ids":["2380600000612345"],"project_ids":["23806000074760021"]},"unselected":{"group_ids":["2380600000612345"],"project_ids":["23806000074760021"]},"rateupdatedprojects":{"23806000074760021":"20"},"costrateupdatedprojects":{"23806000074760021":"15"}},"budget":{"rate_per_hour":{"amount":945.25},"cost_rate_per_hour":{"amount":510.75},"cost_effective_from_date":"2024-08-21"},"apply_portal_rate":false,"notify":true,"skills":[{"add":[{"id":"8000000123001","level":"intermediate"}],"remove":[{"id":"8000000123002"}]}]}|json} in
Lwt_main.run (
Client.patch ~headers ~body uri >>= fun (_, body) ->
Cohttp_lwt.Body.to_string body >|= fun s ->
print_endline s)
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["users"] = "[{\"id\":\"23806000006123455432\",\"portal_profile\":{\"id\":\"23806000006123455432\"},\"role\":{\"id\":\"23806000006123455432\"},\"reporting_to\":{\"id\":\"23806000006123455432\"},\"business_hours\":{\"id\":\"23806000006123455432\"},\"budget\":{\"rate_per_hour\":{\"amount\":\"-\"},\"cost_rate_per_hour\":{\"amount\":\"-\"},\"cost_effective_from_date\":\"2024-08-21\"}}]";
var uriBuilder = new UriBuilder("https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/users") { Query = query.ToString() };
var request = new HttpRequestMessage(HttpMethod.Post, uriBuilder.Uri);
var response = await client.SendAsync(request);
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
open Lwt
open Cohttp_lwt_unix
let () =
let enc_users = Uri.pct_encode "[{\"id\":\"23806000006123455432\",\"portal_profile\":{\"id\":\"23806000006123455432\"},\"role\":{\"id\":\"23806000006123455432\"},\"reporting_to\":{\"id\":\"23806000006123455432\"},\"business_hours\":{\"id\":\"23806000006123455432\"},\"budget\":{\"rate_per_hour\":{\"amount\":\"-\"},\"cost_rate_per_hour\":{\"amount\":\"-\"},\"cost_effective_from_date\":\"2024-08-21\"}}]" in
let uri = Uri.of_string ("https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/users" ^ "?users=" ^ enc_users) in
let headers = Cohttp.Header.init ()
|> fun h -> Cohttp.Header.add h "Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
in
Lwt_main.run (
Client.post ~headers uri >>= fun (_, body) ->
Cohttp_lwt.Body.to_string body >|= fun s ->
print_endline s)