Sign in

Update subscription by token

documented

Update a subscription identified by its token.

PATCH /apps/{app_id}/subscriptions_by_token/{token_type}/{token}Subscriptionsno 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/apps/{{$app_id}}/subscriptions_by_token/{{$token_type}}/{{$token}}" \
  -X PATCH \
  -H "Authorization: Key {{ONESIGNAL_API_KEY}}" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{"subscription": {"enabled": {{$enabled}}, "notification_types": {{$notification_types}}, "session_time": {{$session_time}}, "session_count": {{$session_count}}, "app_version": "{{$app_version}}", "device_model": "{{$device_model}}", "device_os": "{{$device_os}}", "test_type": {{$test_type}}, "sdk": "{{$sdk}}", "rooted": {{$rooted}}, "web_auth": "{{$web_auth}}", "web_p256": "{{$web_p256}}"}}' }