Uninstall flow
When a user uninstalls your app, SendPulse sends a POST request with user data to the Uninstall URL you specified when creating your app.
Take a look at what the uninstall flow looks like:

Receive the uninstall request
SendPulse request example:
{
"id": "9b0f56dd-4f4d-4792-ae20-23f99659b69e",
"user_id": 7043663,
"app_id": "9b0fdd98-d75f-4562-887e-2b79bc8a1eee",
"client_id": "b2bfd8a8441294fa0171c195ada8cf56",
"client_secret": "f7064fb0bbecd392d7b3ea2e2bd77758",
"created_at": "2024-01-10T15:50:20.000000Z",
"updated_at": "2024-01-10T15:50:20.000000Z"
}
Request parameters:
id |
uuid | SendPulse user ID. |
user_id |
int | SendPulse account ID of the user who uninstalled the app. |
app_id |
uuid | Your app ID. Matches the App ID in your app settings. |
client_id* |
string | App user key. |
client_secret |
string | App user key. |
created_at |
datetime | Date and time when the first connection was created. |
updated_at |
datetime | Date and time when the last connection was updated. |
Verify the request
Before deleting anything, compare client_id and client_secret from the request with the values stored for this user in your database. If they don't match, reject the request.
Handle the request
Once you've verified the request, do the following:
- Delete all data related to this user: credentials, cached data, and settings.
- Respond with
200 OKquickly. If cleanup takes time, accept the request first and delete the data in the background. - Make sure your handler doesn't fail if the user's data has already been deleted.
Regardless of whether SendPulse receives 200 OK, the connection will be removed, and your app will no longer be able to interact with the user data through API.
or