Delete member push notification token

DELETE /api/members/{memberID}/push-notification-token

Overview

Unregisters a member's device from push notifications by deleting the stored device token. Call this when a member signs out of your app, uninstalls it, or opts out of notifications — otherwise the platform keeps sending to a token that is no longer valid.

A member can hold several registrations at once, one per app bundle, plus at most one registration with no bundle at all. Which registrations this call removes depends on appBundleId:

That second rule is the trap: if the member's tokens were all registered with a bundle id and you call without one, nothing matches and you get 404 — not a silent success. Always send the same appBundleId you registered with.

A successful call returns 204 No Content.

Endpoint

DELETE {base_url}/api/members/{memberID}/push-notification-token

{base_url} is the environment URL issued to your integration. See Authenticating with Gladstone APIs.

Path parameters

NameTypeRequiredDescription
memberIDinteger (int32)YesThe member whose device registration you are removing. The member must exist — an unknown id gives 404 before any token lookup happens. When you call with a member-scoped token, this must be the member the token was issued for; linked members are not accepted here.

Query parameters

NameTypeRequiredDescription
appBundleIdstringNoThe bundle identifier of the app the device token was registered under — the same value you sent when creating the registration. It is lower-cased before matching, so case does not matter. Omit it (or send an empty or whitespace-only value, which is treated as omitted) to target the registration that has no bundle recorded; that will not match bundle-scoped registrations. There is no wildcard: you cannot remove every registration for a member in one call.

Sample request

cURL
curl -X DELETE '{base_url}/api/members/{memberID}/push-notification-token' \
  -H 'Authorization: Bearer {accessToken}' \
  -H 'X-Use-SSO: true'

Errors

StatusMeaningWhen
403ForbiddenThe token identifies a specific member and memberID is not that member. The body is The given member ID of {memberID} does not belong to the logged in member.
404Not foundmemberID does not exist. The body is The member does not exist.
404Not foundappBundleId was omitted and the member has no registration without a bundle id. The body is The member does not have any push notification preferences set. The member may still have bundle-scoped registrations — this is not proof that they have none.
404Not foundappBundleId was supplied and the member has no registration under that bundle. The body is The member does not have a push notification preference for the specified app bundle ID: {appBundleId}.
500Internal server errorAn unexpected server-side failure while reading or deleting the registration.

This page as markdown · All pages · llms.txt