# Bulk ## Delete `contacts.bulk.delete(BulkDeleteParams**kwargs) -> BulkDeleteResponse` **delete** `/api/v2/contacts` Delete multiple contacts by their IDs ### Parameters - `contact_ids: SequenceNotStr[str]` Array of phone numbers in E.164 format to delete ### Returns - `class BulkDeleteResponse: …` - `amount: Optional[int]` Number of contacts deleted - `status: Optional[str]` ### Example ```python 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) ``` ## Create `contacts.bulk.create(BulkCreateParams**kwargs) -> BulkCreateResponse` **post** `/api/v2/contacts/bulk` Create multiple contacts in bulk ### Parameters - `contacts: Iterable[Contact]` - `phone: str` Phone number in E.164 format - `company_name: Optional[str]` Company name - `custom_variables: Optional[Dict[str, str]]` Custom key-value pairs. Keys are human-readable labels; new labels are auto-created. - `first_name: Optional[str]` Contact's first name - `last_name: Optional[str]` Contact's last name - `tags: Optional[SequenceNotStr[str]]` ### Returns - `class BulkCreateResponse: …` - `contacts: Optional[List[Contact]]` - `assigned_to_email: Optional[str]` Email of assigned user - `company_name: Optional[str]` Company name - `created_at: Optional[datetime]` When the contact was created - `custom_variables: Optional[Dict[str, str]]` Custom key-value pairs stored on the contact. Keys are human-readable labels. - `first_name: Optional[str]` First name - `last_name: Optional[str]` Last name - `phone: Optional[str]` Phone number in E.164 format - `sendblue_number: Optional[str]` Associated Sendblue phone number - `tags: Optional[List[str]]` Tags associated with the contact - `verified: Optional[bool]` Whether the contact is verified - `status: Optional[str]` ### Example ```python 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.create( contacts=[{ "phone": "phone" }], ) print(bulk.contacts) ```