Skip to main content

Update

Description#

Update a template.

Request#

HTTP Method: PUT

Query ParameterDescription
nameName of template.
descriptionTemplate description.
vendorVendor name.
productProduct name.
agent_typeAction Type. One of Email, Trigger, Event Transformation, IMAP, Webhook, HTTP Request, Send to Story
agent_optionsJSON object with action options.
Path ParameterDescription
template-idID of the template.
curl -X PUT \  http://<tenant-domain>/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": "{{.text}}",                "regexp": "\\b[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,4}\\b",                "to": "email_addresses"            },            {                "path": "{{.text}}",                "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#

ParameterDescription
updatedAtRecord update date time.
objectIDTemplate ID.

Sample response#

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