AdToBrevo/modules/ApiService.ps1
Administration e01fda900c WIP
2025-12-04 19:54:20 +01:00

17 lines
456 B
PowerShell

function GetContactsFromListBrevo {
$headers = @{
"accept" = "application/json"
"api-key" = ""
}
$response = Invoke-WebRequest `
-Uri 'https://api.brevo.com/v3/contacts/lists/9/contacts?limit=50&offset=0&sort=desc' `
-Method GET `
-Headers $headers
return $response.Content | ConvertFrom-Json
}
$contacts = GetContactsFromListBrevo
$contacts.count
$contacts.contacts | ForEach-Object { $_.email }