Change record owner
Change the owner of a specific record or multiple records in a module.
Request URL
Bigin APIs are available across eight different domains, and you must choose the one relevant to your data center (DC):
For multiple records
- US
- EU
- AU
- IN
- CN
- JP
- SA
- CA
For a specific record
- US
- EU
- AU
- IN
- CN
- JP
- SA
- CA
Authorization
For this endpoint, pass the access token as an authorization header. See OAuth Authentication for more information about access tokens.
Authorization: Zoho-oauthtoken <ACCESS_TOKEN>
You must authenticate using an access token that is associated with one of the following scopes:
- ZohoBigin.change_owner.CREATE
Request parameters
The available request parameters are given below:
Path parameters
module_api_name stringRequired
The API name of the module. The possible modules for this endpoint and their API name are given below:
Module | API Name |
---|---|
Contacts | Contacts |
Pipelines | Pipelines |
Companies | Accounts |
Products | Products |
Tasks | Tasks |
Events | Events |
Calls | Calls |
record_id stringRequired
The unique identification of a record in a module. Use this when you want to change the owner of a specific record in a module. You can get the record ID from the Get records API.
Body parameters
ids jsonarrayRequired for multiple records
The record IDs in a module for which you want to change the owner. Use this when you want to change the owner of multiple records. A maximum of 500 record IDs can be given in a single API call. You can get the list of record IDs from the Get records API.
owner jsonobjectRequired
The JSON object represents the owner to which the record will be assigned. It contains the following properties:
id jsonobjectRequired
The unique identifier (owner id) of the owner. You can get the owner IDs from the Get users data API.
notify booleanOptional
By setting true or false, you can allow or restrict the email notification to be sent to the new owner when the record is assigned to them.
related_modules jsonobjectOptional
The API name of the modules such as events, tasks, or calls that are related to the record for which you want to change the owner.
Note:The owner of the records will be immediately updated, whereas the owner of related records (events, tasks, or calls) will be updated through the scheduler, which may cause a slight delay.
Sample request
Copiedcurl "https://www.zohoapis.com/bigin/v2/Pipelines/actions/change_owner" \
-X POST \
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf" \
-d "@newowner.json"
Copiednew_owner = Map();
new_owner.put("id", "Important");
new_owner.put("notify", "true");
owner_info = List();
owner_info.add(new_owner);
params = Map();
params.put("owner_info", owner_info);
response = invokeurl
[
url :"https://www.zohoapis.com/bigin/v2/contacts/actions/change_owner"
type :POST
parameters: params.toString()
connection:"connection_link_name"
];
info response;
Sample request body
Copied{
"ids": [
"1953910000001671009",
"1953910000001535045"
],
"owner": {
"id": "1908973000000463004"
},
"notify": true,
"related_modules": [
{
"api_name": "Tasks"
},
{
"api_name": "Events"
},
{
"api_name": "Calls"
}
]
}
Response object
The response object provides information regarding the success message or status.
Possible error codes
The response of this resource includes HTTP status and error codes.
Sample response
Copied{
"data": [
{
"code": "SUCCESS",
"details": {
"id": "1953910000001671009"
},
"message": "owner is successfully updated",
"status": "success"
},
{
"code": "SUCCESS",
"details": {
"id": "1953910000001535045"
},
"message": "owner is successfully updated",
"status": "success"
}
]
}