Update

Description

Update a private template.

Request

HTTP Method: PUT

Query Parameter Description
name Name of template.
description Template description.
vendor Vendor name.
product Product name.
agent_type Type of action to create:
Agents::EmailAgent
Agents::EventTransformationAgent
Agents::HTTPRequestAgent
Agents::IMAPAgent
Agents::TriggerAgent
Agents::WebhookAgent
Agents::SendToStoryAgent
agent_options JSON object with action options.
Path Parameter Description
template_id ID of the template.
curl -X PUT \
  http://<<META.tenant.domain>>/api/v1/admin/templates/<<template_id>> \
  -H 'content-type: application/json' \
  -H 'Authorization: Bearer <<CREDENTIAL.tines_api_key>>'\
  -d '{
    "name": "Name+Update",
    "description": "test+Update",
    "agent_type": "Agents::EmailAgent",
    "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 true value in the body with a 200 status.

Was this helpful?