Static Lists


The following fields relate to the Static Lists endpoint.

FieldLimitsRequired?Writeable?
id
NoNo

The ID of the static list

list_name
YesYes

Read-only name to be assigned to the static list

owner_user_id
Automatically set as the submitter's id
NoNo

The id of the user who owns this static list

has_custom_audience
NoNo

Describes whether or not the static list has a custom audience

created_at
NoNo

The date and time at which the static list was last created

modified_at
NoNo

The date and time at which the static list was last edited

Find All Static Lists

You find/search static lists by issuing a GET request to the base endpoint:

GET https://api-v2.liondesk.com//static-lists headers: { Authorization: "Bearer [access token]", Content-Type: "application/json" }

The response will contain an array of static list objects, like so:

{ "total": 2, "limit": 10, "skip": 0, "data": [ { "id": 2, "list_name": "Static list name 1", "owner_user_id": 1, "has_custom_audience": 1, "created_at": "2018-01-09T12:24:09.000Z", "modified_at": "2018-01-09T12:24:09.000Z" }, { "id": 5, "list_name": "Static list name 2", "owner_user_id": 5, "has_custom_audience": 0, "created_at": "2018-01-09T12:24:09.000Z", "modified_at": "2018-01-09T12:24:09.000Z" } ] }

Find contacts in a Static List

GET https://api-v2.liondesk.com//static-lists/12/contacts headers: { Authorization: "Bearer [access token]", Content-Type: "application/json" }

The response object will have this form:

{ "total": 1, "limit": 10, "skip": 0, "data": [ { "owner_user_id": 1, "assigned_user_id": 2, "first_name": "Bill", "last_name": "Gates", "email": "bill@microsoft.com", "mobile_phone": "1 (604) 555-4572", "home_phone": "1 (604) 555-1124", "office_phone": "1 (208) 555-4432", "fax": "1 (306) 555-0449", "company": "Microsoft", "birthday": "1955-10-28", "anniversary": "2017-10-31", "spouse_name": "Melinda Gates", "spouse_email": "melinda@gatesfoundation.com", "spouse_phone": "1 (604) 555-1124", "spouse_birthday": "1964-08-15", "tags": "Pending", "created_at": "2016-07-01T12:12:11.000Z", "modified_at": "2018-01-09T12:24:09.000Z" } ] }

Submitting a static list

POST https://api-v2.liondesk.com//static-lists headers: { Authorization: "Bearer [access token]", Content-Type: "application/json" }
data: {
list_name: "List name",
}

The response object will have this form:

{ "id": 2, "list_name": "Static list name 1", "owner_user_id": 1, "has_custom_audience": 1, "created_at": "2018-01-09T12:24:09.000Z", "modified_at": "2018-01-09T12:24:09.000Z" }

Adding contacts to an existing static list

POST https://api-v2.liondesk.com//static-lists/12/contacts headers: { Authorization: "Bearer [access token]", Content-Type: "application/json" }
data: {
contacts_list: [12]
}

The response object will have this form:

{ "contact_list_id": "2", "contact_id": "12" }

Remove

Static Lists can be removed with a delete request.

DELETE https://api-v2.liondesk.com//static-lists/576 headers: { Authorization: "Bearer [access token]", Content-Type: "application/json" }