All URIs are relative to https://api.smooch.io
Method | HTTP request | Description |
---|---|---|
create_user | POST /v2/apps/{appId}/users | Create User |
delete_user | DELETE /v2/apps/{appId}/users/{userIdOrExternalId} | Delete User |
delete_user_personal_information | DELETE /v2/apps/{appId}/users/{userIdOrExternalId}/personalinformation | Delete User Personal Information |
get_user | GET /v2/apps/{appId}/users/{userIdOrExternalId} | Get User |
update_user | PATCH /v2/apps/{appId}/users/{userIdOrExternalId} | Update User |
UserResponse create_user(app_id, user_create_body)
Create User
Creates a new user.
Basic Authentication (basicAuth):
from __future__ import print_function
import time
import sunshine_conversations_client
from sunshine_conversations_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.smooch.io
# See configuration.py for a list of all supported configuration parameters.
configuration = sunshine_conversations_client.Configuration(
host = "https://api.smooch.io"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure Bearer authorization (JWT): bearerAuth
# Uncomment this if you want to use JWTs
#configuration.access_token = 'YOUR_BEARER_TOKEN'
# Enter a context with an instance of the API client
with sunshine_conversations_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = sunshine_conversations_client.UsersApi(api_client)
app_id = '5d8cff3cd55b040010928b5b' # str | Identifies the app.
user_create_body = sunshine_conversations_client.UserCreateBody() # UserCreateBody |
try:
# Create User
api_response = api_instance.create_user(app_id, user_create_body)
pprint(api_response)
except ApiException as e:
print("Exception when calling UsersApi->create_user: %s\n" % e)
Bearer (JWT) Authentication (bearerAuth):
from __future__ import print_function
import time
import sunshine_conversations_client
from sunshine_conversations_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.smooch.io
# See configuration.py for a list of all supported configuration parameters.
configuration = sunshine_conversations_client.Configuration(
host = "https://api.smooch.io"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure Bearer authorization (JWT): bearerAuth
# Uncomment this if you want to use JWTs
#configuration.access_token = 'YOUR_BEARER_TOKEN'
# Enter a context with an instance of the API client
with sunshine_conversations_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = sunshine_conversations_client.UsersApi(api_client)
app_id = '5d8cff3cd55b040010928b5b' # str | Identifies the app.
user_create_body = sunshine_conversations_client.UserCreateBody() # UserCreateBody |
try:
# Create User
api_response = api_instance.create_user(app_id, user_create_body)
pprint(api_response)
except ApiException as e:
print("Exception when calling UsersApi->create_user: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
app_id | str | Identifies the app. | |
user_create_body | UserCreateBody |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | Created | - |
409 | User already exists | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
object delete_user(app_id, user_id_or_external_id)
Delete User
Delete a user, its clients and its conversation history. The user is considered completely deleted once the user:delete
webhook is fired. To only delete a user’s personal information, see Delete User Personal Information.
Basic Authentication (basicAuth):
from __future__ import print_function
import time
import sunshine_conversations_client
from sunshine_conversations_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.smooch.io
# See configuration.py for a list of all supported configuration parameters.
configuration = sunshine_conversations_client.Configuration(
host = "https://api.smooch.io"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure Bearer authorization (JWT): bearerAuth
# Uncomment this if you want to use JWTs
#configuration.access_token = 'YOUR_BEARER_TOKEN'
# Enter a context with an instance of the API client
with sunshine_conversations_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = sunshine_conversations_client.UsersApi(api_client)
app_id = '5d8cff3cd55b040010928b5b' # str | Identifies the app.
user_id_or_external_id = '42589ad070d43be9b00ff7e5' # str | The user's id or externalId.
try:
# Delete User
api_response = api_instance.delete_user(app_id, user_id_or_external_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling UsersApi->delete_user: %s\n" % e)
Bearer (JWT) Authentication (bearerAuth):
from __future__ import print_function
import time
import sunshine_conversations_client
from sunshine_conversations_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.smooch.io
# See configuration.py for a list of all supported configuration parameters.
configuration = sunshine_conversations_client.Configuration(
host = "https://api.smooch.io"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure Bearer authorization (JWT): bearerAuth
# Uncomment this if you want to use JWTs
#configuration.access_token = 'YOUR_BEARER_TOKEN'
# Enter a context with an instance of the API client
with sunshine_conversations_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = sunshine_conversations_client.UsersApi(api_client)
app_id = '5d8cff3cd55b040010928b5b' # str | Identifies the app.
user_id_or_external_id = '42589ad070d43be9b00ff7e5' # str | The user's id or externalId.
try:
# Delete User
api_response = api_instance.delete_user(app_id, user_id_or_external_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling UsersApi->delete_user: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
app_id | str | Identifies the app. | |
user_id_or_external_id | str | The user's id or externalId. |
object
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Ok | - |
404 | User not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UserResponse delete_user_personal_information(app_id, user_id_or_external_id)
Delete User Personal Information
Delete a user’s personal information. Calling this API will clear givenName
, surname
, email
and avatarUrl
and every custom property for the specified user. For every client owned by the user, it will also clear displayName
, avatarUrl
and any channel specific information stored in the info and raw fields. Calling this API doesn’t delete the user’s conversation history. To fully delete the user, see Delete User.
Basic Authentication (basicAuth):
from __future__ import print_function
import time
import sunshine_conversations_client
from sunshine_conversations_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.smooch.io
# See configuration.py for a list of all supported configuration parameters.
configuration = sunshine_conversations_client.Configuration(
host = "https://api.smooch.io"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure Bearer authorization (JWT): bearerAuth
# Uncomment this if you want to use JWTs
#configuration.access_token = 'YOUR_BEARER_TOKEN'
# Enter a context with an instance of the API client
with sunshine_conversations_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = sunshine_conversations_client.UsersApi(api_client)
app_id = '5d8cff3cd55b040010928b5b' # str | Identifies the app.
user_id_or_external_id = '42589ad070d43be9b00ff7e5' # str | The user's id or externalId.
try:
# Delete User Personal Information
api_response = api_instance.delete_user_personal_information(app_id, user_id_or_external_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling UsersApi->delete_user_personal_information: %s\n" % e)
Bearer (JWT) Authentication (bearerAuth):
from __future__ import print_function
import time
import sunshine_conversations_client
from sunshine_conversations_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.smooch.io
# See configuration.py for a list of all supported configuration parameters.
configuration = sunshine_conversations_client.Configuration(
host = "https://api.smooch.io"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure Bearer authorization (JWT): bearerAuth
# Uncomment this if you want to use JWTs
#configuration.access_token = 'YOUR_BEARER_TOKEN'
# Enter a context with an instance of the API client
with sunshine_conversations_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = sunshine_conversations_client.UsersApi(api_client)
app_id = '5d8cff3cd55b040010928b5b' # str | Identifies the app.
user_id_or_external_id = '42589ad070d43be9b00ff7e5' # str | The user's id or externalId.
try:
# Delete User Personal Information
api_response = api_instance.delete_user_personal_information(app_id, user_id_or_external_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling UsersApi->delete_user_personal_information: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
app_id | str | Identifies the app. | |
user_id_or_external_id | str | The user's id or externalId. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Ok | - |
404 | User not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UserResponse get_user(app_id, user_id_or_external_id)
Get User
Fetches an individual user.
Basic Authentication (basicAuth):
from __future__ import print_function
import time
import sunshine_conversations_client
from sunshine_conversations_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.smooch.io
# See configuration.py for a list of all supported configuration parameters.
configuration = sunshine_conversations_client.Configuration(
host = "https://api.smooch.io"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure Bearer authorization (JWT): bearerAuth
# Uncomment this if you want to use JWTs
#configuration.access_token = 'YOUR_BEARER_TOKEN'
# Enter a context with an instance of the API client
with sunshine_conversations_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = sunshine_conversations_client.UsersApi(api_client)
app_id = '5d8cff3cd55b040010928b5b' # str | Identifies the app.
user_id_or_external_id = '42589ad070d43be9b00ff7e5' # str | The user's id or externalId.
try:
# Get User
api_response = api_instance.get_user(app_id, user_id_or_external_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling UsersApi->get_user: %s\n" % e)
Bearer (JWT) Authentication (bearerAuth):
from __future__ import print_function
import time
import sunshine_conversations_client
from sunshine_conversations_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.smooch.io
# See configuration.py for a list of all supported configuration parameters.
configuration = sunshine_conversations_client.Configuration(
host = "https://api.smooch.io"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure Bearer authorization (JWT): bearerAuth
# Uncomment this if you want to use JWTs
#configuration.access_token = 'YOUR_BEARER_TOKEN'
# Enter a context with an instance of the API client
with sunshine_conversations_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = sunshine_conversations_client.UsersApi(api_client)
app_id = '5d8cff3cd55b040010928b5b' # str | Identifies the app.
user_id_or_external_id = '42589ad070d43be9b00ff7e5' # str | The user's id or externalId.
try:
# Get User
api_response = api_instance.get_user(app_id, user_id_or_external_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling UsersApi->get_user: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
app_id | str | Identifies the app. | |
user_id_or_external_id | str | The user's id or externalId. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Ok | - |
404 | User not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UserResponse update_user(app_id, user_id_or_external_id, user_update_body)
Update User
Updates a user.
Basic Authentication (basicAuth):
from __future__ import print_function
import time
import sunshine_conversations_client
from sunshine_conversations_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.smooch.io
# See configuration.py for a list of all supported configuration parameters.
configuration = sunshine_conversations_client.Configuration(
host = "https://api.smooch.io"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure Bearer authorization (JWT): bearerAuth
# Uncomment this if you want to use JWTs
#configuration.access_token = 'YOUR_BEARER_TOKEN'
# Enter a context with an instance of the API client
with sunshine_conversations_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = sunshine_conversations_client.UsersApi(api_client)
app_id = '5d8cff3cd55b040010928b5b' # str | Identifies the app.
user_id_or_external_id = '42589ad070d43be9b00ff7e5' # str | The user's id or externalId.
user_update_body = sunshine_conversations_client.UserUpdateBody() # UserUpdateBody |
try:
# Update User
api_response = api_instance.update_user(app_id, user_id_or_external_id, user_update_body)
pprint(api_response)
except ApiException as e:
print("Exception when calling UsersApi->update_user: %s\n" % e)
Bearer (JWT) Authentication (bearerAuth):
from __future__ import print_function
import time
import sunshine_conversations_client
from sunshine_conversations_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.smooch.io
# See configuration.py for a list of all supported configuration parameters.
configuration = sunshine_conversations_client.Configuration(
host = "https://api.smooch.io"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure Bearer authorization (JWT): bearerAuth
# Uncomment this if you want to use JWTs
#configuration.access_token = 'YOUR_BEARER_TOKEN'
# Enter a context with an instance of the API client
with sunshine_conversations_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = sunshine_conversations_client.UsersApi(api_client)
app_id = '5d8cff3cd55b040010928b5b' # str | Identifies the app.
user_id_or_external_id = '42589ad070d43be9b00ff7e5' # str | The user's id or externalId.
user_update_body = sunshine_conversations_client.UserUpdateBody() # UserUpdateBody |
try:
# Update User
api_response = api_instance.update_user(app_id, user_id_or_external_id, user_update_body)
pprint(api_response)
except ApiException as e:
print("Exception when calling UsersApi->update_user: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
app_id | str | Identifies the app. | |
user_id_or_external_id | str | The user's id or externalId. | |
user_update_body | UserUpdateBody |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Ok | - |
404 | User not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]