Sign in

Create template

documented

Create a reusable template for push, email, or SMS messages.

POST /templatesTemplatesno 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" \
  -X POST \
  -H "Authorization: Key {{ONESIGNAL_API_KEY}}" \
  -H "Content-Type: application/json" \
  -d '{"app_id":"{{$app_id}}","name":"{{$template_name}}","contents":{"en":"{{$contents_en}}"},"isEmail":{{$is_email}},"email_subject":"{{$email_subject}}","email_body":"{{$email_body}}","isSMS":{{$is_sms}},"dynamic_content":"{{$dynamic_content}}"}'