Deleting Integration Users
When one of your users deletes their account in your application, delete their connected music service account from MusicAPI as well. One call from your backend does it.
Endpoint
DELETE /public/integrations/user/{userModelUUID}
userModelUUID is the integrationUserUUID you received in the authentication callback.
Example Request
curl -X DELETE "https://api.musicapi.com/public/integrations/user/e892f4a5-887f-4df5-9062-f8e3fff8c68a" \
-H 'Authorization: Basic [BASE64_ENCODED_CLIENT_CREDENTIALS]'
Responses
| Status | Meaning |
|---|---|
204 | The user is deleted. The response has no body. |
400 | userModelUUID is not a valid UUID. |
401 | The request has no credentials. |
403 | The request does not use Client Secret authentication. |
404 | Your account has no integration user with this UUID. |
The call is idempotent. Deleting a user you already deleted returns 204 again, so you can retry safely.
What Gets Deleted
- The music service access and refresh tokens. MusicAPI can no longer act for this user.
- The user's name, email and profile image.
- The copy of the user's library that the Transfer Service keeps.
MusicAPI keeps the UUID, the music service's own user ID and the country code, so your usage statistics and transfer history stay correct. None of these identify a person on their own.
Deleting the user in MusicAPI does not revoke the permission at the music service. Your user can remove the app in the connected apps section of their music service account.
If the same person connects the same music service account again later, they get the same integrationUserUUID back.
Security Requirements
This endpoint requires Client Secret authentication and must only be called from your secure backend servers. Requests authenticated with a Client ID, a Dev Token or a oneTimeToken get 403.