All URIs are relative to https://rest.clicksend.com/v3
| Method | HTTP request | Description |
|---|---|---|
| lists_by_list_id_delete | DELETE /lists/{list_id} | ListsByListIdDelete |
| lists_by_list_id_get | GET /lists/{list_id} | Get specific contact list |
| lists_by_list_id_put | PUT /lists/{list_id} | Update specific contact list |
| lists_get | GET /lists | Get all contact lists |
| lists_import_by_list_id_post | POST /lists/{list_id}/import | Import contacts to list |
| lists_post | POST /lists | Create new contact list |
| lists_remove_duplicates_by_list_id_put | PUT /lists/{list_id}/remove-duplicates | Remove duplicate contacts |
str lists_by_list_id_delete(list_id)
ListsByListIdDelete
Delete a specific contact list
from __future__ import print_function
import time
import clicksend_client
from clicksend_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = clicksend_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = clicksend_client.ContactListApi(clicksend_client.ApiClient(configuration))
list_id = 56 # int | List ID
try:
# ListsByListIdDelete
api_response = api_instance.lists_by_list_id_delete(list_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling ContactListApi->lists_by_list_id_delete: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| list_id | int | List ID |
str
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
str lists_by_list_id_get(list_id)
Get specific contact list
Get specific contact list
from __future__ import print_function
import time
import clicksend_client
from clicksend_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = clicksend_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = clicksend_client.ContactListApi(clicksend_client.ApiClient(configuration))
list_id = 56 # int | List ID
try:
# Get specific contact list
api_response = api_instance.lists_by_list_id_get(list_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling ContactListApi->lists_by_list_id_get: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| list_id | int | List ID |
str
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
str lists_by_list_id_put(list_id, contact_list)
Update specific contact list
Update specific contact list
from __future__ import print_function
import time
import clicksend_client
from clicksend_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = clicksend_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = clicksend_client.ContactListApi(clicksend_client.ApiClient(configuration))
list_id = 56 # int | Your list id
contact_list = clicksend_client.ContactList() # ContactList | Contact list model
try:
# Update specific contact list
api_response = api_instance.lists_by_list_id_put(list_id, contact_list)
pprint(api_response)
except ApiException as e:
print("Exception when calling ContactListApi->lists_by_list_id_put: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| list_id | int | Your list id | |
| contact_list | ContactList | Contact list model |
str
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
str lists_get(page=page, limit=limit)
Get all contact lists
Get all contact lists
from __future__ import print_function
import time
import clicksend_client
from clicksend_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = clicksend_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = clicksend_client.ContactListApi(clicksend_client.ApiClient(configuration))
page = 1 # int | Page number (optional) (default to 1)
limit = 10 # int | Number of records per page (optional) (default to 10)
try:
# Get all contact lists
api_response = api_instance.lists_get(page=page, limit=limit)
pprint(api_response)
except ApiException as e:
print("Exception when calling ContactListApi->lists_get: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| page | int | Page number | [optional] [default to 1] |
| limit | int | Number of records per page | [optional] [default to 10] |
str
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
str lists_import_by_list_id_post(list_id, file)
Import contacts to list
Import contacts to list
from __future__ import print_function
import time
import clicksend_client
from clicksend_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = clicksend_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = clicksend_client.ContactListApi(clicksend_client.ApiClient(configuration))
list_id = 56 # int | Your contact list id you want to access.
file = clicksend_client.ContactListImport() # ContactListImport | ContactListImport model
try:
# Import contacts to list
api_response = api_instance.lists_import_by_list_id_post(list_id, file)
pprint(api_response)
except ApiException as e:
print("Exception when calling ContactListApi->lists_import_by_list_id_post: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| list_id | int | Your contact list id you want to access. | |
| file | ContactListImport | ContactListImport model |
str
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
str lists_post(contact_list)
Create new contact list
Create new contact list
from __future__ import print_function
import time
import clicksend_client
from clicksend_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = clicksend_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = clicksend_client.ContactListApi(clicksend_client.ApiClient(configuration))
contact_list = clicksend_client.ContactList() # ContactList | Contact list model
try:
# Create new contact list
api_response = api_instance.lists_post(contact_list)
pprint(api_response)
except ApiException as e:
print("Exception when calling ContactListApi->lists_post: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| contact_list | ContactList | Contact list model |
str
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
str lists_remove_duplicates_by_list_id_put(list_id, fields)
Remove duplicate contacts
Remove duplicate contacts
from __future__ import print_function
import time
import clicksend_client
from clicksend_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = clicksend_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = clicksend_client.ContactListApi(clicksend_client.ApiClient(configuration))
list_id = 56 # int | Your list id
fields = clicksend_client.Fields() # Fields | Fields model
try:
# Remove duplicate contacts
api_response = api_instance.lists_remove_duplicates_by_list_id_put(list_id, fields)
pprint(api_response)
except ApiException as e:
print("Exception when calling ContactListApi->lists_remove_duplicates_by_list_id_put: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| list_id | int | Your list id | |
| fields | Fields | Fields model |
str
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]