Skip to main content

Prerequisites

Before you start, make sure you have:
  • Python installed on your computer
  • Internet connection
  • A microphone and speakers/headphones
  • An account on SuperU

Getting Started

1

Sign Up and Get Your API Key

  1. Go to workspace.superu.ai/ and sign up for an account
  2. After signing up, visit your dashboard
  3. Copy your API key from the dashboard
For security, store your API key in an environment variable instead of hard-coding it in your code.

Setup & Configuration

1

Install Dependencies

Open your terminal and run the appropriate command for your operating system:
# Windows
pip install superu

# macOS/Linux
pip3 install superu
2

Create Contact

import superu

superu_client = superu.SuperU('<YOUR API KEY>')

superu_client.contacts.create({
  'first_name': 'John',
  'last_name': 'Doe',
  'email': '[email protected]',
  'country_code': '+1',
  'phone_number': '1234567890'
})
3

Create Audience

An audience is a collection of contacts grouped together for targeted communication or management.
import superu

superu_client = superu.SuperU('<YOUR API KEY>')

audience = superu_client.contacts.create_audience(audience_name = "Test Audience" ,  audience_description="Test Audience for Contacts" , contacts = [
  {
     'first_name': 'John',
     'last_name': 'Doe',
     'email': '[email protected]',
     'country_code': '+1',
     'phone_number': '1234567890'
 },
  {
       'first_name': 'Jane',
       'last_name': 'Smith',
       'email': '[email protected]',
       'country_code': '+1',
       'phone_number': '0987654321'
 }
])
4

List Contact

Iterate through contacts using pagination. The maximum page size is 100.
import superu

contacts_list = superu_client.contacts.list(page=1, page_size=5)
print(contacts_list)