Add tags to a record.
curl --request POST \
--url https://{subdomain}.outseta.com/api/v1/email/campaigns/broadcasts/{entityUid}/tags \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"TagUids": [
"wQXAbcmQ",
"dQGN1EmE"
]
}
'import requests
url = "https://{subdomain}.outseta.com/api/v1/email/campaigns/broadcasts/{entityUid}/tags"
payload = { "TagUids": ["wQXAbcmQ", "dQGN1EmE"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({TagUids: ['wQXAbcmQ', 'dQGN1EmE']})
};
fetch('https://{subdomain}.outseta.com/api/v1/email/campaigns/broadcasts/{entityUid}/tags', 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://{subdomain}.outseta.com/api/v1/email/campaigns/broadcasts/{entityUid}/tags",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'TagUids' => [
'wQXAbcmQ',
'dQGN1EmE'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{subdomain}.outseta.com/api/v1/email/campaigns/broadcasts/{entityUid}/tags"
payload := strings.NewReader("{\n \"TagUids\": [\n \"wQXAbcmQ\",\n \"dQGN1EmE\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{subdomain}.outseta.com/api/v1/email/campaigns/broadcasts/{entityUid}/tags")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"TagUids\": [\n \"wQXAbcmQ\",\n \"dQGN1EmE\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.outseta.com/api/v1/email/campaigns/broadcasts/{entityUid}/tags")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"TagUids\": [\n \"wQXAbcmQ\",\n \"dQGN1EmE\"\n ]\n}"
response = http.request(request)
puts response.read_body"string"Broadcasts
Add tags to a record.
Send the uids of the tags to add. Tags that the record already carries stay on it, and naming one of them again changes nothing, so the same request is safe to repeat. To replace the whole set instead, use PUT on this same path.
A tag belongs to one entity type, so use tags whose EntityType matches this record. List them with GET /attribute/tags. A uid in the list that names no tag is skipped.
POST
/
api
/
v1
/
email
/
campaigns
/
broadcasts
/
{entityUid}
/
tags
Add tags to a record.
curl --request POST \
--url https://{subdomain}.outseta.com/api/v1/email/campaigns/broadcasts/{entityUid}/tags \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"TagUids": [
"wQXAbcmQ",
"dQGN1EmE"
]
}
'import requests
url = "https://{subdomain}.outseta.com/api/v1/email/campaigns/broadcasts/{entityUid}/tags"
payload = { "TagUids": ["wQXAbcmQ", "dQGN1EmE"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({TagUids: ['wQXAbcmQ', 'dQGN1EmE']})
};
fetch('https://{subdomain}.outseta.com/api/v1/email/campaigns/broadcasts/{entityUid}/tags', 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://{subdomain}.outseta.com/api/v1/email/campaigns/broadcasts/{entityUid}/tags",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'TagUids' => [
'wQXAbcmQ',
'dQGN1EmE'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{subdomain}.outseta.com/api/v1/email/campaigns/broadcasts/{entityUid}/tags"
payload := strings.NewReader("{\n \"TagUids\": [\n \"wQXAbcmQ\",\n \"dQGN1EmE\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{subdomain}.outseta.com/api/v1/email/campaigns/broadcasts/{entityUid}/tags")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"TagUids\": [\n \"wQXAbcmQ\",\n \"dQGN1EmE\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.outseta.com/api/v1/email/campaigns/broadcasts/{entityUid}/tags")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"TagUids\": [\n \"wQXAbcmQ\",\n \"dQGN1EmE\"\n ]\n}"
response = http.request(request)
puts response.read_body"string"