curl -X DELETE "https://api.mailgreet.com/api/v1/external/subscribers/550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer YOUR_API_KEY"
const subscriberId = '550e8400-e29b-41d4-a716-446655440000';
const response = await fetch(
`https://api.mailgreet.com/api/v1/external/subscribers/${subscriberId}`,
{
method: 'DELETE',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
}
);
const data = await response.json();
console.log(data);
import requests
subscriber_id = '550e8400-e29b-41d4-a716-446655440000'
response = requests.delete(
f'https://api.mailgreet.com/api/v1/external/subscribers/{subscriber_id}',
headers={'Authorization': 'Bearer YOUR_API_KEY'}
)
print(response.json())
<?php
$subscriberId = '550e8400-e29b-41d4-a716-446655440000';
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => "https://api.mailgreet.com/api/v1/external/subscribers/{$subscriberId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_KEY'
]
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
{
"success": true,
"message": "Subscriber deleted successfully"
}
{
"success": false,
"error": "Subscriber not found"
}
{
"success": false,
"error": "Invalid or missing API key"
}
Subscribers
Delete Subscriber
Permanently remove a subscriber from your mailing list
DELETE
/
api
/
v1
/
external
/
subscribers
/
{subscriberId}
curl -X DELETE "https://api.mailgreet.com/api/v1/external/subscribers/550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer YOUR_API_KEY"
const subscriberId = '550e8400-e29b-41d4-a716-446655440000';
const response = await fetch(
`https://api.mailgreet.com/api/v1/external/subscribers/${subscriberId}`,
{
method: 'DELETE',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
}
);
const data = await response.json();
console.log(data);
import requests
subscriber_id = '550e8400-e29b-41d4-a716-446655440000'
response = requests.delete(
f'https://api.mailgreet.com/api/v1/external/subscribers/{subscriber_id}',
headers={'Authorization': 'Bearer YOUR_API_KEY'}
)
print(response.json())
<?php
$subscriberId = '550e8400-e29b-41d4-a716-446655440000';
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => "https://api.mailgreet.com/api/v1/external/subscribers/{$subscriberId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_KEY'
]
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
{
"success": true,
"message": "Subscriber deleted successfully"
}
{
"success": false,
"error": "Subscriber not found"
}
{
"success": false,
"error": "Invalid or missing API key"
}
Overview
Permanently delete a subscriber from your MailGreet account. This action cannot be undone.This is a destructive action. Once deleted, the subscriber and all associated data (engagement history, custom field values, group memberships) will be permanently removed.
Authentication
string
required
Bearer token. Format:
Bearer YOUR_API_KEYPath Parameters
string
required
The unique identifier (UUID) of the subscriber to delete.Example:
550e8400-e29b-41d4-a716-446655440000Response
boolean
Indicates if the subscriber was deleted successfully
string
Confirmation message
curl -X DELETE "https://api.mailgreet.com/api/v1/external/subscribers/550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer YOUR_API_KEY"
const subscriberId = '550e8400-e29b-41d4-a716-446655440000';
const response = await fetch(
`https://api.mailgreet.com/api/v1/external/subscribers/${subscriberId}`,
{
method: 'DELETE',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
}
);
const data = await response.json();
console.log(data);
import requests
subscriber_id = '550e8400-e29b-41d4-a716-446655440000'
response = requests.delete(
f'https://api.mailgreet.com/api/v1/external/subscribers/{subscriber_id}',
headers={'Authorization': 'Bearer YOUR_API_KEY'}
)
print(response.json())
<?php
$subscriberId = '550e8400-e29b-41d4-a716-446655440000';
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => "https://api.mailgreet.com/api/v1/external/subscribers/{$subscriberId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_KEY'
]
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
{
"success": true,
"message": "Subscriber deleted successfully"
}
{
"success": false,
"error": "Subscriber not found"
}
{
"success": false,
"error": "Invalid or missing API key"
}
Best Practices
Consider unsubscribing instead of deleting: If you want to stop sending emails to a subscriber but keep their data for analytics, use the Update Subscriber endpoint to set their status to
unsubscribed instead of deleting them.When to Delete vs Unsubscribe
| Action | Use Case |
|---|---|
| Delete | GDPR/data deletion requests, duplicate records, test data cleanup |
| Unsubscribe | User opts out, temporary pause, compliance requirements |

