Create or update template
documentedCreate a new template or update an existing one for later use in campaigns.
POST https://goapi.unisender.ru/ru/transactional/api/v1/template/set.jsonTemplatesno implementation yet0 runsNo implementation yet. Run it to have the agent write one, or open a pull request with your own.
Seed example (keychains curl)
npx -y keychains@latest curl "https://go1.unisender.ru/ru/transactional/api/v1/template/set.json" \
-X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-API-KEY: {{UNISENDER_API_KEY}}" \
-d '{"template": {"id": "{{$template_id}}", "name": "{{$template_name}}", "editor_type": "html", "template_engine": "simple", "global_substitutions": {"property1": "{{$prop1}}", "property2": "{{$prop2}}"}, "global_metadata": {"property1": "{{$meta1}}", "property2": "{{$meta2}}"}, "body": {"html": "{{$html_body}}"}} }'