This is a Phone.com api Swagger definition
This Python package is automatically generated by the Swagger Codegen project:
- API version: 1.0.0
- Package version: 1.0.0
- Build package: io.swagger.codegen.languages.PythonClientCodegen
Python 2.7 and 3.4+
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 swagger_client
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 swagger_client
Please follow the installation procedure and then run the following:
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: apiKey
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.AccountsApi()
account_id = 56 # int | Account ID
try:
# Retrieve details of an individual account
api_response = api_instance.get_account(account_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling AccountsApi->get_account: %s\n" % e)
All URIs are relative to https://api.phone.com/v4
Class | Method | HTTP request | Description |
---|---|---|---|
AccountsApi | get_account | GET /accounts/{account_id} | Retrieve details of an individual account |
AccountsApi | list_accounts | GET /accounts | Get a list of accounts visible to the authenticated user or client. |
ApplicationsApi | get_account_application | GET /accounts/{account_id}/applications/{application_id} | Show details of an individual Application on a given account. |
ApplicationsApi | list_account_applications | GET /accounts/{account_id}/applications | This service lists the Applications on a given account |
AvailablenumbersApi | list_available_phone_numbers | GET /phone-numbers/available | |
CalleridsApi | get_caller_ids | GET /accounts/{account_id}/extensions/{extension_id}/caller-ids | Show the Caller ID options a given extension can use. |
CalllogsApi | get_account_call_logs | GET /accounts/{account_id}/call-logs/{call_id} | Show details of an individual Call Log entry |
CalllogsApi | list_account_call_logs | GET /accounts/{account_id}/call-logs | Get a list of call details associated with your account |
CallsApi | create_account_call | POST /accounts/{account_id}/calls | Make a phone call |
ContactsApi | create_account_extension_contact | POST /accounts/{account_id}/extensions/{extension_id}/contacts | Add a new address book contact for an extension. |
ContactsApi | delete_account_extension_contact | DELETE /accounts/{account_id}/extensions/{extension_id}/contacts/{contact_id} | Delete a contact from the address book. |
ContactsApi | get_account_extension_contact | GET /accounts/{account_id}/extensions/{extension_id}/contacts/{contact_id} | Retrieve the details of an address book contact. |
ContactsApi | list_account_extension_contacts | GET /accounts/{account_id}/extensions/{extension_id}/contacts | Show the Caller ID options a given extension can use. |
ContactsApi | replace_account_extension_contact | PUT /accounts/{account_id}/extensions/{extension_id}/contacts/{contact_id} | Update the info of a contact in the address book. |
DefaultApi | ping | GET /ping | The default API command |
DevicesApi | create_account_device | POST /accounts/{account_id}/devices | Register a generic VoIP device. |
DevicesApi | delete_account_device | DELETE /accounts/{account_id}/devices/{device_id} | Delete a VoIP device. |
DevicesApi | get_account_device | GET /accounts/{account_id}/devices/{device_id} | Show details of an individual VoIP device. |
DevicesApi | list_account_devices | GET /accounts/{account_id}/devices | Get a list of VoIP devices associated with your account. |
DevicesApi | replace_account_device | PUT /accounts/{account_id}/devices/{device_id} | Update the details of an individual VoIP device. |
ExpressservicecodesApi | get_account_express_srv_code | GET /accounts/{account_id}/express-service-codes/{code_id} | Show details of an account Express Service Code |
ExpressservicecodesApi | list_account_express_srv_codes | GET /accounts/{account_id}/express-service-codes | Get the Express Service Code associated with your account in list format. |
ExtensionsApi | create_account_extension | POST /accounts/{account_id}/extensions | Create an individual extension. |
ExtensionsApi | get_account_extension | GET /accounts/{account_id}/extensions/{extension_id} | Show details of an individual extension. |
ExtensionsApi | list_account_extensions | GET /accounts/{account_id}/extensions | Get a list of extensions visible to the authenticated user or client. |
ExtensionsApi | replace_account_extension | PUT /accounts/{account_id}/extensions/{extension_id} | Replace an individual extension. |
GroupsApi | create_account_extension_contact_group | POST /accounts/{account_id}/extensions/{extension_id}/contact-groups | Add a new contact group to an account extension. |
GroupsApi | delete_account_extension_contact_group | DELETE /accounts/{account_id}/extensions/{extension_id}/contact-groups/{group_id} | Delete a contact group from the address book. |
GroupsApi | get_account_extension_contact_group | GET /accounts/{account_id}/extensions/{extension_id}/contact-groups/{group_id} | Retrieve the information of a contact group. |
GroupsApi | list_account_extension_contact_groups | GET /accounts/{account_id}/extensions/{extension_id}/contact-groups | Show a list of contact groups belonging to an extension. |
GroupsApi | replace_account_extension_contact_group | PUT /accounts/{account_id}/extensions/{extension_id}/contact-groups/{group_id} | Update the information of a contact group. |
ListenersApi | create_account_listener | POST /accounts/{account_id}/listeners | Add a listener object to your account that can be used to subscribe an event. |
ListenersApi | delete_account_listener | DELETE /accounts/{account_id}/listeners/{listener_id} | Delete an individual event listener. |
ListenersApi | get_account_listener | GET /accounts/{account_id}/listeners/{listener_id} | Show details of an individual listener. |
ListenersApi | list_account_listeners | GET /accounts/{account_id}/listeners | Get a list of listeners for an account. |
ListenersApi | replace_account_listener | PUT /accounts/{account_id}/listeners/{listener_id} | Update the settings of an individual event listener. |
MediaApi | create_account_media_files | POST /accounts/{account_id}/media/files | Add a media object to your account that can be used as a greeting or hold music. Users may create a media by using the built-in Text-to-speech (TTS) facility or upload a file of their choice. (Note: The maximum size for media files or JSON objects included with a POST or PUT request is 10 MB) |
MediaApi | create_account_media_tts | POST /accounts/{account_id}/media/tts | Add a media object to your account that can be used as a greeting or hold music. Users may create a media by using the built-in Text-to-speech (TTS) facility or upload a file of their choice. (Note: The maximum size for media files or JSON objects included with a POST or PUT request is 10 MB) |
MediaApi | delete_account_media | DELETE /accounts/{account_id}/media/{media_id} | Delete an individual media record |
MediaApi | get_account_media | GET /accounts/{account_id}/media/{media_id} | Show details of an individual media recording (Greeting or Hold Music) |
MediaApi | list_account_media | GET /accounts/{account_id}/media | Get a list of media recordings for an account. |
MediaApi | replace_account_media_files | PUT /accounts/{account_id}/media/files/{media_id} | Update a media object to your account. Note: The maximum size for media files or JSON objects included with a POST or PUT request is 10 MB. |
MediaApi | replace_account_media_tts | PUT /accounts/{account_id}/media/tts/{media_id} | Update a media object to your account. |
MenusApi | create_account_menu | POST /accounts/{account_id}/menus | Create an individual menu. |
MenusApi | delete_account_menu | DELETE /accounts/{account_id}/menus/{menu_id} | Delete an individual menu. |
MenusApi | get_account_menu | GET /accounts/{account_id}/menus/{menu_id} | Show details of an individual menu. |
MenusApi | list_account_menus | GET /accounts/{account_id}/menus | Get a list of menus for an account. |
MenusApi | replace_account_menu | PUT /accounts/{account_id}/menus/{menu_id} | Replace an individual menu. |
NumberregionsApi | list_available_phone_number_regions | GET /phone-numbers/available/regions | |
OauthApi | create_oauth_access_token | POST /oauth/access-token | To create an access token via the /oauth/access-token API, an API user may choose any one of the grant types it supports: Authorization Code Grant, Client Credential Grant, Password Credential Grant or Refresh Token Grant. |
OauthApi | create_oauth_authorization | GET /oauth/authorization | Create Authorization Code or Access Token. |
OauthApi | get_oauth_access_token | GET /oauth/access-token | Retrieve details of an access token, such as scope, expiration and extension ID. |
OauthclientsApi | delete_account_oauth_client | DELETE /accounts/{account_id}/oauth/clients/{client_id} | Delete an individual OAuth client. |
OauthclientsApi | get_account_oauth_client | GET /accounts/{account_id}/oauth/clients/{client_id} | Show details of an individual OAuth client. |
OauthclientsApi | list_account_oauth_clients | GET /accounts/{account_id}/oauth/clients | Get a list of OAuth clients for an account. |
OauthclientsredirecturisApi | create_account_oauth_clients_redirect_uri | POST /accounts/{account_id}/oauth/clients/{client_id}/redirect-uris | Create an OAuth Client Redirect URI record. |
OauthclientsredirecturisApi | delete_account_oauth_clients_redirect_uri | DELETE /accounts/{account_id}/oauth/clients/{client_id}/redirect-uris/{uri_id} | Delete an OAuth Client Redirect URI record. |
OauthclientsredirecturisApi | get_account_oauth_clients_redirect_uri | GET /accounts/{account_id}/oauth/clients/{client_id}/redirect-uris/{uri_id} | Get details of an OAuth Client Redirect URI record. |
OauthclientsredirecturisApi | list_account_oauth_clients_redirect_uris | GET /accounts/{account_id}/oauth/clients/{client_id}/redirect-uris | Get a list of OAuth Client Redirect URIs for an account. |
PaymentmethodsApi | create_account_payment_method | POST /accounts/{account_id}/payment-methods | Create an individual payment method. |
PaymentmethodsApi | delete_account_payment_method | DELETE /accounts/{account_id}/payment-methods/{pm_id} | Delete an individual payment method. |
PaymentmethodsApi | get_account_payment_method | GET /accounts/{account_id}/payment-methods/{pm_id} | Show details of an individual payment method. |
PaymentmethodsApi | list_account_payment_methods | GET /accounts/{account_id}/payment-methods | Get a list of payment methods for an account. |
PaymentmethodsApi | patch_account_payment_method | PATCH /accounts/{account_id}/payment-methods/{pm_id} | Replace the status of an individual payment method. |
PhonenumbersApi | create_account_phone_number | POST /accounts/{account_id}/phone-numbers | Add a phone number to an account. |
PhonenumbersApi | get_account_phone_number | GET /accounts/{account_id}/phone-numbers/{number_id} | Show details of an individual phone number. |
PhonenumbersApi | list_account_phone_numbers | GET /accounts/{account_id}/phone-numbers | Get a list of phone numbers registered to an account. |
PhonenumbersApi | replace_account_phone_number | PUT /accounts/{account_id}/phone-numbers/{number_id} | Update the settings for an existing phone number on your account. |
QueuesApi | create_account_queue | POST /accounts/{account_id}/queues | Create a queue. |
QueuesApi | delete_account_queue | DELETE /accounts/{account_id}/queues/{queue_id} | Delete a queue. |
QueuesApi | get_account_queue | GET /accounts/{account_id}/queues/{queue_id} | Show details of an individual queue. |
QueuesApi | list_account_queues | GET /accounts/{account_id}/queues | Get a list of queues for an account. |
QueuesApi | replace_account_queue | PUT /accounts/{account_id}/queues/{queue_id} | Replace a queue. |
RoutesApi | create_route | POST /accounts/{account_id}/routes | Add a new route to the account. |
RoutesApi | delete_account_route | DELETE /accounts/{account_id}/routes/{route_id} | Delete a route from the account. |
RoutesApi | get_account_route | GET /accounts/{account_id}/routes/{route_id} | Show details of an individual route. |
RoutesApi | list_account_routes | GET /accounts/{account_id}/routes | Get a list of routes for an account. |
RoutesApi | replace_account_route | PUT /accounts/{account_id}/routes/{route_id} | Update the information of a route. |
SchedulesApi | get_account_schedule | GET /accounts/{account_id}/schedules/{schedule_id} | Show details of an individual schedule |
SchedulesApi | list_account_schedules | GET /accounts/{account_id}/schedules | Get a list of schedules for an account |
SmsApi | create_account_sms | POST /accounts/{account_id}/sms | Send a SMS to one or a group of recipients. |
SmsApi | get_account_sms | GET /accounts/{account_id}/sms/{sms_id} | This service shows the details of an individual SMS. |
SmsApi | list_account_sms | GET /accounts/{account_id}/sms | Get a list of SMS messages for an account. |
SmsApi | patch_account_sms | PATCH /accounts/{account_id}/sms/{sms_id} | Update the is_new parameter in a sms record. |
SubaccountpricingApi | create_account_subaccount_pricing | POST /accounts/{account_id}/subaccounts/{subaccount_id}/pricing | Add a pricing plan to a subaccount. |
SubaccountpricingApi | delete_account_subaccount_pricing | DELETE /accounts/{account_id}/subaccounts/{subaccount_id}/pricing/{pricing_id} | Delete a pricing plan from a subaccount. |
SubaccountpricingApi | get_account_subaccount_pricing | GET /accounts/{account_id}/subaccounts/{subaccount_id}/pricing/{pricing_id} | Get the details of a pricing plan for a subaccount. |
SubaccountpricingApi | list_account_subaccount_pricing | GET /accounts/{account_id}/subaccounts/{subaccount_id}/pricing | Get a list of pricing plans for a subaccount. |
SubaccountsApi | create_account_subaccount | POST /accounts/{account_id}/subaccounts | Add a subaccount for the authenticated user or client |
SubaccountsApi | list_account_subaccounts | GET /accounts/{account_id}/subaccounts | Get a list of subaccounts for the authenticated user or client |
TrunksApi | create_account_trunk | POST /accounts/{account_id}/trunks | Add a trunk record with SIP information. |
TrunksApi | delete_account_trunk | DELETE /accounts/{account_id}/trunks/{trunk_id} | Delete a trunk from account. |
TrunksApi | get_account_trunk | GET /accounts/{account_id}/trunks/{trunk_id} | Show details of an individual trunk. |
TrunksApi | list_account_trunks | GET /accounts/{account_id}/trunks | Get a list of trunks for an account. |
TrunksApi | replace_account_trunk | PUT /accounts/{account_id}/trunks/{trunk_id} | Replace parameters in a trunk. |
VoicemailApi | get_account_voicemail | GET /accounts/{account_id}/voicemail/{voicemail_id} | This service shows the details of an individual voicemail. |
VoicemailApi | list_account_voicemail | GET /accounts/{account_id}/voicemail | Get a list of voicemail messages for an account. |
VoicemailApi | patch_account_voicemail | PATCH /accounts/{account_id}/voicemail/{voicemail_id} | Update the is_new parameter in a voicemail record. |
- AccountFull
- AccountSummary
- Address
- AddressListContacts
- ApplicationFull
- ApplicationSummary
- AvailableNumbersFull
- CallDetails
- CallFull
- CallLogFull
- CallNotifications
- CallbackObject
- CallerIdFull
- CallerIdPhoneNumber
- ContactAccount
- ContactFull
- ContactResponse
- ContactSummary
- CreateCallParams
- CreateContactParams
- CreateDeviceParams
- CreateExtensionParams
- CreateGroupParams
- CreateListenerParams
- CreateMediaParams
- CreateMenuParams
- CreateOauthParams
- CreatePaymentParams
- CreatePhoneNumberParams
- CreatePricingParams
- CreateQueueParams
- CreateRedirectUriParams
- CreateRouteParams
- CreateSmsParams
- CreateSubaccountParams
- CreateTrunkParams
- DeleteEntry
- DeviceFull
- DeviceMembership
- DeviceSummary
- ExpressServiceCodeFull
- ExtensionFull
- ExtensionSummary
- FilterCallLogs
- FilterIdArray
- FilterIdDirectionFrom
- FilterIdExtensionNameArray
- FilterIdGroupIdUpdatedAtArray
- FilterIdNameArray
- FilterIdNamePhoneNumberArray
- FilterListAvailableNumbers
- FilterListPhoneNumbersRegions
- FilterNameNumberArray
- FilterVoicemailArray
- FromObject
- GetOauthAccessToken
- Greeting
- GreetingInput
- GroupFull
- GroupListContacts
- GroupSummary
- HoldMusic
- Line
- ListAccounts
- ListApplications
- ListAvailableNumbers
- ListCallLogs
- ListCallerIds
- ListContacts
- ListDevices
- ListExpressServiceCodes
- ListExtensions
- ListGroups
- ListListeners
- ListMedia
- ListMenus
- ListOauthClients
- ListOauthClientsRedirectUris
- ListPaymentMethods
- ListPhoneNumbers
- ListPhoneNumbersRegions
- ListPricings
- ListQueues
- ListRoutes
- ListSchedules
- ListSms
- ListTrunks
- ListVoicemail
- ListenerFull
- MediaFull
- MediaSummary
- Member
- MenuFull
- MenuSummary
- Notification
- OauthAccessToken
- OauthClientFull
- OauthClientRedirectUriFull
- Option
- PatchPaymentParams
- PatchSmsParams
- PatchVoicemailParams
- PaymentFull
- PaymentSummary
- PhoneNumberContact
- PhoneNumberFull
- PhoneNumbersRegionFull
- PingResponse
- PricingFull
- PricingObject
- QueueFull
- QueueSummary
- Recipient
- RedirectUriFull
- ReplaceExtensionParams
- ReplaceMenuParams
- ReplacePhoneNumberParams
- RouteFull
- RouteSummary
- RuleSet
- RuleSetAction
- RuleSetFilter
- RuleSetForwardItem
- ScheduleFull
- ScheduleSummary
- ScopeDetails
- SipAuthentication
- SmsForwarding
- SmsForwardingParams
- SmsFull
- SortCallLogs
- SortId
- SortIdCreatedAt
- SortIdExtensionName
- SortIdName
- SortIdNamePhoneNumber
- SortIdUpdatedAt
- SortListAvailableNumbers
- SortListPhoneNumbersRegions
- SortNameNumber
- TrunkFull
- TrunkSummary
- Voicemail
- VoicemailFull
- VoicemailInput
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header