Update Task Templates

This is a PUT request

URL: https://onfleet.com/api/v2/cfGroups/task/templateId

This endpoint is provided to modified existing templates.

curl -i -X PUT "https://onfleet.com/api/v2/cfGroups/task/9YJ9A2VptE*m*tHhd2hcBw6a" \
     -u "<your_api_key>:" \
		 -d '{"name": "example update","fields":["newTest","c1"]}'
{
    "id": "9YJ9A2VptE*m*tHhd2hcBw6a",
    "name": "example update",
    "deletedAt": null,
    "contextSaveConditions": [],
    "fields": [
        "newTest",
        "c1"
    ],
    "isDefault": false
}
📘

For Updating a template

The fields array is required in all update requests. Even when updating only the name, you must provide the current fields array to preserve its existing values.