Skip to content
Get Started

Get contact count

contacts.count() -> ContactCountResponse
get/api/v2/contacts/count

Get the total number of contacts

ReturnsExpand Collapse
class ContactCountResponse:
count: Optional[int]

Total number of contacts

Get contact count
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
)
response = client.contacts.count()
print(response.count)
{
  "count": 0
}
Returns Examples
{
  "count": 0
}