Skip to content
This repository was archived by the owner on Aug 25, 2025. It is now read-only.

Latest commit

 

History

History
677 lines (485 loc) · 18.2 KB

File metadata and controls

677 lines (485 loc) · 18.2 KB

Cfchat::TeamsApi

All URIs are relative to https://chat.myclickfunnels.com

Method HTTP request Description
add_new_agent_to_team POST /api/v1/accounts/{account_id}/teams/{team_id}/team_members Add a New Agent
create_a_team POST /api/v1/accounts/{account_id}/teams Create a team
delete_a_team DELETE /api/v1/accounts/{account_id}/teams/{team_id} Delete a team
delete_agent_in_team DELETE /api/v1/accounts/{account_id}/teams/{team_id}/team_members Remove an Agent from Team
get_details_of_a_single_team GET /api/v1/accounts/{account_id}/teams/{team_id} Get a team details
get_team_members GET /api/v1/accounts/{account_id}/teams/{team_id}/team_members List Agents in Team
list_all_teams GET /api/v1/accounts/{account_id}/teams List all teams
update_a_team PATCH /api/v1/accounts/{account_id}/teams/{team_id} Update a team
update_agents_in_team PATCH /api/v1/accounts/{account_id}/teams/{team_id}/team_members Update Agents in Team

add_new_agent_to_team

<Array> add_new_agent_to_team(account_id, team_id, data)

Add a New Agent

Add a new Agent to Team

Examples

