Get Journey Options
curl --request GET \
--url https://api.tracklysms.com/api/v2/journeys/options \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.tracklysms.com/api/v2/journeys/options"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://api.tracklysms.com/api/v2/journeys/options', 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://api.tracklysms.com/api/v2/journeys/options",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-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://api.tracklysms.com/api/v2/journeys/options"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-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://api.tracklysms.com/api/v2/journeys/options")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tracklysms.com/api/v2/journeys/options")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"sourceLists": [
{
"id": 101,
"name": "Welcome list",
"listType": null
}
],
"audiences": [],
"creatives": [
{
"id": "710",
"name": null,
"message": "Welcome",
"characterCount": 7,
"offers": [],
"status": "active",
"listControlMode": "all",
"listControlIds": []
}
],
"offers": [],
"customFields": [
"tier"
],
"customFieldsCacheStatus": "idle",
"customFieldsLastScan": null,
"doiConfigs": []
}
Journeys (v2)
Get Journey Options
Get eligible resources and cached custom fields for journey authoring.
GET
/
v2
/
journeys
/
options
Get Journey Options
curl --request GET \
--url https://api.tracklysms.com/api/v2/journeys/options \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.tracklysms.com/api/v2/journeys/options"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://api.tracklysms.com/api/v2/journeys/options', 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://api.tracklysms.com/api/v2/journeys/options",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-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://api.tracklysms.com/api/v2/journeys/options"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-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://api.tracklysms.com/api/v2/journeys/options")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tracklysms.com/api/v2/journeys/options")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"sourceLists": [
{
"id": 101,
"name": "Welcome list",
"listType": null
}
],
"audiences": [],
"creatives": [
{
"id": "710",
"name": null,
"message": "Welcome",
"characterCount": 7,
"offers": [],
"status": "active",
"listControlMode": "all",
"listControlIds": []
}
],
"offers": [],
"customFields": [
"tier"
],
"customFieldsCacheStatus": "idle",
"customFieldsLastScan": null,
"doiConfigs": []
}
Returns authoring choices from your account. Active sending lists and SMS audiences are included; creatives and offers include active and paused entries. Double opt-in choices include active journey configurations whose sending list can be resolved.
Declares the
Use Refresh Custom Fields to refresh the field names.
journeys.read scope. Authenticate with X-Api-Key; see Authentication. A key with journeys.read can read these sending lists, audiences, creatives, offers, and double opt-in configurations through this endpoint.
Response Fields
array of objects
Integer id, string name, and nullable listType for each sending list. This endpoint currently returns null for listType.
array of objects
String id and name for each audience.
array of objects
Each entry contains id, name, message, characterCount, offers, status, listControlMode, and listControlIds. The id is a string; name is a string or null when the creative is unnamed.
array of objects
String id, name, status, listControlMode, and listControlIds.
array of strings
Cached contact custom-field names.
string
Current scan status; idle if no scan state is stored.
string or null
Last scan timestamp, or null before a scan.
array of objects
Integer id, name, integer sendingListId, and sendingListName.
{
"sourceLists": [
{
"id": 101,
"name": "Welcome list",
"listType": null
}
],
"audiences": [],
"creatives": [
{
"id": "710",
"name": null,
"message": "Welcome",
"characterCount": 7,
"offers": [],
"status": "active",
"listControlMode": "all",
"listControlIds": []
}
],
"offers": [],
"customFields": [
"tier"
],
"customFieldsCacheStatus": "idle",
"customFieldsLastScan": null,
"doiConfigs": []
}