Lists (1.0.0)

Everything about creating and manipulating contact lists

View List Contacts

Get all contacts in a list

parameters

Parameter In Type Required Description
list_id path integer(int32) true Contact list ID
page query integer(int32) false Page number
limit query integer(int32) false Number of records per page
updated_after query integer(int32) false Get all contacts updated after a given timestamp.

Refer to Status Codes for definitions of HTTP status code responses.

This endpoint requires authentication, more info...
Request
path Parameters
list_id
required
string
header Parameters
Content-Type
string
Example: application/json
Responses
200

Successful response

get/v3/lists/{list_id}/contacts
Request samples
curl --include \
     --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \

'https://rest.clicksend.com/v3/lists/{list_id}/contacts'
Response samples
application/json
{
  • "http_code": 200,
  • "response_code": "SUCCESS",
  • "response_msg": "Here's your list of contacts.",
  • "data": [
    ]
}

Create New Contact

Create new contact

parameters

Parameter In Type Required Description
list_id path integer(int32) true List id
page query integer(int32) false Page number
limit query integer(int32) false Number of records per page

Properties

Name Type Required Restrictions Description
phone_number string true none Your phone number in_E.164_format. Must be provided if no fax number or email.
email string false none Your email. Must be provided if no phone number or fax number.
fax_number string false none Your fax number. Must be provided if no phone number or email.
first_name string false none Your first name.
address_line_1 string false none Your street address
address_line_2 string false none none
address_city string false none Your nearest city
address_state string false none Your current state
address_postal_code string false none Your current postcode
address_country string false none Your current country
organization_name string false none Your organisation name
custom_1 string true none none
custom_2 string false none none
custom_3 string false none none
custom_4 string false none none
last_name string false none Your last name

Refer to Status Codes for definitions of HTTP status code responses.

This endpoint requires authentication, more info...
Request
path Parameters
list_id
required
string
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object
Responses
200

Successful response

post/v3/lists/{list_id}/contacts
Request samples
application/json
{
  • "phone_number": "3724763278",
  • "first_name": "test",
  • "last_name": "test",
  • "custom_1": "t",
  • "custom_2": "e",
  • "custom_3": "s",
  • "custom_4": "t",
  • "date_added": null,
  • "fax_number": null,
  • "organization_name": null,
  • "email": null,
  • "address_line_1": "x",
  • "address_line_2": null,
  • "address_city": null,
  • "address_state": null,
  • "address_postal_code": null,
  • "address_country": "AU"
}
Response samples
application/json
{
  • "http_code": 200,
  • "response_code": "SUCCESS",
  • "response_msg": "Here's your list of contacts.",
  • "data": {
    }
}

Copy Contact to List

Copy contact to another list

Copy contact to another list

Parameters

Parameter In Type Required Description
from_list_id path integer(int32) true List ID for list that contains contact.
contact_id path integer(int32) true Contact ID
to_list_id path integer(int32) true List ID for list you want to copy contact to.

Refer to Status Codes for definitions of HTTP status code responses.

This endpoint requires authentication, more info...
Request
path Parameters
from_list_id
required
string
contact_id
required
string
to_list_id
required
string
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object
Responses
200

Successful response

put/v3/lists/{from_list_id}/contacts/{contact_id}/copy/{to_list_id}
Request samples
application/json
""
Response samples
application/json
{
  • "http_code": 200,
  • "response_code": "SUCCESS",
  • "response_msg": "Contact #1 has been copied to List #429",
  • "data": {
    }
}

Transfer Contact to List

Transfer contact to another list

Transfer contact to another list

Parameters

Parameter In Type Required Description
from_list_id path integer(int32) true List ID for list that contains contact.
contact_id path integer(int32) true Contact ID
to_list_id path integer(int32) true List ID for list you want to transfer contact to.

Refer to Status Codes for definitions of HTTP status code responses.

This endpoint requires authentication, more info...
Request
path Parameters
from_list_id
required
string
contact_id
required
string
to_list_id
required
string
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object
Responses
200

Successful response

put/v3/lists/{from_list_id}/contacts/{contact_id}/transfer/{to_list_id}
Request samples
application/json
""
Response samples
application/json
{
  • "http_code": 200,
  • "response_code": "SUCCESS",
  • "response_msg": "Contact #1 has been transferred to List #429",
  • "data": {
    }
}

Remove Opted Out Contacts

Remove all opted out contacts

Parameters

Parameter In Type Required Description
list_id path integer(int32) true Your list id
opt_out_list_id path integer(int32) true Your opt out list id

Refer to Status Codes for definitions of HTTP status code responses.

This endpoint requires authentication, more info...
Request
path Parameters
list_id
required
string
opt_out_list_id
required
string
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object
Responses
200

Successful response

put/v3/lists/{list_id}/remove-opted-out-contacts/{opt_out_list_id}
Request samples
application/json
""
Response samples
application/json
{
  • "http_code": 200,
  • "response_code": "SUCCESS",
  • "response_msg": "Optout contacts has been deleted.",
  • "data": {
    }
}

View Lists

Get all contact lists

