PlayerDevice

Replaces the PlayerDevice resource.

Replaces the PlayerDevice resource.

put/players/{id}/devices

Request

  • Base URL: https://api.spash.com
  • URL: https://api.spash.com/players/{id}/devices
  • Auth: one of:
    • API key in header Authorization
    • HTTP bearer

Path parameters

idstring required

PlayerDevice identifier

Request body

deviceIdstring
fcmTokenstring required
platform'ios' | 'android' | 'web'
notificationPermission'unknown' | 'not_determined' | 'granted' | 'denied' | 'provisional' | 'ephemeral'
appVersionstring nullable
osVersionstring nullable
localestring nullable

The locale of the device. ICU format: en_US, fr_FR, etc. @see https://unicode-org.github.io/icu/userguide/locale/

timezonestring nullable

The timezone of the device. @see https://www.php.net/manual/en/timezones.php

Example request

{
  "notificationPermission": "unknown"
}

Response

PlayerDevice resource updated

idinteger
platform'ios' | 'android' | 'web'
pushEnabledboolean
notificationPermission'unknown' | 'not_determined' | 'granted' | 'denied' | 'provisional' | 'ephemeral'
appVersionstring nullable
lastSeenAtstring date-time nullable
revokedAtstring date-time nullable
createdAtstring date-time
updatedAtstring date-time

Example response

{
  "pushEnabled": true,
  "notificationPermission": "unknown",
  "createdAt": "CURRENT_TIMESTAMP",
  "updatedAt": "CURRENT_TIMESTAMP"
}

Changes

No recorded changes to this operation across all 1 revision of this API.