Skip to content

Latest commit

 

History

History
478 lines (378 loc) · 17.4 KB

SwitchboardsApi.md

File metadata and controls

478 lines (378 loc) · 17.4 KB

sunshine_conversations_client.SwitchboardsApi

All URIs are relative to https://api.smooch.io

Method HTTP request Description
create_switchboard POST /v2/apps/{appId}/switchboards Create Switchboard
delete_switchboard DELETE /v2/apps/{appId}/switchboards/{switchboardId} Delete Switchboard
list_switchboards GET /v2/apps/{appId}/switchboards List Switchboards
update_switchboard PATCH /v2/apps/{appId}/switchboards/{switchboardId} Update Switchboard

create_switchboard

SwitchboardResponse create_switchboard(app_id)

Create Switchboard

Create a switchboard.

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.SwitchboardsApi(api_client)
    app_id = '5d8cff3cd55b040010928b5b' # str | Identifies the app.

    try:
        # Create Switchboard
        api_response = api_instance.create_switchboard(app_id)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling SwitchboardsApi->create_switchboard: %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.SwitchboardsApi(api_client)
    app_id = '5d8cff3cd55b040010928b5b' # str | Identifies the app.

    try:
        # Create Switchboard
        api_response = api_instance.create_switchboard(app_id)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling SwitchboardsApi->create_switchboard: %s\n" % e)

Parameters

Name Type Description Notes
app_id str Identifies the app.

Return type

SwitchboardResponse

Authorization

basicAuth, bearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
201 Created -
400 Only one switchboard can be created per app -
404 Not Found -

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

delete_switchboard

object delete_switchboard(app_id, switchboard_id)

Delete Switchboard

Deletes the switchboard and all its switchboard integrations. The integrations linked to these switchboard integrations are not deleted and will start receiving all conversation events.

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.SwitchboardsApi(api_client)
    app_id = '5d8cff3cd55b040010928b5b' # str | Identifies the app.
    switchboard_id = '5d8cff3cd55b040010928b5b' # str | Identifies the switchboard.

    try:
        # Delete Switchboard
        api_response = api_instance.delete_switchboard(app_id, switchboard_id)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling SwitchboardsApi->delete_switchboard: %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.SwitchboardsApi(api_client)
    app_id = '5d8cff3cd55b040010928b5b' # str | Identifies the app.
    switchboard_id = '5d8cff3cd55b040010928b5b' # str | Identifies the switchboard.

    try:
        # Delete Switchboard
        api_response = api_instance.delete_switchboard(app_id, switchboard_id)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling SwitchboardsApi->delete_switchboard: %s\n" % e)

Parameters

Name Type Description Notes
app_id str Identifies the app.
switchboard_id str Identifies the switchboard.

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 -
404 Not Found -

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

list_switchboards

SwitchboardListResponse list_switchboards(app_id)

List Switchboards

Lists all switchboards belonging to the app.

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.SwitchboardsApi(api_client)
    app_id = '5d8cff3cd55b040010928b5b' # str | Identifies the app.

    try:
        # List Switchboards
        api_response = api_instance.list_switchboards(app_id)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling SwitchboardsApi->list_switchboards: %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.SwitchboardsApi(api_client)
    app_id = '5d8cff3cd55b040010928b5b' # str | Identifies the app.

    try:
        # List Switchboards
        api_response = api_instance.list_switchboards(app_id)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling SwitchboardsApi->list_switchboards: %s\n" % e)

Parameters

Name Type Description Notes
app_id str Identifies the app.

Return type

SwitchboardListResponse

Authorization

basicAuth, bearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Ok -
404 Not Found -

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

update_switchboard

SwitchboardResponse update_switchboard(app_id, switchboard_id, switchboard_update_body)

Update Switchboard

Updates a switchboard record.

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.SwitchboardsApi(api_client)
    app_id = '5d8cff3cd55b040010928b5b' # str | Identifies the app.
    switchboard_id = '5d8cff3cd55b040010928b5b' # str | Identifies the switchboard.
    switchboard_update_body = sunshine_conversations_client.SwitchboardUpdateBody() # SwitchboardUpdateBody | 

    try:
        # Update Switchboard
        api_response = api_instance.update_switchboard(app_id, switchboard_id, switchboard_update_body)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling SwitchboardsApi->update_switchboard: %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.SwitchboardsApi(api_client)
    app_id = '5d8cff3cd55b040010928b5b' # str | Identifies the app.
    switchboard_id = '5d8cff3cd55b040010928b5b' # str | Identifies the switchboard.
    switchboard_update_body = sunshine_conversations_client.SwitchboardUpdateBody() # SwitchboardUpdateBody | 

    try:
        # Update Switchboard
        api_response = api_instance.update_switchboard(app_id, switchboard_id, switchboard_update_body)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling SwitchboardsApi->update_switchboard: %s\n" % e)

Parameters

Name Type Description Notes
app_id str Identifies the app.
switchboard_id str Identifies the switchboard.
switchboard_update_body SwitchboardUpdateBody

Return type

SwitchboardResponse

Authorization

basicAuth, bearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Ok -
404 Not Found -

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