Skip to content

Latest commit

 

History

History
364 lines (255 loc) · 12 KB

File metadata and controls

364 lines (255 loc) · 12 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):
  • Bearer (JWT) Authentication (bearerAuth):
import sunshine_conversations_client
from sunshine_conversations_client.models.switchboard_response import SwitchboardResponse
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.SwitchboardsApi(api_client)
    app_id = '5d8cff3cd55b040010928b5b' # str | Identifies the app.

    try:
        # Create Switchboard
        api_response = api_instance.create_switchboard(app_id)
        print("The response of SwitchboardsApi->create_switchboard:\n")
        pprint(api_response)
    except Exception 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 Bad request -
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):
  • 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.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)
        print("The response of SwitchboardsApi->delete_switchboard:\n")
        pprint(api_response)
    except Exception 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):
  • Bearer (JWT) Authentication (bearerAuth):
import sunshine_conversations_client
from sunshine_conversations_client.models.switchboard_list_response import SwitchboardListResponse
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.SwitchboardsApi(api_client)
    app_id = '5d8cff3cd55b040010928b5b' # str | Identifies the app.

    try:
        # List Switchboards
        api_response = api_instance.list_switchboards(app_id)
        print("The response of SwitchboardsApi->list_switchboards:\n")
        pprint(api_response)
    except Exception 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):
  • Bearer (JWT) Authentication (bearerAuth):
import sunshine_conversations_client
from sunshine_conversations_client.models.switchboard_response import SwitchboardResponse
from sunshine_conversations_client.models.switchboard_update_body import SwitchboardUpdateBody
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.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)
        print("The response of SwitchboardsApi->update_switchboard:\n")
        pprint(api_response)
    except Exception 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]