Skip to content

Latest commit

 

History

History
605 lines (481 loc) · 23.1 KB

IntegrationsApi.md

File metadata and controls

605 lines (481 loc) · 23.1 KB

sunshine_conversations_client.IntegrationsApi

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

create_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.

Example

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.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)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling IntegrationsApi->create_integration: %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.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)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling IntegrationsApi->create_integration: %s\n" % e)

Parameters

Name Type Description Notes
app_id str Identifies the app.
integration Integration

Return type

IntegrationResponse

Authorization

basicAuth, bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
201 Created -
400 Invalid integration type -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_integration

object delete_integration(app_id, integration_id)

Delete Integration

Delete the specified integration.

Example

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.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)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling IntegrationsApi->delete_integration: %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.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)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling IntegrationsApi->delete_integration: %s\n" % e)

Parameters

Name Type Description Notes
app_id str Identifies the app.
integration_id str The id of the integration.

Return type

object

Authorization

basicAuth, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Ok -
400 SDK integrations configured on Admin Center cannot be deleted -
404 Integration not found -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_integration

IntegrationResponse get_integration(app_id, integration_id)

Get Integration

Get integration.

Example

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.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)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling IntegrationsApi->get_integration: %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.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)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling IntegrationsApi->get_integration: %s\n" % e)

Parameters

Name Type Description Notes
app_id str Identifies the app.
integration_id str The id of the integration.

Return type

IntegrationResponse

Authorization

basicAuth, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Ok -
404 Integration not found -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list_integrations

IntegrationListResponse list_integrations(app_id, page=page, filter=filter)

List Integrations

List available integrations. This API is paginated through cursor pagination. shell /v2/apps/:appId/integrations?page[after]=5e1606762556d93e9c176f69&page[size]=10&filter[types]=custom,web

Example

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.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)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling IntegrationsApi->list_integrations: %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.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)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling IntegrationsApi->list_integrations: %s\n" % e)

Parameters

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]

Return type

IntegrationListResponse

Authorization

basicAuth, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Ok -
400 Invalid query parameters -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_integration

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.

Example

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.IntegrationsApi(api_client)
    app_id = '5d8cff3cd55b040010928b5b' # str | Identifies the app.
    integration_id = '029c31f25a21b47effd7be90' # str | The id of the integration.
    integration_update = sunshine_conversations_client.IntegrationUpdate() # IntegrationUpdate | 

    try:
        # Update Integration
        api_response = api_instance.update_integration(app_id, integration_id, integration_update)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling IntegrationsApi->update_integration: %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.IntegrationsApi(api_client)
    app_id = '5d8cff3cd55b040010928b5b' # str | Identifies the app.
    integration_id = '029c31f25a21b47effd7be90' # str | The id of the integration.
    integration_update = sunshine_conversations_client.IntegrationUpdate() # IntegrationUpdate | 

    try:
        # Update Integration
        api_response = api_instance.update_integration(app_id, integration_id, integration_update)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling IntegrationsApi->update_integration: %s\n" % e)

Parameters

Name Type Description Notes
app_id str Identifies the app.
integration_id str The id of the integration.
integration_update IntegrationUpdate

Return type

IntegrationResponse

Authorization

basicAuth, bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Ok -
404 Integration not found -

[Back to top] [Back to API list] [Back to Model list] [Back to README]