What one person will get at one step, rendered
curl --request GET \
--url http://localhost:8080/sequences/{sequenceId}/contacts/{contactId}/steps/{stepIndex}/preview \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost:8080/sequences/{sequenceId}/contacts/{contactId}/steps/{stepIndex}/preview"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:8080/sequences/{sequenceId}/contacts/{contactId}/steps/{stepIndex}/preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/sequences/{sequenceId}/contacts/{contactId}/steps/{stepIndex}/preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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 := "http://localhost:8080/sequences/{sequenceId}/contacts/{contactId}/steps/{stepIndex}/preview"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:8080/sequences/{sequenceId}/contacts/{contactId}/steps/{stepIndex}/preview")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/sequences/{sequenceId}/contacts/{contactId}/steps/{stepIndex}/preview")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"step_index": 0,
"channel": "whatsapp",
"source": "template",
"stale_personalization": true,
"sender_id": "<string>",
"editable": true,
"journey": {
"step_index": 0,
"channel": "<string>",
"state": "not_reached",
"at": "2023-11-07T05:31:56Z",
"session_id": "<string>",
"session_ticket_number": 0,
"reason": "<string>",
"number_pool": {
"status": "calling",
"attempts": 2,
"max_attempts": 2,
"next_retry_at": "2023-11-07T05:31:56Z",
"caller_number": "<string>"
}
},
"render": {
"status": "rendered",
"content": {
"type": "email",
"subject": "<string>",
"html": "<string>",
"text": "<string>",
"variables": {}
}
}
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}Sequences
What one person will get at one step, rendered
What one person will get at one step, rendered — Rendered by the same code the send path runs: the step’s template filled in for this person, their personalization if they have…
GET
/
sequences
/
{sequenceId}
/
contacts
/
{contactId}
/
steps
/
{stepIndex}
/
preview
What one person will get at one step, rendered
curl --request GET \
--url http://localhost:8080/sequences/{sequenceId}/contacts/{contactId}/steps/{stepIndex}/preview \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost:8080/sequences/{sequenceId}/contacts/{contactId}/steps/{stepIndex}/preview"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:8080/sequences/{sequenceId}/contacts/{contactId}/steps/{stepIndex}/preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/sequences/{sequenceId}/contacts/{contactId}/steps/{stepIndex}/preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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 := "http://localhost:8080/sequences/{sequenceId}/contacts/{contactId}/steps/{stepIndex}/preview"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:8080/sequences/{sequenceId}/contacts/{contactId}/steps/{stepIndex}/preview")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/sequences/{sequenceId}/contacts/{contactId}/steps/{stepIndex}/preview")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"step_index": 0,
"channel": "whatsapp",
"source": "template",
"stale_personalization": true,
"sender_id": "<string>",
"editable": true,
"journey": {
"step_index": 0,
"channel": "<string>",
"state": "not_reached",
"at": "2023-11-07T05:31:56Z",
"session_id": "<string>",
"session_ticket_number": 0,
"reason": "<string>",
"number_pool": {
"status": "calling",
"attempts": 2,
"max_attempts": 2,
"next_retry_at": "2023-11-07T05:31:56Z",
"caller_number": "<string>"
}
},
"render": {
"status": "rendered",
"content": {
"type": "email",
"subject": "<string>",
"html": "<string>",
"text": "<string>",
"variables": {}
}
}
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}Authorizations
Path Parameters
Response
Default Response
Was this page helpful?