Skip to content

QualityUnit/LiveAgent-api-python

Repository files navigation

liveagent-api

This page contains complete API documentation for LiveAgent software. To display additional info and examples for specific API method, just click on the method name in the list below.

To be able to make API requests you need to generate an API key in your admin panel first. See this article for detailed info.

Additional info about more advanced agent, contact or ticket API filters can be found in this article.

If you have any question or doubts regarding this API, please do not hesitate to contact our support team.

This Python package is automatically generated by the Swagger Codegen project:

  • API version: 3.0.0
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.languages.PythonClientCodegen

Requirements.

Python 2.7 and 3.4+

Installation & Usage

pip install

If the python package is hosted on Github, you can install directly from Github

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)

Then import the package:

import liveagent_api 

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import liveagent_api

Getting Started

Please follow the installation procedure and then run the following:

from __future__ import print_function
import time
import liveagent_api
from liveagent_api.rest import ApiException
from pprint import pprint

# Configure API key authorization: apikey
configuration = liveagent_api.Configuration()
configuration.api_key['apikey'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apikey'] = 'Bearer'
# Configure OAuth2 access token for authorization: privileges
configuration = liveagent_api.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = liveagent_api.AgentPhoneApi(liveagent_api.ApiClient(configuration))
agent_id = 'agent_id_example' # str | 
type = 'I' # str | API (I - default), SIP (S) (optional) (default to I)

try:
    # Gets phone currently used by agent (use me as agentId for self)
    api_response = api_instance.get_agent_phone(agent_id, type=type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AgentPhoneApi->get_agent_phone: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://localhost/api/v3

Class Method HTTP request Description
AgentPhoneApi get_agent_phone GET /agent_phone/{agentId} Gets phone currently used by agent (use me as agentId for self)
AgentPhoneApi set_agent_phone PUT /agent_phone/{agentId} Sets phone currently used by agent (use me as agentId for self)
AgentsApi convert_registered_visitor POST /agents/convert Convert registered visitor
AgentsApi delete_agent DELETE /agents/{userId} Agent
AgentsApi get_agent GET /agents/{userId} Agent
AgentsApi get_agent_statuses GET /agents/{userId}/status Get agent statuses in departments
AgentsApi get_agents GET /agents Agent list
AgentsApi get_agents_activity GET /agents/activity Agent Activity list
AgentsApi login_key GET /agents/{userId}/login_key Get login key
AgentsApi logout_agent POST /agents/{userId}/_logout Logout agent
AgentsApi pause_agent POST /agents/{userId}/_pause Pause agent
AgentsApi undelete_agent POST /agents/undelete Undelete agent
AgentsApi update_agent PUT /agents/{userId} Update agent
AgentsApi update_call_settings POST /agents/{userId}/updateVoiceStatus Update general voice status
ApiApi create_api_keys POST /apikeys Creates api key
ApiApi delete_api_key DELETE /apikeys/{apikeyId} Deletes api key
ApiApi generate_api_key POST /apikeys/regenerateApiV3/{apikeyId} Gets new api keys
ApiApi generate_api_v1_key POST /apikeys/regenerateApiV1 Gets new api keys
ApiApi generate_sso_key POST /sso Generate SSO key
ApiApi get_api_info GET /api/info/{apiVersion} Gets api info
ApiApi get_api_key GET /apikeys/{apikeyId} Gets api keys
ApiApi get_api_keys GET /apikeys Gets api keys
ApiApi get_api_privileges GET /api/privileges Gets api privileges
ApiApi get_api_v3_keys_count GET /api/v3/count Gets count for api v3 keys
ApiApi get_sso_key GET /sso Get SSO key
ApiApi login POST /apikeys/_login Creates or returns API key from login.
ApiApi update_api_key PUT /apikeys/{apikeyId} Updates api key
BansApi create_ban POST /bans Create ban
BansApi exclude_ip_ban PUT /bans/_exclude Exclude banned IP address
BansApi expire_ban POST /bans/{banId}/_expire Expire ban
BansApi get_ban GET /bans/{banId} Get ban item
BansApi get_bans GET /bans Bans list
BansApi update_ban PUT /bans/{banId} Update ban
CallsApi call_add_message POST /calls/{callId}/messages Adds a message to the call group in corresponding ticket
CallsApi call_add_recording POST /calls/{callId}/recordings Adds a recording to the call group in corresponding ticket
CallsApi call_answer POST /calls/{callId}/_answer Set call as answered by agent
CallsApi call_blind_transfer POST /calls/{callId}/_blind_transfer Transfers call to different department / agent
CallsApi call_change_channel_status PUT /calls/{callId}/channels/{channelId}/_status Change channel status
CallsApi call_create POST /calls/{callId} Create new call
CallsApi call_fetch_ivr POST /calls/{callId}/_fetchIvr Fetches IVR for the call from external URL
CallsApi call_get_status GET /calls/{callId}/status Return the status of call
CallsApi call_id GET /calls/channels/{channelId}/call_id Return the call ID
CallsApi call_move_channel POST /calls/{callId}/channels/{channelId}/_move Moves existing channel to target call
CallsApi call_pickup POST /calls/_pickup Pick up call from queue
CallsApi call_remove_channel DELETE /calls/{callId}/channels/{channelId} Removes channel from the call
CallsApi call_reroute POST /calls/{callId}/_reroute Let the call ring to another agent
CallsApi call_ring POST /calls/{callId}/_ring Let the call ring
CallsApi call_start POST /call/_start Starts new outcoming / internal call
CallsApi call_start_canceled POST /call/_startCanceled Callback that starting call canceled
CallsApi call_start_failed POST /call/_startFailed Callback that starting call failed
CallsApi call_stop POST /calls/{callId}/_stop Stops the call
CallsApi call_transfer POST /calls/{callId}/_transfer Transfers call to different department / agent
CallsApi confirm_ring POST /calls/{callId}/_confirmRing Confirm that call is ringing
CallsApi dtmf_channel POST /calls/{callId}/channels/{channelId}/_dtmf Send provided DTMF to channel
CallsApi end_channel POST /calls/{callId}/channels/{channelId}/_end End channel
CallsApi get_calls_count GET /calls/count Gets count for calls history
CallsApi get_calls_list GET /calls Gets list of calls
CallsApi hold_channel POST /calls/{callId}/channels/{channelId}/_hold Hold channel
CallsApi merge POST /calls/{callId}/_merge Merge two calls
CallsApi mute_channel POST /calls/{callId}/channels/{channelId}/_mute Mute channel
CallsApi stop_ring POST /calls/{callId}/_stopRing Stop ringing of call
CallsApi unhold_channel POST /calls/{callId}/channels/{channelId}/_unhold Unhold channel
CallsApi unmute_channel POST /calls/{callId}/channels/{channelId}/_unmute Unmute channel
CannedMessagesApi create_canned_message POST /canned_messages Create canned message
CannedMessagesApi delete_canned_message DELETE /canned_messages/{cannedMessageId} Canned message
CannedMessagesApi get_canned_message GET /canned_messages/{cannedMessageId} Gets canned message
CannedMessagesApi get_canned_messages_list GET /canned_messages Gets list of canned messages
CannedMessagesApi update_canned_message PUT /canned_messages/{cannedMessageId} Update canned message
ChatsApi get_chats_list GET /chats Gets list of chats
CompaniesApi create_company POST /companies Create new company
CompaniesApi delete_company DELETE /companies/{companyId} Delete company
CompaniesApi get_companies_list GET /companies Gets list of companies
CompaniesApi get_specific_company GET /companies/{companyId} Get company by specific id
CompaniesApi register_company PUT /companies/{companyId}/_register Register company
CompaniesApi unregister_company DELETE /companies/{companyId}/_unregister Unregister company
CompaniesApi update_company PUT /companies/{companyId} Update company
ContactPhonesApi get_contact_phone GET /contact_phones/{phone} Get contact phone
ContactPhonesApi get_contact_phones_list GET /contact_phones Gets list of contact phones
ContactsApi create_contact POST /contacts Create new contact
ContactsApi delete_contact DELETE /contacts/{contactId} Delete contact
ContactsApi get_contacts_list GET /contacts Gets list of contacts
ContactsApi get_specific_contact GET /contacts/{contactId} Get contact by specific id
ContactsApi patch_contact PATCH /contacts/{contactId} Update contact partially
ContactsApi register_contact PUT /contacts/{contactId}/_register Register contact
ContactsApi unregister_contact DELETE /contacts/{contactId}/_unregister Unregister contact
ContactsApi update_contact PUT /contacts/{contactId} Update whole contact
CustomButtonsApi create_custom_button POST /custom_buttons Create new custom button
CustomButtonsApi delete_custom_button DELETE /custom_buttons/{customButtonId} Delete custom button
CustomButtonsApi get_custom_button GET /custom_buttons/{customButtonId} Get custom button by id
CustomButtonsApi get_custom_buttons_list GET /custom_buttons Gets list of custom buttons
CustomButtonsApi update_custom_button PUT /custom_buttons/{customButtonId} Update custom button
DepartmentsApi get_department_list GET /departments Gets list of departments
DepartmentsApi get_specific_department GET /departments/{departmentId} Get department by specific id
DepartmentsApi if_agent_is_in_department GET /departments/{departmentId}/{agentId} Is the agent in the department
DevicesApi create_device POST /devices Create new device
DevicesApi create_device_department_plans POST /devices/{deviceId}/departments/{departmentId}/plans Create device department plans
DevicesApi delete_device DELETE /devices/{deviceId} Delete device
DevicesApi delete_device_department_plans DELETE /devices/{deviceId}/departments/{departmentId}/plans Delete device department plans
DevicesApi get_device GET /devices/{deviceId} Get device by id
DevicesApi get_device_department GET /devices/{deviceId}/departments/{departmentId} Get device department by id
DevicesApi get_device_departments GET /devices/{deviceId}/departments Get device departments
DevicesApi get_device_departments_by_department_id GET /devices/departments/{departmentId} Get device departments by department id
DevicesApi get_device_plans GET /devices/{deviceId}/plans Get device plans
DevicesApi get_devices_list GET /devices Gets list of devices
DevicesApi get_my_mobile_devices_list GET /devices/app Gets list of current agent's mobile devices. Creates new one if there are no devices.
DevicesApi update_device PUT /devices/{deviceId} Update device
DevicesApi update_device_department PUT /devices/{deviceId}/departments/{departmentId} Update device department
DevicesApi update_device_departments PUT /devices/departments/update Update device departments
ElasticApi clean_tickets POST /elastic/cleanDeletedData Remove all es-documents that dont exist in primary db
ElasticApi get_index_status GET /elastic/status Get reindex status
ElasticApi reindex POST /elastic/reindex Reindex selected fields
ElasticApi reindex_all POST /elastic/reindexAll Reindex all fields
ElasticApi update_ticket_check_task POST /elastic/updateTicketCheckTask Update ticket check task
ExtensionsApi get_extension GET /extensions/{extensionId} Gets Extension
ExtensionsApi get_extensions_count GET /extensions/count Gets count for extensions
ExtensionsApi get_extensions_list GET /extensions Gets list of extensions
ExtensionsApi set_extension PUT /extensions/{extensionId} Set extension
FilesApi upload_file POST /files Upload new file to the system
FiltersApi create_filter POST /filters Create filter
FiltersApi delete_filter DELETE /filters/{filterId} Delete filter
FiltersApi get_filter GET /filters/{filterId} Get filter
FiltersApi get_filters GET /filters Filters list
FiltersApi update_filter PUT /filters/{filterId} Update filter
GridApi get_agents_grid_list GET /grid/agents Gets list of agents for grid
GridApi get_agents_grid_list_count GET /grid/agents/count Gets count of agents for agents grid
GridApi get_calls_sla_log_grid_list GET /grid/calls/sla Gets list of call slas for grid
GridApi get_calls_sla_log_grid_list_count GET /grid/calls/sla/count Gets count of calls for tickets sla grid
GridApi get_chats_grid_list GET /grid/chats Gets list of chats for chats grid
GridApi get_chats_grid_list_count GET /grid/chats/count Gets count of chats for chats grid
GridApi get_chats_sla_log_grid_list GET /grid/chats/sla Gets list of chat slas for grid
GridApi get_chats_sla_log_grid_list_count GET /grid/chats/sla/count Gets count of chats for chats sla grid
GridApi get_contact_widgets_count GET /grid/contact-widgets/count Gets count for contact widgets
GridApi get_contact_widgets_list GET /grid/contact-widgets Gets contact widget for grid
GridApi get_customer_groups_grid_list GET /grid/customer_groups Gets list of customer groups for grid
GridApi get_departmens_grid_list_count GET /grid/departments/count Gets count of departments for department grid
GridApi get_departments_grid_list GET /grid/departments Gets list of departments for grid
GridApi get_event_logs_grid_list GET /grid/eventlogs Gets list of event logs for grid
GridApi get_event_logs_grid_list_count GET /grid/eventlogs/count Gets count of logs for event logs grid
GridApi get_invite_agents_grid_list GET /grid/{departmentId}/invite/agents Gets list of invite agents for grid
GridApi get_languages_grid_list GET /grid/languages Gets list of languages for grid
GridApi get_languages_grid_list_count GET /grid/languages/count Gets count of languages for languages grid
GridApi get_plugind_grid_list GET /grid/plugins Gets plugins for grid
GridApi get_tags_grid_list GET /grid/tags Gets list of tags for grid
GridApi get_tickets_grid_dataset GET /grid/tickets_new Gets list of tickets for tickets grid
GridApi get_tickets_grid_list GET /grid/tickets Gets list of tickets for tickets grid
GridApi get_tickets_grid_list_count GET /grid/tickets/count Gets count of tickets for tickets grid
GridApi get_tickets_sla_log_grid_list GET /grid/tickets/sla Gets list of ticket slas for grid
GridApi get_tickets_sla_log_grid_list_count GET /grid/tickets/sla/count Gets count of tickets for tickets sla grid
GridApi get_time_reports_grid_list GET /grid/reports/time Gets list of reports for time reports grid
GridApi get_time_reports_grid_list_count GET /grid/reports/time/count Gets count of time reporst grid
GroupsApi create_group POST /groups Create contact group
GroupsApi delete_group DELETE /groups/{groupId} Delete contact group
GroupsApi get_group_by_id GET /groups/{groupId} Get contact group by group id
GroupsApi get_groups_list GET /groups Gets list of contact groups
GroupsApi update_group PUT /groups/{groupId} Update contact group
HostingApi get_info GET /hosting/info Used hosting system info
MessagesApi delete_message DELETE /messages/{messageId} Delete message
MessagesApi get_message GET /messages/{messageId} Get message
MyAccountApi get_my_account_link GET /my_account/_link Link to 'My account'
PageVisitsApi get_page_visit_by_contact_id GET /page_visits/{contactId}/contact Gets a page visits
PhoneNumbersApi add_number POST /phone_numbers Add new number
PhoneNumbersApi get_available_prefix GET /phone_numbers/availablePrefix Gets available dial out prefix
PhoneNumbersApi get_phone_number GET /phone_numbers/{phoneNumberId} Gets phone number
PhoneNumbersApi get_phone_numbers_list GET /phone_numbers Gets list of available phone numbers
PhoneNumbersApi remove_phone_number DELETE /phone_numbers/{phoneNumberId} Remove phone number
PhoneNumbersApi update_phone_number PUT /phone_numbers/{phoneNumberId} Update phone number
PhoneNumbersApi update_phone_number_status PUT /phone_numbers/{phoneNumberId}/status Update phone number status
PhonesApi get_phone GET /phones/{phoneId} Gets phone device (use app for LiveAgent Phone app device and web for web device)
PhonesApi get_phones_list GET /phones Gets list of available phone devices. Special filters (userId - filter phones available for specified user only)
PhonesApi update_phone_params PUT /phones/{phoneId}/_updateParams Update mobile app phone params
PingApi ping GET /ping Check that API is responding
PredefinedAnswersApi create_predefined_answer POST /predefined_answers Create predefined answer
PredefinedAnswersApi delete_predefined_answer DELETE /predefined_answers/{predefinedAnswerId} Predefined answer
PredefinedAnswersApi get_predefined_answer GET /predefined_answers/{predefinedAnswerId} Gets canned message
PredefinedAnswersApi get_predefined_answers_list GET /predefined_answers Gets list of predefined answers
PredefinedAnswersApi update_predefined_answer PUT /predefined_answers/{predefinedAnswerId} Update predefined answer
QueueApi get_queue_batch GET /queue/batch/{batchId} Retrieves the batch status and remaining items to process
SettingsApi get_settings GET /settings Gets settings list
SipConfigurationApi update_entities POST /sip_configuration/restore Restore all data in VoIP DB
SlackApi get_conversation GET /slack/conversation/{id} Gets info about Slack workspace channel
SlackApi get_conversations GET /slack/conversations Gets Slack workspace channels
SlackApi get_slack_user GET /slack/user/{id} Gets info about Slack user
SlackApi get_template GET /slack/template/{id} Get Slack template
SlackApi get_templates GET /slack/templates Gets Slack notification templates
SlackApi get_users GET /slack/users Gets Slack users in workspace
SlackApi save_template PUT /slack/template/{id} Save Slack template
SlasApi get_sla GET /slas/{levelId} Gets sla
SlasApi get_sla_ticket_history GET /slas/{ticketId}/history Gets ticket sla history
SlasApi get_slas_list GET /slas Gets list of slas
SubscriptionsApi get_billing_status GET /subscriptions/{subscriptionId}/billingStatus Billing status
SubscriptionsApi get_domain_info GET /subscriptions/{subscriptionId}/domain Domain info
SubscriptionsApi get_subscription_discounts GET /subscriptions/{subscriptionId}/discounts Subscription discounts
SubscriptionsApi set_custom_domain PUT /subscriptions/{subscriptionId}/custom_domain Custom domain
TagsApi create_tag POST /tags Create tag
TagsApi delete_tag DELETE /tags/{tagId} Delete tag
TagsApi get_tag_by_id GET /tags/{tagId} Get tag by tag id
TagsApi get_tags_list GET /tags Gets list of tags
TagsApi update_tag PUT /tags/{tagId} Update tag
TicketsApi create_ticket POST /tickets Create ticket
TicketsApi delete_ticket DELETE /tickets/{ticketId} Deletes ticket
TicketsApi get_ticket GET /tickets/{ticketId} Gets ticket
TicketsApi get_ticket_attribute GET /tickets/{ticketId}/attributes/{attributeName} Gets ticket attribute
TicketsApi get_ticket_history GET /tickets/history Gets ticket
TicketsApi get_ticket_history_0 GET /tickets/{ticketId}/history Gets ticket history
TicketsApi get_ticket_history_count GET /tickets/history/count Gets count for ticket history
TicketsApi get_ticket_message_groups GET /tickets/{ticketId}/messages Gets ticket message groups and messages
TicketsApi get_ticket_sla GET /tickets/{ticketId}/sla Gets ticket Sla
TicketsApi get_tickets_list GET /tickets Gets list of tickets
TicketsApi set_ticket_attribute PUT /tickets/{ticketId}/attributes/{attributeName} Sets ticket attribute
TicketsApi set_ticket_postpone PUT /tickets/{ticketId}/postpone Sets postpone status to ticket
TicketsApi update_ticket PUT /tickets/{ticketId} Updates ticket
TimeZonesApi get_timezones_list GET /time_zones Gets list of timezones
TokenApi get_access_token GET /token Access token
UserApi get_user GET /users/{userId} User
VariationsApi get_variation GET /variations/{variationId} Variation
ViberApi change_status PUT /viber_accounts/{accountId}/status Update Viber account status
ViberApi connect_account POST /viber_accounts Connect Viber account
ViberApi disconnect DELETE /viber_accounts/{accountId} Disconnect Viber account
ViberApi get GET /viber_accounts/{accountId} Get Viber account
ViberApi get_accounts GET /viber_accounts Gets Viber accounts
ViberApi get_accounts_count GET /viber_accounts/count Gets count for Viber accounts
ViberApi update PUT /viber_accounts/{accountId} Update Viber account

Documentation For Models

Documentation For Authorization

apikey

  • Type: API key
  • API key parameter name: apikey
  • Location: HTTP header

privileges

  • Type: OAuth
  • Flow: accessCode
  • Authorization URL: https://www.liveagent.com/
  • Scopes:
  • invoice.read: Read invoices
  • subscription.own: Read/write own subscriptions (use 'me' as subscriptionId)
  • subscription.read: Subscriptions read
  • subscription.write: Subscriptions write
  • hosted_account.read: Hosted account read
  • hosted_account.write: Hosted account write
  • call.write: Call write
  • call.read: Call read
  • agent.own: Read/write me
  • agent.read: Agent read
  • agent.manage: Agent manage
  • agent_status.read: Read agent status
  • agent_status.own: Manage own status
  • agent_status.manage: Manage agent status
  • phone.read: Read all phones
  • phone.write: Write all phones
  • phone.own: Read/write phones available to me
  • user.read: Read all contacts
  • user.write: Write contact
  • file.add: Upload files
  • hosting.login: agent login
  • tag.read: Read tags
  • tag.manage: Manage tags
  • canned_message.read: Read canned messages
  • canned_message.manage: Manege canned messages
  • predefined_answer.read: Read predefined answer
  • predefined_answer.manage: Manage predefined answer
  • api.read: Read api
  • api.read_own: Read own apikeys
  • api.write: Modify api
  • api.write_own: Modify own apikeys
  • api.delete: Delete api keys
  • time_report.read: Read time reports
  • ticket.answer: Ticket answer
  • ticket.create: Create new conversation
  • ticket.close: Close ticket
  • ticket.read: Ticket read
  • ticket.read_all: Ticket read all
  • ticket.operate: Operations with ticket(update)
  • ticket.change_state: Operations with ticket(change state, delete)
  • ticket.mass: Ticket mass action (status and remaining items to process)
  • device.own: Read/write devices available to me
  • device.manage: Manage agent devices
  • sla.read: Read sla
  • contact_phone.read: Read contact phone
  • chats.read: Read chats
  • settings.read: Read ban
  • settings.write: Write ban
  • page_visit.read: Read page visits
  • page_visit.write: Write page visits
  • viber_account.read: Read Viber account
  • viber_account.write: Write Viber account
  • reindex.read: Read reindex
  • reindex.write: Write reindex
  • custom_button.read: Read custom buttons
  • custom_button.write: Modify custom buttons
  • sip_configuration.manage: Manage SIP entities
  • sso.read: Read SSO
  • sso.read_own: Read own SSO
  • sso.write: Write SSO
  • sso.write_own: Write own SSO
  • eventlogs.read: Read event logs
  • plugin_settings.read: Read plugins
  • contact.create: Create contact
  • contact.read: Read contact
  • contact.edit: Edit contact
  • contact.delete: Delete contact
  • button.read: Read chat buttons
  • filter.read: Read filters
  • filter.write: Write tickets filters

Author

support@qualityunit.com

About

Python client for LiveAgent API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published