Update Default Organization Permissions

Purpose

To update your organization's default data-sharing permissions for modules.

Endpoints

  • PUT /settings/data_sharing

Request Details

Request URL

{api-domain}/crm/{version}/settings/data_sharing

Supported modules

Leads, Accounts, Contacts, Deals, Campaigns, Tasks, Cases, Meetings, Calls, Solutions, Products, Vendors, Price Books, Quotes, Sales Orders, Purchase Orders, Invoices, Appointments, Appointments Rescheduled History, Services and Custom modules.

Header

Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52

Scope

ZohoCRM.settings.data_sharing.UPDATE 
(or)
ZohoCRM.settings.data_sharing.ALL 

Sample Request

Copiedcurl "https://www.zohoapis.com/crm/v8/settings/data_sharing"
-X PUT
-d "@input.json"
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"

Input JSON

  • data_sharingJSON array, mandatory

    Contains the details of your organization's default data-sharing permissions for modules.

    • share_typestring, mandatory

      Represents the access levels available for each module in Zoho CRM. This key allows you to modify access levels for users as needed.
      Possible values:

      • private: Only the record owner and their superior can view the records in the module.
      • public_read_only: Users can view others' records but cannot modify or delete them.
      • public_read_write: Users can view and modify others' records but cannot delete them.
      • public: Users can view, modify, and delete others' records.
    • moduleJSON object

      Contains details of the module's API name and ID for which you want to change user access across your organization. Use the GET - Modules Metadata API to get module API names and IDs.

Note

You can modify data-sharing access for both system-defined and custom modules.

Sample Input

Copied{
    "data_sharing": [
        {
            "share_type": "public",
            "module": {
                "api_name": "Leads",
                "id": "2276164000000000125"
            }
        }
    ]
}

Possible Errors

  • INVALID_DATAHTTP 400
    • Invalid data given in the "module" key
      Resolution: Specify a valid value in the "module" key. Use the GET - Modules Metadata API to get module API names and IDs.
    • Invalid data given in the "share_type" key
      Resolution: Specify a valid values in the "share_type" key.
      Supported values: private, public_read_only, public_read_write, and public. Refer to the Input JSON section for details.
  • MANDATORY_NOT_FOUNDHTTP 400

    One or more mandatory keys are missing
    Resolution: Specify all mandatory keys in your input body. Refer to the Input JSON section for details.

  • INVALID_REQUEST_METHODHTTP 400

    The http request method type is not a valid one
    Resolution: You have specified an invalid HTTP method to access the API URL.
    Specify a valid request method. Refer to the Endpoints section.

  • OAUTH_SCOPE_MISMATCHHTTP 401

    Unauthorized
    Resolution: The client does not have a valid scope to update organization's data sharing permission. Create a new token with valid scope. Refer to the Scope section for details.

  • AUTHENTICATION_FAILUREHTTP 401

    Authentication failed
    Resolution: Pass the access token in the request header of the API call.

  • INVALID_URL_PATTERNHTTP 404

    Please check if the URL trying to access is a correct one
    Resolution: The request URL specified is incorrect. Specify a valid request URL. Refer to the Request URL section for details. Refer to the request URL section above.

  • INTERNAL_ERRORHTTP 500

    Internal Server Error
    Resolution: Unexpected and unhandled exception in the server. Contact support team.

Sample Response

Copied{
    "data_sharing": [
        {
            "code": "SUCCESS",
            "details": {
                "module": "Leads"
            },
            "message": "data sharing settings updated successfully",
            "status": "success"
        }
    ]
}