Delete Automation Tasks

Purpose

To delete automation tasks configured in your Zoho CRM account.

Endpoints

  • DELETE /settings/automation/tasks/{task_ID}
  • DELETE /settings/automation/tasks?ids={task_ID1},{task_ID2},..

Request Details

Request URL

To delete a specific task:
{api-domain}/crm/{version}/settings/automation/tasks/{task_ID}

To delete multiple tasks:
{api-domain}/crm/{version}/settings/automation/tasks?ids={task_ID1},{task_ID2},..

Supported modules

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

Header

Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52

Scope

ZohoCRM.settings.automation_actions.{operation_type}

Possible operation types

ALL - Full access to tasks
DELETE - Delete tasks

Parameters

  • ids string, optional

    It represents the unique ID of the task that you want to delete. Skip this parameter if you have specified the ID in the request URL. You can pass upto 10 comma-separated IDs in this parameter.

Sample Request

Copiedcurl "https://www.zohoapis.com/crm/v8/settings/automation/tasks?ids=6660682000001465116,6660682000001475001,6660682000001475001"
-X DELETE
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"

Possible Errors

  • Multi-StatusHTTP 400

    Resolution: The API is partially successful. Some tasks are deleted. Check error message of the failed tasks, resolve them and try again.

  • INTERNAL_ERRORHTTP 400

    Unexpected and unhandled exception in Server.
    Resolution: Contact support team.

  • INVALID_REQUEST_METHODHTTP 400

    Invalid HTTP method to access the API URL.
    Resolution: Check the HTTP Method of the request.

  • NO_PERMISSIONHTTP 400

    Permission denied.
    Resolution: This error occurs when the user doesn't have permission. Contact administrator to obtain manage workflow permission.

  • CANNOT_DELETE HTTP 400

    The specified task is associated with rule.

    Resolution: You can delete the task after disassociating it from the corresponding automation.

  • LIMIT_EXCEEDED HTTP 400

    Bulk deletion of records limit reached.

    Resolution: Maximum number of IDs that can be passed in the parameter is 10. This error occurs when more than 10 tasks are passed in the IDs parameter.

  • REQUIRED_PARAM_MISSING HTTP 400

    One of the expected parameter is missing.

    Resolution: This error occurs when bulk deletion is tried without passing the IDs parameter.

  • NOT_ALLOWEDHTTP 400

    Task is associated with at least one of Approval Process/Workflow Rules/Blueprint
    Resolution:You can delete the task after disassociating it from the corresponding automation.

  • INVALID_DATAHTTP 400

    The id given seems to be invalid
    Resolution: Provide correct ID and try again.

  • OAUTH_SCOPE_MISMATCHHTTP 401

    You do not have the scope required to use this API.
    Resolution: Use the correct scope and generate the grant and access tokens.

Sample Response

Copied{
    "tasks": [
        {
            "code": "SUCCESS",
            "details": {
                "id": "6660682000001465116"
            },
            "message": "task deleted successfully",
            "status": "success"
        },
        {
            "code": "SUCCESS",
            "details": {
                "id": "6660682000001475001"
            },
            "message": "task deleted successfully",
            "status": "success"
        },
        {
            "code": "SUCCESS",
            "details": {
                "id": "6660682000001475001"
            },
            "message": "task deleted successfully",
            "status": "success"
        }
    ]
}