Skip to content
Navigation

Unsubscribe devices from a topic

Remove devices from one of your app's topics.

Idempotent from the caller's side — unsubscribing a device that was never subscribed succeeds.

POST
https://truememory-api.mvstg.com/notifications/topics/{topic}/unsubscribe
View as Markdown

Authorization

  • HTTPBearerHTTPrequired

Path parameters

  • topicstringrequired

    Topic name, unprefixed.

    maxLength: 900 · pattern: ^[a-zA-Z0-9\-_.~%]+$

Header parameters

  • X-App-Idoptional

    One of the following:

    • string
    • null
  • X-On-Behalf-Ofoptional

    One of the following:

    • string
    • null
  • X-External-User-Idoptional

    One of the following:

    • string
    • null

Request bodyJSONrequired

  • user_idsoptional

    Truememory user ids; resolved to registered devices for the calling app.

    One of the following:

    • array<string>
    • null
  • tokensoptional

    Raw FCM registration tokens.

    One of the following:

    • array<string>
    • null

Returns

200

Successful Response

JSON
  • topicstringrequired

    The app-namespaced topic FCM was given.

  • success_countintegerrequired
  • failure_countintegerrequired
  • resultsarray ofobjectrequired
    • targetstringrequired

      The registration token, topic, or condition sent to.

    • successbooleanrequired
    • user_idoptional

      Set when the target was resolved from the device registry.

      One of the following:

      • string
      • null
    • message_idoptional

      One of the following:

      • string
      • null
    • error_codeoptional

      FCM's error code, uppercased.

      One of the following:

      • string
      • null
    • erroroptional

      One of the following:

      • string
      • null
    • prunedoptionalboolean

      The token was dropped from the registry because FCM reports it dead.

      default: false
  • unreachable_user_idsoptionalarray ofstring

    Requested users with no device registered for this app.

  • pruned_token_countoptionalinteger
    default: 0

422

Validation Error
JSON
  • detailoptionalarray ofobject
    • locarray ofrequired

      One of the following:

      • string
      • integer
    • msgstringrequired
    • typestringrequired
    • inputoptionalunknown
    • ctxoptionalobject

Type to search…

↑↓ navigate↵ selectEsc close