Parameters

Parameter In Type Required Description
page query integer(int32) false Page number
limit query integer(int32) false Number of records per page

Refer to Status Codes for definitions of HTTP status code responses.

This endpoint requires authentication, more info...
Request
header Parameters
Content-Type
string
Example: application/json
Responses
200

Successful response

get/v3/lists
Request samples
curl --include \
     --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \

'https://rest.clicksend.com/v3/lists'
Response samples
application/json
{
  • "http_code": 200,
  • "response_code": "SUCCESS",
  • "response_msg": "Here are your data.",
  • "data": {
    }
}

Create List

Create new contact list

Parameters

Parameter In Type Required Description
list_name body string true Your contact list name

Refer to Status Codes for definitions of HTTP status code responses.

This endpoint requires authentication, more info...
Request
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object
Responses
200

Successful response

post/v3/lists
Request samples
application/json
{
  • "list_name": "test"
}
Response samples
application/json
{
  • "http_code": 200,
  • "response_code": "SUCCESS",
  • "response_msg": "New list has been created.",
  • "data": {
    }
}

View Secific List

Get specific contact list

Parameters

Parameter In Type Required Description
list_id path integer(int32) true List ID

Refer to Status Codes for definitions of HTTP status code responses.

This endpoint requires authentication, more info...
Request
path Parameters
list_id
required
string
header Parameters
Content-Type
string
Example: application/json
Responses
200

Successful response

get/v3/lists/{list_id}
Request samples
curl --include \
     --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \

'https://rest.clicksend.com/v3/lists/{list_id}'
Response samples
application/json
{
  • "http_code": 200,
  • "response_code": "SUCCESS",
  • "response_msg": "Here are your data.",
  • "data": {
    }
}

Update List

Update specific contact list

Parameters

Parameter In Type Required Description
list_id path integer(int32) true Your list id
list_name body string true Your new list name

Refer to Status Codes for definitions of HTTP status code responses.

This endpoint requires authentication, more info...
Request
path Parameters
list_id
required
string
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object
Responses
200

Successful response

put/v3/lists/{list_id}
Request samples
application/json
{
  • "list_name": "test"
}
Response samples
application/json
{
  • "http_code": 200,
  • "response_code": "SUCCESS",
  • "response_msg": "List #439 has been updated.",
  • "data": {
    }
}

Delete List

ListsByListIdDelete

Delete a specific contact list

Parameters

Parameter In Type Required Description
list_id path integer(int32) true List ID

Refer to Status Codes for definitions of HTTP status code responses.

This endpoint requires authentication, more info...
Request
path Parameters
list_id
required
string
header Parameters
Content-Type
string
Example: application/json
Responses
200

Successful response

delete/v3/lists/{list_id}
Request samples
curl --include \
     --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \
     --request DELETE \

'https://rest.clicksend.com/v3/lists/{list_id}'
Response samples
application/json
{
  • "http_code": 200,
  • "response_code": "SUCCESS",
  • "response_msg": "List #442 has been deleted.",
  • "data": [ ]
}

Remove Duplicate Contacts

Remove duplicate contacts

Parameters

Parameter In Type Required Description
list_id path integer(int32) true Your list id

Refer to Status Codes for definitions of HTTP status code responses.

This endpoint requires authentication, more info...
Request
path Parameters
list_id
required
string
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object
Responses
200

Successful response

put/v3/lists/{list_id}/remove-duplicates/
Request samples
application/json
{
  • "fields": {
    }
}
Response samples
application/json
{
  • "http_code": 200,
  • "response_code": "SUCCESS",
  • "response_msg": "Your list duplicate contacts has been deleted.",
  • "data": {
    }
}

Import Contacts

Import contacts to list

Parameters

Parameter In Type Required Description
list_id path integer(int32) true Your contact list id you want to access.

Properties

Name Type Required Restrictions Description
file_url string true none URL of file to process
field_order [string] true none Order of fields in file

Refer to Status Codes for definitions of HTTP status code responses.

This endpoint requires authentication, more info...
Request
path Parameters
list_id
required
string
header Parameters
Content-Type
string
Example: application/json
Request Body schema: application/json
object
Responses
200

Successful response

post/v3/lists/{list_id}/import
Request samples
application/json
{
  • "file_url": "{{fileURL}}",
  • "field_order": "test"
}
Response samples
application/json
{
  • "http_code": 200,
  • "response_code": "SUCCESS",
  • "response_msg": "Your file is now queued.",
  • "data": {
    }
}

View Contact Lists

Get list of searched contact list

Parameters

Parameter In Type Required Description
q query string true Your keyword or query.
page query integer(int32) false Page number
limit query integer(int32) false Number of records per page

Refer to Status Codes for definitions of HTTP status code responses.

This endpoint requires authentication, more info...

Request
query Parameters
q
string
Example: q=Test
Responses
200

Successful response

get/v3/search/contacts-lists
Request samples
curl --include \
     --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \

'https://rest.clicksend.com/v3/search/contacts-lists?q={q}'
Copyright © ClickSend 2024. All right reserved.