All URIs are relative to https://api.phone.com/v4
Method | HTTP request | Description |
---|---|---|
create_account_extension_contact | POST /accounts/{account_id}/extensions/{extension_id}/contacts | Add a new address book contact for an extension. |
delete_account_extension_contact | DELETE /accounts/{account_id}/extensions/{extension_id}/contacts/{contact_id} | Delete a contact from the address book. |
get_account_extension_contact | GET /accounts/{account_id}/extensions/{extension_id}/contacts/{contact_id} | Retrieve the details of an address book contact. |
list_account_extension_contacts | GET /accounts/{account_id}/extensions/{extension_id}/contacts | Show the Caller ID options a given extension can use. |
replace_account_extension_contact | PUT /accounts/{account_id}/extensions/{extension_id}/contacts/{contact_id} | Update the info of a contact in the address book. |
ContactFull create_account_extension_contact(account_id, extension_id, data=data)
Add a new address book contact for an extension.
Add a new address book contact for an extension. See Account Contacts for more info on the fields in each item.
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.ContactsApi()
account_id = 56 # int | Account ID
extension_id = 56 # int | Extension ID
data = swagger_client.CreateContactParams() # CreateContactParams | Contact data (optional)
try:
# Add a new address book contact for an extension.
api_response = api_instance.create_account_extension_contact(account_id, extension_id, data=data)
pprint(api_response)
except ApiException as e:
print("Exception when calling ContactsApi->create_account_extension_contact: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
account_id | int | Account ID | |
extension_id | int | Extension ID | |
data | CreateContactParams | Contact data | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteEntry delete_account_extension_contact(account_id, extension_id, contact_id)
Delete a contact from the address book.
Delete a contact from the address book. See Account Contacts for more info on the fields in each item.
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.ContactsApi()
account_id = 56 # int | Account ID
extension_id = 56 # int | Extension ID
contact_id = 56 # int | Contact ID
try:
# Delete a contact from the address book.
api_response = api_instance.delete_account_extension_contact(account_id, extension_id, contact_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling ContactsApi->delete_account_extension_contact: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
account_id | int | Account ID | |
extension_id | int | Extension ID | |
contact_id | int | Contact ID |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ContactFull get_account_extension_contact(account_id, extension_id, contact_id)
Retrieve the details of an address book contact.
Retrieve the details of an address book contact. See Account Contacts for more info on the fields in each item.
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.ContactsApi()
account_id = 56 # int | Account ID
extension_id = 56 # int | Extension ID
contact_id = 56 # int | Contact ID
try:
# Retrieve the details of an address book contact.
api_response = api_instance.get_account_extension_contact(account_id, extension_id, contact_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling ContactsApi->get_account_extension_contact: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
account_id | int | Account ID | |
extension_id | int | Extension ID | |
contact_id | int | Contact ID |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListContacts list_account_extension_contacts(account_id, extension_id, filters_id=filters_id, filters_group_id=filters_group_id, filters_updated_at=filters_updated_at, sort_id=sort_id, sort_updated_at=sort_updated_at, limit=limit, offset=offset, fields=fields)
Show the Caller ID options a given extension can use.
Show the Caller ID options a given extension can use. See Intro to Caller IDs for more on the properties.
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.ContactsApi()
account_id = 56 # int | Account ID
extension_id = 56 # int | Extension ID
filters_id = ['filters_id_example'] # list[str] | ID filter (optional)
filters_group_id = ['filters_group_id_example'] # list[str] | Group filter (optional)
filters_updated_at = ['filters_updated_at_example'] # list[str] | Updated At filter (optional)
sort_id = 'sort_id_example' # str | ID sorting (optional)
sort_updated_at = 'sort_updated_at_example' # str | Updated At sorting (optional)
limit = 56 # int | Max results (optional)
offset = 56 # int | Results to skip (optional)
fields = 'fields_example' # str | Field set (optional)
try:
# Show the Caller ID options a given extension can use.
api_response = api_instance.list_account_extension_contacts(account_id, extension_id, filters_id=filters_id, filters_group_id=filters_group_id, filters_updated_at=filters_updated_at, sort_id=sort_id, sort_updated_at=sort_updated_at, limit=limit, offset=offset, fields=fields)
pprint(api_response)
except ApiException as e:
print("Exception when calling ContactsApi->list_account_extension_contacts: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
account_id | int | Account ID | |
extension_id | int | Extension ID | |
filters_id | list[str] | ID filter | [optional] |
filters_group_id | list[str] | Group filter | [optional] |
filters_updated_at | list[str] | Updated At filter | [optional] |
sort_id | str | ID sorting | [optional] |
sort_updated_at | str | Updated At sorting | [optional] |
limit | int | Max results | [optional] |
offset | int | Results to skip | [optional] |
fields | str | Field set | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ContactFull replace_account_extension_contact(account_id, extension_id, contact_id, data=data)
Update the info of a contact in the address book.
Update the info of a contact in the address book. See Account Contacts for more info on the fields in each item.
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.ContactsApi()
account_id = 56 # int | Account ID
extension_id = 56 # int | Extension ID
contact_id = 56 # int | Contact ID
data = swagger_client.CreateContactParams() # CreateContactParams | Contact data (optional)
try:
# Update the info of a contact in the address book.
api_response = api_instance.replace_account_extension_contact(account_id, extension_id, contact_id, data=data)
pprint(api_response)
except ApiException as e:
print("Exception when calling ContactsApi->replace_account_extension_contact: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
account_id | int | Account ID | |
extension_id | int | Extension ID | |
contact_id | int | Contact ID | |
data | CreateContactParams | Contact data | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]