Get a sequence
curl --request GET \
--url https://api.kit.com/v4/sequences/{id} \
--header 'X-Kit-Api-Key: <api-key>'require 'uri'
require 'net/http'
url = URI("https://api.kit.com/v4/sequences/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Kit-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_bodyconst options = {method: 'GET', headers: {'X-Kit-Api-Key': '<api-key>'}};
fetch('https://api.kit.com/v4/sequences/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.kit.com/v4/sequences/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Kit-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.kit.com/v4/sequences/{id}",
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-Kit-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}import requests
url = "https://api.kit.com/v4/sequences/{id}"
headers = {"X-Kit-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"sequence": {
"id": 22,
"name": "Welcome sequence",
"hold": false,
"repeat": false,
"created_at": "2023-02-17T11:43:55Z",
"updated_at": "2023-02-17T11:43:55Z",
"email_address": null,
"email_template_id": null,
"send_days": [
"monday",
"tuesday",
"wednesday",
"thursday",
"friday",
"saturday",
"sunday"
],
"send_hour": 11,
"time_zone": "America/New_York",
"active": true,
"exclude_subscriber_sources": [],
"email_count": 0,
"subscriber_count": 0
}
}{
"errors": [
"The access token is invalid"
]
}{
"errors": [
"Not Found"
]
}Sequences
Get a sequence
Fetches a single sequence by id. Use this when you need the current schedule, the active / repeat / hold flags, the configured email_address and email_template_id, or exclude_subscriber_sources for a known sequence — for example, to confirm settings before adding subscribers or to render an editor.
For the individual emails inside the sequence, use List sequence emails. For the sequence model and field semantics, see Create a sequence.
GET
/
v4
/
sequences
/
{id}
Get a sequence
curl --request GET \
--url https://api.kit.com/v4/sequences/{id} \
--header 'X-Kit-Api-Key: <api-key>'require 'uri'
require 'net/http'
url = URI("https://api.kit.com/v4/sequences/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Kit-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_bodyconst options = {method: 'GET', headers: {'X-Kit-Api-Key': '<api-key>'}};
fetch('https://api.kit.com/v4/sequences/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.kit.com/v4/sequences/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Kit-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.kit.com/v4/sequences/{id}",
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-Kit-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}import requests
url = "https://api.kit.com/v4/sequences/{id}"
headers = {"X-Kit-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"sequence": {
"id": 22,
"name": "Welcome sequence",
"hold": false,
"repeat": false,
"created_at": "2023-02-17T11:43:55Z",
"updated_at": "2023-02-17T11:43:55Z",
"email_address": null,
"email_template_id": null,
"send_days": [
"monday",
"tuesday",
"wednesday",
"thursday",
"friday",
"saturday",
"sunday"
],
"send_hour": 11,
"time_zone": "America/New_York",
"active": true,
"exclude_subscriber_sources": [],
"email_count": 0,
"subscriber_count": 0
}
}{
"errors": [
"The access token is invalid"
]
}{
"errors": [
"Not Found"
]
}Was this page helpful?
⌘I