require 'time'
require 'cfchat'
# setup authorization
Cfchat.configure do |config|
  # Configure API key authorization: userApiKey
  config.api_key['userApiKey'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  # config.api_key_prefix['userApiKey'] = 'Bearer'
end

api_instance = Cfchat::TeamsApi.new
account_id = 56 # Integer | The numeric ID of the account
team_id = 56 # Integer | The ID of the team to be updated
data = Cfchat::AddNewAgentToTeamRequest.new({user_ids: [37]}) # AddNewAgentToTeamRequest | 

begin
  # Add a New Agent
  result = api_instance.add_new_agent_to_team(account_id, team_id, data)
  p result
rescue Cfchat::ApiError => e
  puts "Error when calling TeamsApi->add_new_agent_to_team: #{e}"
end

Using the add_new_agent_to_team_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(<Array>, Integer, Hash)> add_new_agent_to_team_with_http_info(account_id, team_id, data)

begin
  # Add a New Agent
  data, status_code, headers = api_instance.add_new_agent_to_team_with_http_info(account_id, team_id, data)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <Array<Agent>>
rescue Cfchat::ApiError => e
  puts "Error when calling TeamsApi->add_new_agent_to_team_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
account_id Integer The numeric ID of the account
team_id Integer The ID of the team to be updated
data AddNewAgentToTeamRequest

Return type

Array<Agent>

Authorization

userApiKey

HTTP request headers

  • Content-Type: application/json; charset=utf-8
  • Accept: application/json; charset=utf-8

create_a_team

create_a_team(account_id, data)

Create a team

Create a team in the account

Examples

require 'time'
require 'cfchat'
# setup authorization
Cfchat.configure do |config|
  # Configure API key authorization: userApiKey
  config.api_key['userApiKey'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  # config.api_key_prefix['userApiKey'] = 'Bearer'
end

api_instance = Cfchat::TeamsApi.new
account_id = 56 # Integer | The numeric ID of the account
data = Cfchat::TeamCreateUpdatePayload.new # TeamCreateUpdatePayload | 

begin
  # Create a team
  result = api_instance.create_a_team(account_id, data)
  p result
rescue Cfchat::ApiError => e
  puts "Error when calling TeamsApi->create_a_team: #{e}"
end

Using the create_a_team_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> create_a_team_with_http_info(account_id, data)

begin
  # Create a team
  data, status_code, headers = api_instance.create_a_team_with_http_info(account_id, data)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <Team>
rescue Cfchat::ApiError => e
  puts "Error when calling TeamsApi->create_a_team_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
account_id Integer The numeric ID of the account
data TeamCreateUpdatePayload

Return type

Team

Authorization

userApiKey

HTTP request headers

  • Content-Type: application/json; charset=utf-8
  • Accept: application/json; charset=utf-8

delete_a_team

delete_a_team(account_id, team_id)

Delete a team

Delete a team from the account

Examples

require 'time'
require 'cfchat'
# setup authorization
Cfchat.configure do |config|
  # Configure API key authorization: userApiKey
  config.api_key['userApiKey'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  # config.api_key_prefix['userApiKey'] = 'Bearer'
end

api_instance = Cfchat::TeamsApi.new
account_id = 56 # Integer | The numeric ID of the account
team_id = 56 # Integer | The ID of the team to be updated

begin
  # Delete a team
  api_instance.delete_a_team(account_id, team_id)
rescue Cfchat::ApiError => e
  puts "Error when calling TeamsApi->delete_a_team: #{e}"
end

Using the delete_a_team_with_http_info variant

This returns an Array which contains the response data (nil in this case), status code and headers.

<Array(nil, Integer, Hash)> delete_a_team_with_http_info(account_id, team_id)

begin
  # Delete a team
  data, status_code, headers = api_instance.delete_a_team_with_http_info(account_id, team_id)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => nil
rescue Cfchat::ApiError => e
  puts "Error when calling TeamsApi->delete_a_team_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
account_id Integer The numeric ID of the account
team_id Integer The ID of the team to be updated

Return type

nil (empty response body)

Authorization

userApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

delete_agent_in_team

delete_agent_in_team(account_id, team_id, data)

Remove an Agent from Team

Remove an Agent from Team

Examples

require 'time'
require 'cfchat'
# setup authorization
Cfchat.configure do |config|
  # Configure API key authorization: userApiKey
  config.api_key['userApiKey'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  # config.api_key_prefix['userApiKey'] = 'Bearer'
end

api_instance = Cfchat::TeamsApi.new
account_id = 56 # Integer | The numeric ID of the account
team_id = 56 # Integer | The ID of the team to be updated
data = Cfchat::DeleteAgentInTeamRequest.new({user_ids: [37]}) # DeleteAgentInTeamRequest | 

begin
  # Remove an Agent from Team
  api_instance.delete_agent_in_team(account_id, team_id, data)
rescue Cfchat::ApiError => e
  puts "Error when calling TeamsApi->delete_agent_in_team: #{e}"
end

Using the delete_agent_in_team_with_http_info variant

This returns an Array which contains the response data (nil in this case), status code and headers.

<Array(nil, Integer, Hash)> delete_agent_in_team_with_http_info(account_id, team_id, data)

begin
  # Remove an Agent from Team
  data, status_code, headers = api_instance.delete_agent_in_team_with_http_info(account_id, team_id, data)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => nil
rescue Cfchat::ApiError => e
  puts "Error when calling TeamsApi->delete_agent_in_team_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
account_id Integer The numeric ID of the account
team_id Integer The ID of the team to be updated
data DeleteAgentInTeamRequest

Return type

nil (empty response body)

Authorization

userApiKey

HTTP request headers

  • Content-Type: application/json; charset=utf-8
  • Accept: Not defined

get_details_of_a_single_team

get_details_of_a_single_team(account_id, team_id)

Get a team details

Get the details of a team in the account

Examples

require 'time'
require 'cfchat'
# setup authorization
Cfchat.configure do |config|
  # Configure API key authorization: userApiKey
  config.api_key['userApiKey'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  # config.api_key_prefix['userApiKey'] = 'Bearer'
end

api_instance = Cfchat::TeamsApi.new
account_id = 56 # Integer | The numeric ID of the account
team_id = 56 # Integer | The ID of the team to be updated

begin
  # Get a team details
  result = api_instance.get_details_of_a_single_team(account_id, team_id)
  p result
rescue Cfchat::ApiError => e
  puts "Error when calling TeamsApi->get_details_of_a_single_team: #{e}"
end

Using the get_details_of_a_single_team_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> get_details_of_a_single_team_with_http_info(account_id, team_id)

begin
  # Get a team details
  data, status_code, headers = api_instance.get_details_of_a_single_team_with_http_info(account_id, team_id)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <Team>
rescue Cfchat::ApiError => e
  puts "Error when calling TeamsApi->get_details_of_a_single_team_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
account_id Integer The numeric ID of the account
team_id Integer The ID of the team to be updated

Return type

Team

Authorization

userApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json; charset=utf-8

get_team_members

<Array> get_team_members(account_id, team_id)

List Agents in Team

Get Details of Agents in an Team

Examples

require 'time'
require 'cfchat'
# setup authorization
Cfchat.configure do |config|
  # Configure API key authorization: userApiKey
  config.api_key['userApiKey'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  # config.api_key_prefix['userApiKey'] = 'Bearer'
end

api_instance = Cfchat::TeamsApi.new
account_id = 56 # Integer | The numeric ID of the account
team_id = 56 # Integer | The ID of the team to be updated

begin
  # List Agents in Team
  result = api_instance.get_team_members(account_id, team_id)
  p result
rescue Cfchat::ApiError => e
  puts "Error when calling TeamsApi->get_team_members: #{e}"
end

Using the get_team_members_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(<Array>, Integer, Hash)> get_team_members_with_http_info(account_id, team_id)

begin
  # List Agents in Team
  data, status_code, headers = api_instance.get_team_members_with_http_info(account_id, team_id)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <Array<Agent>>
rescue Cfchat::ApiError => e
  puts "Error when calling TeamsApi->get_team_members_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
account_id Integer The numeric ID of the account
team_id Integer The ID of the team to be updated

Return type

Array<Agent>

Authorization

userApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json; charset=utf-8

list_all_teams

<Array> list_all_teams(account_id)

List all teams

List all teams available in the current account

Examples

require 'time'
require 'cfchat'
# setup authorization
Cfchat.configure do |config|
  # Configure API key authorization: userApiKey
  config.api_key['userApiKey'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  # config.api_key_prefix['userApiKey'] = 'Bearer'
end

api_instance = Cfchat::TeamsApi.new
account_id = 56 # Integer | The numeric ID of the account

begin
  # List all teams
  result = api_instance.list_all_teams(account_id)
  p result
rescue Cfchat::ApiError => e
  puts "Error when calling TeamsApi->list_all_teams: #{e}"
end

Using the list_all_teams_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(<Array>, Integer, Hash)> list_all_teams_with_http_info(account_id)

begin
  # List all teams
  data, status_code, headers = api_instance.list_all_teams_with_http_info(account_id)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <Array<Team>>
rescue Cfchat::ApiError => e
  puts "Error when calling TeamsApi->list_all_teams_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
account_id Integer The numeric ID of the account

Return type

Array<Team>

Authorization

userApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json; charset=utf-8

update_a_team

update_a_team(account_id, team_id, data)

Update a team

Update a team's attributes

Examples

require 'time'
require 'cfchat'
# setup authorization
Cfchat.configure do |config|
  # Configure API key authorization: userApiKey
  config.api_key['userApiKey'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  # config.api_key_prefix['userApiKey'] = 'Bearer'
end

api_instance = Cfchat::TeamsApi.new
account_id = 56 # Integer | The numeric ID of the account
team_id = 56 # Integer | The ID of the team to be updated
data = Cfchat::TeamCreateUpdatePayload.new # TeamCreateUpdatePayload | 

begin
  # Update a team
  result = api_instance.update_a_team(account_id, team_id, data)
  p result
rescue Cfchat::ApiError => e
  puts "Error when calling TeamsApi->update_a_team: #{e}"
end

Using the update_a_team_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> update_a_team_with_http_info(account_id, team_id, data)

begin
  # Update a team
  data, status_code, headers = api_instance.update_a_team_with_http_info(account_id, team_id, data)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <Team>
rescue Cfchat::ApiError => e
  puts "Error when calling TeamsApi->update_a_team_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
account_id Integer The numeric ID of the account
team_id Integer The ID of the team to be updated
data TeamCreateUpdatePayload

Return type

Team

Authorization

userApiKey

HTTP request headers

  • Content-Type: application/json; charset=utf-8
  • Accept: application/json; charset=utf-8

update_agents_in_team

<Array> update_agents_in_team(account_id, team_id, data)

Update Agents in Team

All agents except the one passed in params will be removed

Examples

require 'time'
require 'cfchat'
# setup authorization
Cfchat.configure do |config|
  # Configure API key authorization: userApiKey
  config.api_key['userApiKey'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  # config.api_key_prefix['userApiKey'] = 'Bearer'
end

api_instance = Cfchat::TeamsApi.new
account_id = 56 # Integer | The numeric ID of the account
team_id = 56 # Integer | The ID of the team to be updated
data = Cfchat::AddNewAgentToTeamRequest.new({user_ids: [37]}) # AddNewAgentToTeamRequest | 

begin
  # Update Agents in Team
  result = api_instance.update_agents_in_team(account_id, team_id, data)
  p result
rescue Cfchat::ApiError => e
  puts "Error when calling TeamsApi->update_agents_in_team: #{e}"
end

Using the update_agents_in_team_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(<Array>, Integer, Hash)> update_agents_in_team_with_http_info(account_id, team_id, data)

begin
  # Update Agents in Team
  data, status_code, headers = api_instance.update_agents_in_team_with_http_info(account_id, team_id, data)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <Array<Agent>>
rescue Cfchat::ApiError => e
  puts "Error when calling TeamsApi->update_agents_in_team_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
account_id Integer The numeric ID of the account
team_id Integer The ID of the team to be updated
data AddNewAgentToTeamRequest

Return type

Array<Agent>

Authorization

userApiKey

HTTP request headers

  • Content-Type: application/json; charset=utf-8
  • Accept: application/json; charset=utf-8