All URIs are relative to https://api.smooch.io
| Method | HTTP request | Description |
|---|---|---|
| create_integration | POST /v2/apps/{appId}/integrations | Create Integration |
| delete_integration | DELETE /v2/apps/{appId}/integrations/{integrationId} | Delete Integration |
| get_integration | GET /v2/apps/{appId}/integrations/{integrationId} | Get Integration |
| list_integrations | GET /v2/apps/{appId}/integrations | List Integrations |
| update_integration | PATCH /v2/apps/{appId}/integrations/{integrationId} | Update Integration |
IntegrationResponse create_integration(app_id, integration)
Create Integration
The Create Integration endpoint allows you to provision apps with front-end messaging channels. Selecting a custom integration allows the creation of webhooks.
- Basic Authentication (basicAuth):
- Bearer (JWT) Authentication (bearerAuth):
import sunshine_conversations_client
from sunshine_conversations_client.models.integration import Integration
from sunshine_conversations_client.models.integration_response import IntegrationResponse
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 = sunshine_conversations_client.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure Bearer authorization (JWT): bearerAuth
configuration = sunshine_conversations_client.Configuration(
access_token = os.environ["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.IntegrationsApi(api_client)
app_id = '5d8cff3cd55b040010928b5b' # str | Identifies the app.
integration = sunshine_conversations_client.Integration() # Integration |
try:
# Create Integration
api_response = api_instance.create_integration(app_id, integration)
print("The response of IntegrationsApi->create_integration:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling IntegrationsApi->create_integration: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| app_id | str | Identifies the app. | |
| integration | Integration |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 201 | Created | - |
| 400 | Bad request | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
object delete_integration(app_id, integration_id)
Delete Integration
Delete the specified integration.
- Basic Authentication (basicAuth):
- Bearer (JWT) Authentication (bearerAuth):
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 = sunshine_conversations_client.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure Bearer authorization (JWT): bearerAuth
configuration = sunshine_conversations_client.Configuration(
access_token = os.environ["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.IntegrationsApi(api_client)
app_id = '5d8cff3cd55b040010928b5b' # str | Identifies the app.
integration_id = '029c31f25a21b47effd7be90' # str | The id of the integration.
try:
# Delete Integration
api_response = api_instance.delete_integration(app_id, integration_id)
print("The response of IntegrationsApi->delete_integration:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling IntegrationsApi->delete_integration: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| app_id | str | Identifies the app. | |
| integration_id | str | The id of the integration. |
object
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Ok | - |
| 400 | Bad request | - |
| 404 | Not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
IntegrationResponse get_integration(app_id, integration_id)
Get Integration
Get integration.
- Basic Authentication (basicAuth):
- Bearer (JWT) Authentication (bearerAuth):
import sunshine_conversations_client
from sunshine_conversations_client.models.integration_response import IntegrationResponse
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 = sunshine_conversations_client.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure Bearer authorization (JWT): bearerAuth
configuration = sunshine_conversations_client.Configuration(
access_token = os.environ["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.IntegrationsApi(api_client)
app_id = '5d8cff3cd55b040010928b5b' # str | Identifies the app.
integration_id = '029c31f25a21b47effd7be90' # str | The id of the integration.
try:
# Get Integration
api_response = api_instance.get_integration(app_id, integration_id)
print("The response of IntegrationsApi->get_integration:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling IntegrationsApi->get_integration: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| app_id | str | Identifies the app. | |
| integration_id | str | The id of the integration. |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Ok | - |
| 404 | Not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
IntegrationListResponse list_integrations(app_id, page=page, filter=filter)
List Integrations
List available integrations. This API is paginated through cursor pagination.
/v2/apps/:appId/integrations?page[after]=5e1606762556d93e9c176f69&page[size]=10&filter[types]=custom,web- Basic Authentication (basicAuth):
- Bearer (JWT) Authentication (bearerAuth):
import sunshine_conversations_client
from sunshine_conversations_client.models.integration_list_filter import IntegrationListFilter
from sunshine_conversations_client.models.integration_list_response import IntegrationListResponse
from sunshine_conversations_client.models.page import Page
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 = sunshine_conversations_client.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure Bearer authorization (JWT): bearerAuth
configuration = sunshine_conversations_client.Configuration(
access_token = os.environ["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.IntegrationsApi(api_client)
app_id = '5d8cff3cd55b040010928b5b' # str | Identifies the app.
page = sunshine_conversations_client.Page() # Page | Contains parameters for applying cursor pagination. (optional)
filter = sunshine_conversations_client.IntegrationListFilter() # IntegrationListFilter | Contains parameters for filtering the results. (optional)
try:
# List Integrations
api_response = api_instance.list_integrations(app_id, page=page, filter=filter)
print("The response of IntegrationsApi->list_integrations:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling IntegrationsApi->list_integrations: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| app_id | str | Identifies the app. | |
| page | Page | Contains parameters for applying cursor pagination. | [optional] |
| filter | IntegrationListFilter | Contains parameters for filtering the results. | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Ok | - |
| 400 | Bad request | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
IntegrationResponse update_integration(app_id, integration_id, integration_update)
Update Integration
Allows you to update certain fields of existing integrations. If updating a specific property is not supported, you must delete the integration and re-create it with the new data.
- Basic Authentication (basicAuth):
- Bearer (JWT) Authentication (bearerAuth):
import sunshine_conversations_client
from sunshine_conversations_client.models.integration_response import IntegrationResponse
from sunshine_conversations_client.models.integration_update import IntegrationUpdate
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 = sunshine_conversations_client.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure Bearer authorization (JWT): bearerAuth
configuration = sunshine_conversations_client.Configuration(
access_token = os.environ["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.IntegrationsApi(api_client)
app_id = '5d8cff3cd55b040010928b5b' # str | Identifies the app.
integration_id = '029c31f25a21b47effd7be90' # str | The id of the integration.
integration_update = {"displayName":"My Test Integration"} # IntegrationUpdate |
try:
# Update Integration
api_response = api_instance.update_integration(app_id, integration_id, integration_update)
print("The response of IntegrationsApi->update_integration:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling IntegrationsApi->update_integration: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| app_id | str | Identifies the app. | |
| integration_id | str | The id of the integration. | |
| integration_update | IntegrationUpdate |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Ok | - |
| 404 | Not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]