Create SMS
documentedCreate and deliver an SMS notification.
POST /notifications?c=smsMessagesno 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://api.onesignal.com/notifications?c=sms" \
-X POST \
-H "Authorization: Key {{ONESIGNAL_API_KEY}}" \
-H "Content-Type: application/json" \
-d '{
"app_id": "{{$app_id}}",
"contents": {"en": "{{$contents_en}}"},
"target_channel": "sms",
"include_aliases": {"external_id": ["{{$external_id}}"]},
"include_subscription_ids": ["{{$subscription_id}}"],
"include_phone_numbers": ["{{$phone_number}}"],
"included_segments": ["{{$included_segments}}"],
"excluded_segments": ["{{$excluded_segments}}"],
"filters": [
{"field": "tag", "relation": "=", "key": "{{$tag_key}}", "value": "{{$tag_value}}"}
],
"sms_from": "{{$sms_from}}",
"sms_media_urls": ["{{$sms_media_url}}"],
"name": "{{$name}}",
"template_id": "{{$template_id}}",
"custom_data": {{$custom_data}},
"send_after": "{{$send_after}}",
"idempotency_key": "{{$idempotency_key}}"
}'