Description

Update a template.

Request

HTTP Method: PUT

Query Parameter Description
name Name of template.
description Template description.
vendor Vendor name.
product Product name.
agent_type Agent Type. One of Email, Trigger, Event Transformation, IMAP, Webhook, HTTP Request, Send to Story
agent_options JSON object with agent options.
Path Parameter Description
template-id ID of the template.
curl -X PUT \
  http://<tenant-name>.tines.io/api/v1/admin/templates/<template-id> \
  -H 'content-type: application/json' \
  -H 'x-user-email: <email-address>' \
  -H 'x-user-token: <api-token>'\
  -d '{
    "name": "Name+Update",
    "description": "test+Update",
    "agent_type": "Email",
    "vendor": "API+Update",
    "product": "AP+UpdateI",
    "agent_options": {
        "mode": "extract+Update",
        "matchers": [
            {
                "path": "",
                "regexp": "\\b[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,4}\\b",
                "to": "email_addresses"
            },
            {
                "path": "",
                "regexp": "https?:\\/\\/[\\S]+",
                "to": "urls"
            }
        ],
        "message": "This is an optional message+Update"
    }
}'

Response

A successful request will return a JSON Array containing a template ID.

Field description

Parameter Description
updatedAt Record update date time.
objectID Template ID.

Sample response

 {
    "updatedAt": "2019-09-20T04:29:55.571Z",
    "taskID": 6055522910,
    "objectID": "447785631"
 }