1. Users
  2. Delete Users

Users

Delete Users

Delete User

DELETE
`/v1/users/:user`

Delete a single user using its id.

js
        const response = await fetch(`https://api.packagex.io/v1/users/${user_id}`, {
  method: "GET",
  headers: {
    "PX-API-KEY": process.env.PX_API_KEY,
    "Content-Type": "application/json",
  },
}).then((res) => res.json());

      

Delete User Notifications

DELETE
`/v1/users/:user/notifications`

Delete the notifications of a user using user_id

js
        const response = await fetch(`https://api.packagex.io/v1/users/${user_id}/notifications`, {
  method: "GET",
  headers: {
    "PX-API-KEY": process.env.PX_API_KEY,
    "Content-Type": "application/json",
  },
}).then((res) => res.json());

      

Delete FCM Token

DELETE
`/v1/users/:user/tokens/:token`

Delete the FCM token for a user using user_id

js
        const response = await fetch(`https://api.packagex.io/v1/users/${user_id}/tokens/${token_id}`, {
  method: "GET",
  headers: {
    "PX-API-KEY": process.env.PX_API_KEY,
    "Content-Type": "application/json",
  },
}).then((res) => res.json());