Get audience
curl --request GET \
--url https://api.tryarchitect.com/v0/pages/{page_id}/audiences/{audience_id} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.tryarchitect.com/v0/pages/{page_id}/audiences/{audience_id}"
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.tryarchitect.com/v0/pages/{page_id}/audiences/{audience_id}', 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.tryarchitect.com/v0/pages/{page_id}/audiences/{audience_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-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.tryarchitect.com/v0/pages/{page_id}/audiences/{audience_id}"
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.tryarchitect.com/v0/pages/{page_id}/audiences/{audience_id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tryarchitect.com/v0/pages/{page_id}/audiences/{audience_id}")
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{
"actionFormIdOverride": "<string>",
"actionFormInstructionsOverride": "<string>",
"actionUrlOverride": "<string>",
"archivedAt": "2023-11-07T05:31:56Z",
"audienceId": "<string>",
"computedName": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"customName": "<string>",
"effectiveName": "<string>",
"flags": [
"home_page"
],
"isNewPageAgent": true,
"latestVersion": {
"archivedAt": "2023-11-07T05:31:56Z",
"audienceId": "<string>",
"becameDraftAt": "2023-11-07T05:31:56Z",
"cancelledAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"isNewPageAgent": true,
"obsoleteAt": "2023-11-07T05:31:56Z",
"publishedAt": "2023-11-07T05:31:56Z",
"queueDurationMs": 123,
"queuedAt": "2023-11-07T05:31:56Z",
"supplementaryContext": "<string>",
"versionId": "<string>",
"versionNumber": 123
},
"pageId": "<string>",
"personId": "<string>",
"personRouteKey": "<string>",
"publishedVersion": {
"archivedAt": "2023-11-07T05:31:56Z",
"audienceId": "<string>",
"becameDraftAt": "2023-11-07T05:31:56Z",
"cancelledAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"isNewPageAgent": true,
"obsoleteAt": "2023-11-07T05:31:56Z",
"publishedAt": "2023-11-07T05:31:56Z",
"queueDurationMs": 123,
"queuedAt": "2023-11-07T05:31:56Z",
"supplementaryContext": "<string>",
"versionId": "<string>",
"versionNumber": 123
},
"supplementaryContext": "<string>",
"effectiveMetadata": {
"title": "<string>",
"description": "<string>",
"keywords": [
"<string>"
],
"author": "<string>",
"robots": [],
"canonicalUrl": "<string>",
"ogTitle": "<string>",
"ogDescription": "<string>",
"ogImageUrl": "<string>",
"ogImageFileId": "<string>",
"ogImageAlt": "<string>",
"ogSiteName": "<string>",
"ogUrl": "<string>",
"twitterTitle": "<string>",
"twitterDescription": "<string>",
"twitterImageUrl": "<string>",
"twitterImageFileId": "<string>",
"twitterImageAlt": "<string>",
"twitterSite": "<string>",
"twitterCreator": "<string>",
"themeColor": "<string>"
},
"metadataOverride": {
"title": "<string>",
"description": "<string>",
"keywords": [
"<string>"
],
"author": "<string>",
"robots": [],
"canonicalUrl": "<string>",
"ogTitle": "<string>",
"ogDescription": "<string>",
"ogImageUrl": "<string>",
"ogImageFileId": "<string>",
"ogImageAlt": "<string>",
"ogSiteName": "<string>",
"ogUrl": "<string>",
"twitterTitle": "<string>",
"twitterDescription": "<string>",
"twitterImageUrl": "<string>",
"twitterImageFileId": "<string>",
"twitterImageAlt": "<string>",
"twitterSite": "<string>",
"twitterCreator": "<string>",
"themeColor": "<string>"
}
}{
"code": "VALIDATION_ERROR",
"detail": "body - name: Name is required; email: Invalid email address",
"details": [
{
"field": "body",
"issues": [
{
"code": "validation_failed",
"message": "name: Name is required",
"path": [
"name"
]
}
]
}
],
"requestId": "req_01j5k9m7n8p9q2r3s4t5v6w7x8",
"status": 400,
"title": "Bad Request",
"type": "https://api.tryarchitect.com/errors/validation_error"
}{
"code": "UNAUTHORIZED",
"detail": "Authentication is required",
"requestId": "req_01j5k9m7n8p9q2r3s4t5v6w7x8",
"status": 401,
"title": "Unauthorized",
"type": "https://api.tryarchitect.com/errors/unauthorized"
}{
"code": "FORBIDDEN",
"detail": "Multi-tenant API keys are not supported",
"requestId": "req_01j5k9m7n8p9q2r3s4t5v6w7x8",
"status": 403,
"title": "Forbidden",
"type": "https://api.tryarchitect.com/errors/forbidden"
}{
"code": "NOT_FOUND",
"detail": "Audience not found",
"requestId": "req_01j5k9m7n8p9q2r3s4t5v6w7x8",
"status": 404,
"title": "Not Found",
"type": "https://api.tryarchitect.com/errors/not_found"
}{
"code": "RATE_LIMITED",
"detail": "Rate limit exceeded",
"details": {
"limit": 100,
"remaining": 0,
"resetTime": 1713225600000,
"retryAfter": 60
},
"requestId": "req_01j5k9m7n8p9q2r3s4t5v6w7x8",
"status": 429,
"title": "Too Many Requests",
"type": "https://api.tryarchitect.com/errors/rate_limited"
}{
"code": "INTERNAL",
"detail": "An unexpected error occurred",
"requestId": "req_01j5k9m7n8p9q2r3s4t5v6w7x8",
"status": 500,
"title": "Internal Server Error",
"type": "https://api.tryarchitect.com/errors/internal"
}{
"code": "SERVICE_UNAVAILABLE",
"detail": "The service is temporarily unavailable",
"requestId": "req_01j5k9m7n8p9q2r3s4t5v6w7x8",
"status": 503,
"title": "Service Unavailable",
"type": "https://api.tryarchitect.com/errors/service_unavailable"
}Audiences
Get audience
Get an audience.
GET
/
v0
/
pages
/
{page_id}
/
audiences
/
{audience_id}
Get audience
curl --request GET \
--url https://api.tryarchitect.com/v0/pages/{page_id}/audiences/{audience_id} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.tryarchitect.com/v0/pages/{page_id}/audiences/{audience_id}"
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.tryarchitect.com/v0/pages/{page_id}/audiences/{audience_id}', 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.tryarchitect.com/v0/pages/{page_id}/audiences/{audience_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-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.tryarchitect.com/v0/pages/{page_id}/audiences/{audience_id}"
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.tryarchitect.com/v0/pages/{page_id}/audiences/{audience_id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tryarchitect.com/v0/pages/{page_id}/audiences/{audience_id}")
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{
"actionFormIdOverride": "<string>",
"actionFormInstructionsOverride": "<string>",
"actionUrlOverride": "<string>",
"archivedAt": "2023-11-07T05:31:56Z",
"audienceId": "<string>",
"computedName": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"customName": "<string>",
"effectiveName": "<string>",
"flags": [
"home_page"
],
"isNewPageAgent": true,
"latestVersion": {
"archivedAt": "2023-11-07T05:31:56Z",
"audienceId": "<string>",
"becameDraftAt": "2023-11-07T05:31:56Z",
"cancelledAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"isNewPageAgent": true,
"obsoleteAt": "2023-11-07T05:31:56Z",
"publishedAt": "2023-11-07T05:31:56Z",
"queueDurationMs": 123,
"queuedAt": "2023-11-07T05:31:56Z",
"supplementaryContext": "<string>",
"versionId": "<string>",
"versionNumber": 123
},
"pageId": "<string>",
"personId": "<string>",
"personRouteKey": "<string>",
"publishedVersion": {
"archivedAt": "2023-11-07T05:31:56Z",
"audienceId": "<string>",
"becameDraftAt": "2023-11-07T05:31:56Z",
"cancelledAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"isNewPageAgent": true,
"obsoleteAt": "2023-11-07T05:31:56Z",
"publishedAt": "2023-11-07T05:31:56Z",
"queueDurationMs": 123,
"queuedAt": "2023-11-07T05:31:56Z",
"supplementaryContext": "<string>",
"versionId": "<string>",
"versionNumber": 123
},
"supplementaryContext": "<string>",
"effectiveMetadata": {
"title": "<string>",
"description": "<string>",
"keywords": [
"<string>"
],
"author": "<string>",
"robots": [],
"canonicalUrl": "<string>",
"ogTitle": "<string>",
"ogDescription": "<string>",
"ogImageUrl": "<string>",
"ogImageFileId": "<string>",
"ogImageAlt": "<string>",
"ogSiteName": "<string>",
"ogUrl": "<string>",
"twitterTitle": "<string>",
"twitterDescription": "<string>",
"twitterImageUrl": "<string>",
"twitterImageFileId": "<string>",
"twitterImageAlt": "<string>",
"twitterSite": "<string>",
"twitterCreator": "<string>",
"themeColor": "<string>"
},
"metadataOverride": {
"title": "<string>",
"description": "<string>",
"keywords": [
"<string>"
],
"author": "<string>",
"robots": [],
"canonicalUrl": "<string>",
"ogTitle": "<string>",
"ogDescription": "<string>",
"ogImageUrl": "<string>",
"ogImageFileId": "<string>",
"ogImageAlt": "<string>",
"ogSiteName": "<string>",
"ogUrl": "<string>",
"twitterTitle": "<string>",
"twitterDescription": "<string>",
"twitterImageUrl": "<string>",
"twitterImageFileId": "<string>",
"twitterImageAlt": "<string>",
"twitterSite": "<string>",
"twitterCreator": "<string>",
"themeColor": "<string>"
}
}{
"code": "VALIDATION_ERROR",
"detail": "body - name: Name is required; email: Invalid email address",
"details": [
{
"field": "body",
"issues": [
{
"code": "validation_failed",
"message": "name: Name is required",
"path": [
"name"
]
}
]
}
],
"requestId": "req_01j5k9m7n8p9q2r3s4t5v6w7x8",
"status": 400,
"title": "Bad Request",
"type": "https://api.tryarchitect.com/errors/validation_error"
}{
"code": "UNAUTHORIZED",
"detail": "Authentication is required",
"requestId": "req_01j5k9m7n8p9q2r3s4t5v6w7x8",
"status": 401,
"title": "Unauthorized",
"type": "https://api.tryarchitect.com/errors/unauthorized"
}{
"code": "FORBIDDEN",
"detail": "Multi-tenant API keys are not supported",
"requestId": "req_01j5k9m7n8p9q2r3s4t5v6w7x8",
"status": 403,
"title": "Forbidden",
"type": "https://api.tryarchitect.com/errors/forbidden"
}{
"code": "NOT_FOUND",
"detail": "Audience not found",
"requestId": "req_01j5k9m7n8p9q2r3s4t5v6w7x8",
"status": 404,
"title": "Not Found",
"type": "https://api.tryarchitect.com/errors/not_found"
}{
"code": "RATE_LIMITED",
"detail": "Rate limit exceeded",
"details": {
"limit": 100,
"remaining": 0,
"resetTime": 1713225600000,
"retryAfter": 60
},
"requestId": "req_01j5k9m7n8p9q2r3s4t5v6w7x8",
"status": 429,
"title": "Too Many Requests",
"type": "https://api.tryarchitect.com/errors/rate_limited"
}{
"code": "INTERNAL",
"detail": "An unexpected error occurred",
"requestId": "req_01j5k9m7n8p9q2r3s4t5v6w7x8",
"status": 500,
"title": "Internal Server Error",
"type": "https://api.tryarchitect.com/errors/internal"
}{
"code": "SERVICE_UNAVAILABLE",
"detail": "The service is temporarily unavailable",
"requestId": "req_01j5k9m7n8p9q2r3s4t5v6w7x8",
"status": 503,
"title": "Service Unavailable",
"type": "https://api.tryarchitect.com/errors/service_unavailable"
}Authorizations
API key authentication for the External Actor Gateway
Path Parameters
page_id parameter
audience_id parameter
Response
Audience created successfully
Pattern:
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$Pattern:
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$Available options:
home_page Show child attributes
Show child attributes
Show child attributes
Show child attributes
Available options:
archived, cancelled, draft, pending, processing, published, queued Show child attributes
Show child attributes
Show child attributes
Show child attributes
Related topics
Get audience linkGet audience versionGet audience messagesGet audience sessionGet audience active runWas this page helpful?
⌘I

