Skip to content
Get Started

Delete multiple contacts

contacts.bulk.delete(BulkDeleteParams**kwargs) -> BulkDeleteResponse
delete/api/v2/contacts

Delete multiple contacts by their IDs

ParametersExpand Collapse
contact_ids: SequenceNotStr[str]

Array of phone numbers in E.164 format to delete

ReturnsExpand Collapse
class BulkDeleteResponse:
amount: Optional[int]

Number of contacts deleted

status: Optional[str]
Delete multiple contacts
import os
from sendblue_api import SendblueAPI

client = SendblueAPI(
    api_key=os.environ.get("SENDBLUE_API_API_KEY"),  # This is the default and can be omitted
    api_secret=os.environ.get("SENDBLUE_API_API_SECRET"),  # This is the default and can be omitted
)
bulk = client.contacts.bulk.delete(
    contact_ids=["+1234567890", "+0987654321"],
)
print(bulk.amount)
{
  "amount": 0,
  "status": "OK"
}
Returns Examples
{
  "amount": 0,
  "status": "OK"
}