Sign in

Update template

documented

Update an existing template.

PATCH /templates/{template_id}Templatesno implementation yet0 runs
No 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://api.onesignal.com/templates/{{$template_id}}?app_id={{$app_id}}" \
  -X PATCH \
  -H "Authorization: Key {{ONESIGNAL_API_KEY}}" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{"name": "{{$template_name}}", "contents": {"en": "{{$contents_en}}"}, "isEmail": {{$isEmail}}, "email_body": "{{$email_body}}", "isSMS": {{$isSMS}}, "dynamic_content": "{\\\"campaign_id\\\": {\\\"A\\\": {\\\"title\\\": \\"{{$title}}\\\", \\"message\\\": \\"{{$message}}\\\", \\"url\\\": \\"{{$url}}\\\"}}}"}'