Everything about creating and manipulating contact lists
Get a specific contact
Parameter | In | Type | Required | Description |
---|---|---|---|---|
list_id | path | integer(int32) | true | Your contact list id you want to access. |
contact_id | path | integer(int32) | true | Your contact id you want to access. |
Refer to Status Codes for definitions of HTTP status code responses.
Successful response
curl --include \ --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==" \ 'https://rest.clicksend.com/v3/lists/{list_id}/contacts/{contact_id}'
{- "http_code": 200,
- "response_code": "SUCCESS",
- "response_msg": "Here are your data.",
- "data": {
- "contact_id": 552786,
- "list_id": 428,
- "phone_number": "+16783270696",
- "first_name": "John",
- "last_name": "Doe",
- "custom_1": "Custom 1",
- "custom_2": "Custom 2",
- "custom_3": "Custom 3",
- "custom_4": "Custom 4",
- "date_added": "2015-07-05T14:51:26Z",
- "date_updated": "2015-07-05T14:51:26Z",
- "fax_number": "+61477141888",
- "organization_name": "Awesome Company",
- "email": "john@doe.com",
- "address_line_1": "1554 Buffalo Creek Road",
- "address_line_2": null,
- "address_city": "Nashville",
- "address_state": "TN",
- "address_postal_code": "37214",
- "address_country": "US",
- "_list_name": "List6eaG4lGIc9"
}
}
Update specific contact
Parameter | In | Type | Required | Description |
---|---|---|---|---|
list_id | path | integer(int32) | true | Contact list id |
contact_id | path | integer(int32) | true | Contact ID |
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. |
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.
Successful response
{- "phone_number": "07804645575",
- "first_name": "test",
- "last_name": "",
- "custom_1": "r",
- "custom_2": "",
- "custom_3": "",
- "custom_4": "",
- "date_added": null,
- "fax_number": null,
- "organization_name": null,
- "email": null,
- "address_line_1": null,
- "address_line_2": null,
- "address_city": null,
- "address_state": null,
- "address_postal_code": null,
- "address_country": null
}
{- "http_code": 200,
- "response_code": "SUCCESS",
- "response_msg": "Contact #552807 has been updated successfully.",
- "data": {
- "contact_id": 552786,
- "list_id": 428,
- "phone_number": "+16783270696",
- "first_name": "John",
- "last_name": "Doe",
- "custom_1": "Custom 1",
- "custom_2": "Custom 2",
- "custom_3": "Custom 3",
- "custom_4": "Custom 4",
- "date_added": "2015-07-05T14:51:26Z",
- "date_updated": "2015-07-05T14:51:26Z",
- "fax_number": "+61477141888",
- "organization_name": "Awesome Company",
- "email": "john@doe.com",
- "address_line_1": "1554 Buffalo Creek Road",
- "address_line_2": null,
- "address_city": "Nashville",
- "address_state": "TN",
- "address_postal_code": "37214",
- "address_country": "US",
- "_list_name": "List6eaG4lGIc9"
}
}
Delete a contact
Parameter | In | Type | Required | Description |
---|---|---|---|---|
list_id | path | integer(int32) | true | List ID |
contact_id | path | integer(int32) | true | Contact ID |
Refer to Status Codes for definitions of HTTP status code responses.
Successful response
curl --include \ --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA==" \ --request DELETE \ 'https://rest.clicksend.com/v3/lists/{list_id}/contacts/{contact_id}'
{- "http_code": 200,
- "response_code": "SUCCESS",
- "response_msg": "Contact #552807 has been deleted.",
- "data": [ ]
}