SunshineConversationsClient::SwitchboardsApi

August 27, 2025 ยท View on GitHub

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

MethodHTTP requestDescription
create_switchboardPOST /v2/apps/{appId}/switchboardsCreate Switchboard
delete_switchboardDELETE /v2/apps/{appId}/switchboards/{switchboardId}Delete Switchboard
list_switchboardsGET /v2/apps/{appId}/switchboardsList Switchboards
update_switchboardPATCH /v2/apps/{appId}/switchboards/{switchboardId}Update Switchboard

create_switchboard

SwitchboardResponse create_switchboard(app_id)

Create Switchboard

Create a switchboard.

Example

# load the gem
require 'sunshine-conversations-client'
# setup authorization
SunshineConversationsClient.configure do |config|
  # Configure HTTP basic authorization: basicAuth
  config.username = 'YOUR_USERNAME'
  config.password = 'YOUR_PASSWORD'

  # Configure Bearer authorization (JWT): bearerAuth
  # Uncomment this line to use JWTs
  # config.access_token = 'YOUR_JWT'
end

api_instance = SunshineConversationsClient::SwitchboardsApi.new
app_id = 5d8cff3cd55b040010928b5b # String | Identifies the app.
# Be sure to add the required body parameters

begin
  #Create Switchboard
  result = api_instance.create_switchboard(app_id)
  p result
rescue SunshineConversationsClient::ApiError => e
  puts "Exception when calling SwitchboardsApi->create_switchboard: #{e}"
end

Parameters

NameTypeDescriptionNotes
app_idStringIdentifies the app.

Return type

SwitchboardResponse

Authorization

basicAuth, bearerAuth

HTTP request headers

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

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

# load the gem
require 'sunshine-conversations-client'
# setup authorization
SunshineConversationsClient.configure do |config|
  # Configure HTTP basic authorization: basicAuth
  config.username = 'YOUR_USERNAME'
  config.password = 'YOUR_PASSWORD'

  # Configure Bearer authorization (JWT): bearerAuth
  # Uncomment this line to use JWTs
  # config.access_token = 'YOUR_JWT'
end

api_instance = SunshineConversationsClient::SwitchboardsApi.new
app_id = 5d8cff3cd55b040010928b5b # String | Identifies the app.
switchboard_id = 5d8cff3cd55b040010928b5b # String | Identifies the switchboard.
# Be sure to add the required body parameters

begin
  #Delete Switchboard
  result = api_instance.delete_switchboard(app_id, switchboard_id)
  p result
rescue SunshineConversationsClient::ApiError => e
  puts "Exception when calling SwitchboardsApi->delete_switchboard: #{e}"
end

Parameters

NameTypeDescriptionNotes
app_idStringIdentifies the app.
switchboard_idStringIdentifies the switchboard.

Return type

Object

Authorization

basicAuth, bearerAuth

HTTP request headers

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

list_switchboards

SwitchboardListResponse list_switchboards(app_id)

List Switchboards

Lists all switchboards belonging to the app.

Example

# load the gem
require 'sunshine-conversations-client'
# setup authorization
SunshineConversationsClient.configure do |config|
  # Configure HTTP basic authorization: basicAuth
  config.username = 'YOUR_USERNAME'
  config.password = 'YOUR_PASSWORD'

  # Configure Bearer authorization (JWT): bearerAuth
  # Uncomment this line to use JWTs
  # config.access_token = 'YOUR_JWT'
end

api_instance = SunshineConversationsClient::SwitchboardsApi.new
app_id = 5d8cff3cd55b040010928b5b # String | Identifies the app.
# Be sure to add the required body parameters

begin
  #List Switchboards
  result = api_instance.list_switchboards(app_id)
  p result
rescue SunshineConversationsClient::ApiError => e
  puts "Exception when calling SwitchboardsApi->list_switchboards: #{e}"
end

Parameters

NameTypeDescriptionNotes
app_idStringIdentifies the app.

Return type

SwitchboardListResponse

Authorization

basicAuth, bearerAuth

HTTP request headers

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

update_switchboard

SwitchboardResponse update_switchboard(app_id, switchboard_id, switchboard_update_body)

Update Switchboard

Updates a switchboard record.

Example

# load the gem
require 'sunshine-conversations-client'
# setup authorization
SunshineConversationsClient.configure do |config|
  # Configure HTTP basic authorization: basicAuth
  config.username = 'YOUR_USERNAME'
  config.password = 'YOUR_PASSWORD'

  # Configure Bearer authorization (JWT): bearerAuth
  # Uncomment this line to use JWTs
  # config.access_token = 'YOUR_JWT'
end

api_instance = SunshineConversationsClient::SwitchboardsApi.new
app_id = 5d8cff3cd55b040010928b5b # String | Identifies the app.
switchboard_id = 5d8cff3cd55b040010928b5b # String | Identifies the switchboard.
switchboard_update_body =  # SwitchboardUpdateBody | 
# Be sure to add the required body parameters

begin
  #Update Switchboard
  result = api_instance.update_switchboard(app_id, switchboard_id, switchboard_update_body)
  p result
rescue SunshineConversationsClient::ApiError => e
  puts "Exception when calling SwitchboardsApi->update_switchboard: #{e}"
end

Parameters

NameTypeDescriptionNotes
app_idStringIdentifies the app.
switchboard_idStringIdentifies the switchboard.
switchboard_update_bodySwitchboardUpdateBody

Return type

SwitchboardResponse

Authorization

basicAuth, bearerAuth

HTTP request headers

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