Change Owner

Purpose

To change the owner of a single record or multiple records in Zoho CRM.

Endpoint

  • POST /{module_API_name}/actions/change_owner
  • POST /{module_API_name}/{record_ID}/actions/change_owner

Request Details

Request URL

For multiple records: 
{api-domain}/crm/{version}/{module_API_name}/actions/change_owner

For a single record: 
{api-domain}/crm/{version}/{module_API_name}/{record_ID}/actions/change_owner

Supported modules

Leads, Accounts, Contacts, Deals, Campaigns, Tasks, Cases, Events, Calls, Solutions, Products, Vendors, Price Books, Quotes, Sales Orders, Purchase Orders, Invoices, and Custom

Header

Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52

Scope

ZohoCRM.change_owner.CREATE

Sample Request

Copiedcurl "https://www.zohoapis.com/crm/v8/Leads/actions/change_owner"
-X POST
-H "Authorization: Zoho-oauthtoken 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
-d "@newdata.json"

Input JSON

  • idsJSON array, mandatory when you want to change the owner for multiple records

    Specify the IDs of the records whose ownership you want to change. You can include up to 500 record IDs in a single API call.

  • ownerJSON object, mandatory

    Provide the ID of the new owner to whom the record will be assigned.

  • related_modulesJSON object, optional

    The API names and record IDs of meetings, tasks, or calls that is related to the record. If specified, these related records will also be transferred to the new owner. Note that if you have specified both API name and the ID of the related module, and only one of them is valid, the system proceeds with the valid one. Unless specified, the ownership of these related records will not be transferred.

  • notifyBoolean, optional

    Represents whether you want to notify the new owner via an email when you assign the records.
    Possible values:
    false - The new owner will not be notified via email. This is the default value.
    true - The new owner will be notified via an email.

Sample Input

Copied{
  "ids": [
    "3652397000001935001",
    "3652397000001970024"
  ],
  "owner": {
    "id": "3652397000000281001"
  },
  "notify": true,
  "related_modules": [
    {
      "api_name": "Tasks",
      "id": "3652397000007399045"
    },
    {
      "api_name": "Events",
      "id": "3652397000001339059"
    }
  ]
}

Possible Errors

  • INVALID_REQUEST_METHODHTTP 400

    The request method is incorrect.
    Resolution: Use the HTTP POST method to make this API call. Any other request method will result in this error.

  • MANDATORY_NOT_FOUNDHTTP 400

    You have not specified either the IDs in the request body, or the "ids" array is empty, or you have not specified the owner's details.
    Resolution: The "ids" array is mandatory when you want to change the owner of multiple records. The Owner's ID is mandatory for this API. The "api_name" and "json_path" keys in the response give the details of what is missing in the input.

  • INVALID_DATAHTTP 400

    Either the ID of the owner or one or many IDs of the records in the "ids" array is invalid.
    Resolution: Specify valid values in the input.

  • NOT_SUPPORTEDHTTP 400

    You have specified an invalid module API name in the "related_modules" array, or the given module is not supported in this API.
    Resolution: Ensure you specify the correct API name for the module in the URL, or related module in the request body. Refer to the Supported Modules section for a list of modules compatible with this API. Ownership transfer is only allowed for related records of Tasks, Meetings, and Calls associated with the specified records.

  • EXPECTED_FIELD_MISSINGHTTP 400

    You have not specified either the API name or the ID of the related module.
    Resolution: Refer to the "expected_fields" array in the response for the API name and JSON path of the missing fields.

  • AMBIGUITY_DURING_PROCESSINGHTTP 400

    You have specified one or more incorrect values in the input.
    Resolution: Refer to the "ambiguity_due_to" array in the response for the API name and JSON path of the invalid data.

  • RECORD_LOCKEDHTTP 400

    You cannot perform this operation as the record is locked.
    Resolution: Please wait until the record is unlocked.

  • AUTHENTICATION_FAILUREHTTP 401

    You have not authorized the API call with valid access token.
    Resolution: Include a valid access token in the request header to authorize the API call.

  • OAUTH_SCOPE_MISMATCHHTTP 401

    The access token you have used to make this API call does not have the required scope.
    Resolution: Generate a new access token with the required scopes for this API. Refer to the Scope section at the beginning of this page for the list of required scopes.

  • INVALID_URL_PATTERNHTTP 404

    The request URL is incorrect.
    Resolution: Specify a valid request URL. Refer to the request URL section at the beginning of this page for more details.

  • INTERNAL_ERRORHTTP 500

    Unexpected and unhandled exception in the server. 
    Resolution: Contact the support team at support@zohocrm.com.

Sample Response

Copied{
  "data": [
    {
      "code": "SUCCESS",
      "details": {
        "id": "3652397000001935001"
      },
      "message": "owner is successfully updated",
      "status": "success"
    },
    {
      "code": "SUCCESS",
      "details": {
        "id": "3652397000001970024"
      },
      "message": "owner is successfully updated",
      "status": "success"
    }
  ]
}