curl --request GET \
--url https://collectwiseapi.com/text/templates \
--header 'collectwise_key: <api-key>'import requests
url = "https://collectwiseapi.com/text/templates"
headers = {"collectwise_key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {collectwise_key: '<api-key>'}};
fetch('https://collectwiseapi.com/text/templates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://collectwiseapi.com/text/templates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"collectwise_key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://collectwiseapi.com/text/templates"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("collectwise_key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://collectwiseapi.com/text/templates")
.header("collectwise_key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://collectwiseapi.com/text/templates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["collectwise_key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"count": 1,
"templates": [
{
"templateId": 100,
"accountId": "99999",
"message": "{Consumer Name}, {Company Name} is a debt collector attempting to collect a debt. Visit {Website Payment} using your account# {Account Number} or call {Phone#}. Reply STOP to opt out.",
"placeholders": [
"Consumer Name",
"Company Name",
"Website Payment",
"Account Number",
"Phone#"
]
}
]
}{
"error": "Texting is not enabled for this organization"
}{
"error": "Too many requests"
}List SMS Templates
Lists every SMS template available to your organization, including the placeholder variables each one expects. Call this first to discover the templateId and the variable names to pass to the send endpoint.
curl --request GET \
--url https://collectwiseapi.com/text/templates \
--header 'collectwise_key: <api-key>'import requests
url = "https://collectwiseapi.com/text/templates"
headers = {"collectwise_key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {collectwise_key: '<api-key>'}};
fetch('https://collectwiseapi.com/text/templates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://collectwiseapi.com/text/templates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"collectwise_key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://collectwiseapi.com/text/templates"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("collectwise_key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://collectwiseapi.com/text/templates")
.header("collectwise_key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://collectwiseapi.com/text/templates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["collectwise_key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"count": 1,
"templates": [
{
"templateId": 100,
"accountId": "99999",
"message": "{Consumer Name}, {Company Name} is a debt collector attempting to collect a debt. Visit {Website Payment} using your account# {Account Number} or call {Phone#}. Reply STOP to opt out.",
"placeholders": [
"Consumer Name",
"Company Name",
"Website Payment",
"Account Number",
"Phone#"
]
}
]
}{
"error": "Texting is not enabled for this organization"
}{
"error": "Too many requests"
}Authorizations
Active, unexpired API key belonging to an active organization. Optional organization/key signing and organization IP restrictions also apply; see API Access.
Headers
Required together with x-cw-signature when signing is enabled for this key or organization. POST /security/verify also requires signing whenever a usable secret exists. Canonical Unix seconds, within ±300 seconds. See API Access for CW1 signing.
^(0|[1-9][0-9]*)$CW1 HMAC-SHA256 signature: v1= followed by 64 lowercase hex digits. Use the decoded 32-byte signing secret and exact request bytes. See API Access.
^v1=[0-9a-f]{64}$