New Contact - tsubotitsch/Brevo GitHub Wiki
Creates a new contact in Brevo with the specified details.
New-Contact [-Email] <String> [[-ext_id] <String>] [[-ListIds] <Int32[]>] [[-attributes] <Object>]
[-emailBlacklisted] [-smsBlacklisted] [-updateEnabled] [[-smtpBlacklistSender] <String[]>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
The `New-Contact` function allows you to create a new contact in Brevo by providing details such as email, list IDs, attributes, and other optional parameters. It supports updating an existing contact if the `-updateEnabled` switch is set.
# Create a new contact with mandatory and optional parameters
New-Contact -Email "[email protected]" -ListIds 1,2 -Attributes @{"FIRSTNAME"="John"; "LASTNAME"="Doe"} -updateEnabled
A hashtable containing attributes and their values for the contact. The attributes should be passed in uppercase letters. Ensure the attributes exist in your Brevo account. For example: `-attributes @{"FIRSTNAME"="John"; "LASTNAME"="Doe"}`.
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The email address of the contact. This parameter is mandatory.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
A switch to blacklist the contact for emails. This parameter is optional.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
An optional external ID to associate with the contact.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The IDs of the contact list(s) to which the contact will be added. This parameter is optional.
Type: Int32[]
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
{{ Fill ProgressAction Description }}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
A switch to blacklist the contact for SMS. This parameter is optional.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
An array of transactional email forbidden senders for the contact. This is only applicable if `-updateEnabled:$true`.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
A switch to enable updating an existing contact in the same request. Default is `$false`.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.