Get a broadcast
curl --request GET \
--url https://api.kit.com/v4/broadcasts/{id} \
--header 'X-Kit-Api-Key: <api-key>'require 'uri'
require 'net/http'
url = URI("https://api.kit.com/v4/broadcasts/{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/broadcasts/{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/broadcasts/{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/broadcasts/{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/broadcasts/{id}"
headers = {"X-Kit-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"broadcast": {
"id": 57,
"publication_id": 48,
"created_at": "2023-02-17T11:43:55Z",
"subject": "You'll never guess...",
"preview_text": null,
"description": null,
"content": null,
"public": false,
"published_at": null,
"send_at": null,
"thumbnail_alt": null,
"thumbnail_url": null,
"public_url": null,
"email_address": "greetings@kit.dev",
"email_template": {
"id": 6,
"name": "Text Only"
},
"subscriber_filter": [
{
"all": [
{
"type": "all_subscribers"
}
]
}
],
"status": "draft"
}
}{
"errors": [
"The access token is invalid"
]
}{
"errors": [
"Not Found"
]
}Broadcasts
Get a broadcast
Returns a single broadcast’s full record: subject, content (HTML), preview text, targeting (subscriber_filter), email template, sending schedule (send_at), and web-publishing details (public, public_url, published_at).
Delivery and engagement stats are not included; use Get stats for a broadcast for opens, clicks, and unsubscribes, or Get link clicks for a broadcast for per-link detail. A broadcast that is also published as a post shares its publication_id with the matching post from List posts.
GET
/
v4
/
broadcasts
/
{id}
Get a broadcast
curl --request GET \
--url https://api.kit.com/v4/broadcasts/{id} \
--header 'X-Kit-Api-Key: <api-key>'require 'uri'
require 'net/http'
url = URI("https://api.kit.com/v4/broadcasts/{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/broadcasts/{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/broadcasts/{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/broadcasts/{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/broadcasts/{id}"
headers = {"X-Kit-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"broadcast": {
"id": 57,
"publication_id": 48,
"created_at": "2023-02-17T11:43:55Z",
"subject": "You'll never guess...",
"preview_text": null,
"description": null,
"content": null,
"public": false,
"published_at": null,
"send_at": null,
"thumbnail_alt": null,
"thumbnail_url": null,
"public_url": null,
"email_address": "greetings@kit.dev",
"email_template": {
"id": 6,
"name": "Text Only"
},
"subscriber_filter": [
{
"all": [
{
"type": "all_subscribers"
}
]
}
],
"status": "draft"
}
}{
"errors": [
"The access token is invalid"
]
}{
"errors": [
"Not Found"
]
}Was this page helpful?