Add/Update Customer

🚧

Note

• If the customer does not exist, they will be created and the response will be 201: Created
• If the customer already exists, then it will find and update the record and the response will be 200: OK

📘

Timezones

Acceptable timezones come in the form of TZ database values. You can find a full list of timezones on this page: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

Updating Customers

Updating a customer is done the same way adding a Customer is done. When you send us a POST request to this endpoint using a Phone Number we recognize, we automatically update any values that are transferred to us in the request.

🚧

Note

Phone Number is the unique identifier for each Customer and cannot currently be changed. All other Customer properties can be updated via this endpoint.

For example, if you add a Customer with the following properties:

{
"phone_number": "+13105551234", 
"email": "[email protected]", 
"first_name": "Matthew", 
"last_name": "Berman",
"picture_url": "http://where_the_pics_live.com/the_bermanator.png",
"properties": {"great_customer": "true"}
}

and then send us another POST to this endpoint with the following properties:

{
"phone_number": "+13105551234", 
"email": "[email protected]", 
"first_name": "John", 
}

the result will be a customer that looks like:

{
"phone_number": "+13105551234", 
"email": "[email protected]", 
"first_name": "John", 
"last_name": "Berman", 
"properties": {"great_customer": "true"}
}

📘

What Changed?

Notice the only changes to the customer were the fields that were provided other than phone_number (first_name and email).

📘

Country Code

Please always include a country code (such as +1 for US) in all API calls to us.

Body Params
string
required
Defaults to +13105551234

The phone number of the customer you want to add. This is the unique identifier for a customer.

string

Email address of the customer.

string

First name of the customer.

string

Last name of the customer.

string
Defaults to http://where_the_pics_live.com/the_bermanator.png

Link to the customer's picture so you can see their picture whe replying to them

boolean
Defaults to false

Whether the customer will receive API Messages and Mass Messages.

json

Assign the customer to the team member (user) specified by their email. {"user_email": "[email protected]"}

string
Defaults to 90210

Specific Zipcode of the contact

string
Defaults to America/Los_Angeles

State the timezone your contact is in

string

OPTIONAL: Represents an ID from a system external to Sonar

Responses

Language
Credentials
Request
Response
Choose an example:
application/json