API

Create Contact List

/api/list
HTTP POST
Headers
x-key
The key assigned to your Call Cowboy account. This value is found by logging into Call Cowboy and visiting the My Account -> API page.
required
x-secret
The secret assigned to your Call Cowboy account. This value is found by logging into Call Cowboy and visiting the My Account -> API page.
required
Attributes
list_name
String containing the desired name.
required
Example JSON Body
{
  "list_name": "My List Name"
}
Results

An object containing the following:

list_id
The UUID of the list. Use this value in other calls to the contact list api endpoints. It is safe to cache this value client side in your app.
list_name
A string containing the name of the list.
created_at
Milliseconds since epoch of when the list was created.
Example Results
{
  "list_id": "ba2ace9b-471c-4c77-8c07-0bcba83f9xyze",
  "list_name": "My List Name",
  "created_at": 1587424720775
}

Rename Contact List

/api/list/{LIST_ID}
HTTP POST
URI Parameters
LIST_ID
Is the UUID value returned in the api results when creating a list or getting a list from the /list endpoint.
Headers
x-key
The key assigned to your Call Cowboy account. This value is found by logging into Call Cowboy and visiting the My Account -> API page.
required
x-secret
The secret assigned to your Call Cowboy account. This value is found by logging into Call Cowboy and visiting the My Account -> API page.
required
Attributes
list_name
String containing the desired name.
required
Example JSON Body
{
  "list_name": "My Updated List Name"
}
Results

An object containing the following:

list_id
The UUID of the list. Use this value in other calls to the contact list api endpoints. It is safe to cache this value client side in your app.
list_name
A string containing the name of the list.
created_at
Milliseconds since epoch of when the list was created.
Example Results
{
  "list_id": "ba2ace9b-471c-4c77-8c07-0bcba83f9xyze",
  "list_name": "My Updated List Name",
  "created_at": 1587424720775
}

Get Contact List Details

/api/list/{LIST_ID}
HTTP GET
URI Parameters
LIST_ID
Is the UUID value returned in the api results when creating a list or getting a list from the /list endpoint.
Headers
x-key
The key assigned to your Call Cowboy account. This value is found by logging into Call Cowboy and visiting the My Account -> API page.
required
x-secret
The secret assigned to your Call Cowboy account. This value is found by logging into Call Cowboy and visiting the My Account -> API page.
required
Results

An array of objects containing:

list_id
The UUID of the list. Use this value in other calls to the contact list api endpoints. It is safe to cache this value client side in your app.
list_name
A string containing the name of the list.
created_at
Milliseconds since epoch of when the list was created.
Example Results
{
  "list_id": "ba2ace9b-471c-4c77-8c07-0bcba83f9xyz",
  "list_name": "My List Name",
  "created_at": 1587424720775
}

Delete Contact List

/api/list/{LIST_ID}
HTTP DELETE
URI Parameters
LIST_ID
Is the UUID value returned in the api results when creating a list or getting a list from the /list endpoint.
Headers
x-key
The key assigned to your Call Cowboy account. This value is found by logging into Call Cowboy and visiting the My Account -> API page.
required
x-secret
The secret assigned to your Call Cowboy account. This value is found by logging into Call Cowboy and visiting the My Account -> API page.
required
Results

This endpoint will return a HTTP STATUS 200 if successful.

Example Results
{
  "list_id": "ba2ace9b-471c-4c77-8c07-0bcba83f9xyz"
}

Create Contact and Add to List

/api/list/{LIST_ID}/contacts
HTTP POST
URI Parameters
LIST_ID
Is the UUID value returned in the api results when creating a list or getting a list from the /list endpoint.

The number of contacts that can be appended to this list is dependent on the amount of data you submit per contact. If you’re only submitting phone numbers, it’s recommended to submit in batches of 10,000. If you are sending full contact data including addresses and custom fields, it’s recommended to submit in batches of less than 10,000. The api is restricted to requests less than 10MB and taking less than 29 seconds to process.

Headers
x-key
The key assigned to your Call Cowboy account. This value is found by logging into Call Cowboy and visiting the My Account -> API page.
required
x-secret
The secret assigned to your Call Cowboy account. This value is found by logging into Call Cowboy and visiting the My Account -> API page.
required
Attributes
fields
Array of strings that define the data types being passed in the Values attribute. It is acceptable tohave repeat field types specified if your contacts have multiple phone numbers, pass in the value of “phone” multiple times in this array. Possible field types are: record_id, first_name, last_name, company, email, phone, address1, address2, city, state, postal, country, custom1, custom2, custom3, custom4, custom5 .
required
values
An array of arrays. Inner arrays contain the values associated with the field types you specify in the fields attribute. You may pass in up to 10,000 contacts per api call.
required
region
The ISO country code to use when converting your phone number values to E.164 format. If yourphone numbers are already formatted in E.164 then the region attribute is ignored. Defaults to US .
Example JSON Body
{
  "list_id": "ba2ace9b-471c-4c77-8c07-0bcba83f9xyz",
  "region": "US",
  "fields": [
    "record_id",
    "main_phone",
    "secondary_phone",
    "first_name",
    "last_name",
    "company",
    "email",
    "fax_number",
    "address",
    "suite/apt",
    "city",
    "state",
    "country",
    "zip_code",
    "reason"
  ],
  "values": [
    [
      "ExternalID123",
      "555-111-1111",
      "(555) 222-2222",
      "bob",
      "doe",
      "bobs company",
      "bob@example.com",
      "+15553334444",
      "123 Very Long Name St.",
      "Apartment 12345",
      "Phoenix",
      "AZ",
      "US",
      "85020",
      "reason"
    ]
  ]
}
Results
accepted_count
The number of contacts appended to the list.
rejected
An array of objects containing the index of the rejected contact from the value array that you passed to the api and the reason that contact was rejected.
Example Results
{
  "accepted_count": 10479,
  "rejected": [
    {
      "index": 0,
      "reason": "Not a valid US,CA phone number"
    },
    {
      "index": 229,
      "reason": "Not a valid US,CA phone number"
    },
    {
      "index": 301,
      "reason": "Not a valid US,CA phone number"
    }
  ]
}
Supercharge your phone system Buy Now