Get a plan with its evidence trail
curl --request GET \
--url https://www.getsurfaced.ai/api/v1/content-agent/plans/{planId} \
--header 'Authorization: Bearer <token>' \
--header 'X-Workspace-Id: <x-workspace-id>'import requests
url = "https://www.getsurfaced.ai/api/v1/content-agent/plans/{planId}"
headers = {
"X-Workspace-Id": "<x-workspace-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Workspace-Id': '<x-workspace-id>', Authorization: 'Bearer <token>'}
};
fetch('https://www.getsurfaced.ai/api/v1/content-agent/plans/{planId}', 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://www.getsurfaced.ai/api/v1/content-agent/plans/{planId}",
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>",
"X-Workspace-Id: <x-workspace-id>"
],
]);
$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://www.getsurfaced.ai/api/v1/content-agent/plans/{planId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Workspace-Id", "<x-workspace-id>")
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("https://www.getsurfaced.ai/api/v1/content-agent/plans/{planId}")
.header("X-Workspace-Id", "<x-workspace-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.getsurfaced.ai/api/v1/content-agent/plans/{planId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Workspace-Id"] = '<x-workspace-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"plan": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"status": "planned",
"requiredTargetCount": 1,
"lanes": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"targetKey": "<string>",
"locale": "<string>",
"marketName": "<string>",
"title": "<string>",
"angle": "<string>",
"audienceNuance": "<string>",
"primaryKeyword": "<string>",
"riskLane": "green",
"status": "planned",
"phaseLabel": "<string>",
"progress": 123,
"updatedAt": "<string>",
"required": true,
"searchIntent": "<string>",
"rationale": "<string>",
"evidenceCovered": 123,
"evidenceRequired": 123,
"blocker": {
"title": "<string>",
"detail": "<string>",
"actionLabel": "<string>"
},
"generationRetry": {
"state": "available",
"attemptNo": 123,
"maxAttempts": 123,
"retryNotBefore": "<string>"
}
}
],
"receipts": [
{
"id": "<string>",
"headline": "<string>",
"occurredAt": "<string>",
"actorLabel": "<string>",
"tone": "neutral",
"detail": "<string>",
"reasonCode": "<string>",
"nextAction": "<string>",
"targetLabel": "<string>"
}
],
"objectiveHash": "<string>",
"approval": {
"eligible": true,
"reason": "<string>",
"briefId": "<string>"
},
"strategy": "create_article",
"canRequestGenerationRetry": true,
"canManageLocalActions": true,
"canReviewExternalPublication": true,
"changeReviews": {},
"changeReviewErrors": {},
"authorityReceipt": {
"autonomyMode": "assisted",
"riskLane": "green",
"policyVersion": 123,
"decisionDetails": {
"state": "available",
"selectedIntervention": "create_article",
"sourceRecommendation": "create_article",
"noActionReason": "<string>",
"reasonCodes": [
"<string>"
],
"alternatives": [
{
"intervention": "create_article",
"rank": 123,
"evidenceEligible": true,
"policyEligible": true,
"policyDecision": "allow",
"reasonCodes": [
"<string>"
]
}
]
},
"livePublicationIntent": true
},
"publicationEligibility": {
"eligible": true,
"autonomyEligible": true,
"activePolicy": true,
"destinationConnected": true,
"reason": "<string>"
},
"measurementOutcomes": {
"verified": 123,
"ineffective": 123,
"awaiting": 123
}
},
"publications": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"targetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"articleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resourceType": "article",
"handle": "<string>",
"status": "<string>",
"verificationState": "<string>",
"remoteAdminUrl": "<string>",
"remotePublicUrl": "<string>",
"remoteVerifiedAt": "<string>",
"remotePublishedAt": "<string>",
"liveCheckedAt": "<string>",
"failureCode": "<string>",
"failureMessage": "<string>",
"approvedAt": "<string>",
"autoLive": true
}
],
"outcomes": [
{
"measurementId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"targetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"targetStatus": "<string>",
"targetPublicUrl": "<string>",
"state": "awaiting_evidence",
"checkpointDay": 123,
"marketLabel": "<string>",
"locale": "<string>",
"before": {
"brandMentionRate": 123,
"citationRate": 123,
"answerCoverage": 123
},
"after": {
"brandMentionRate": 123,
"citationRate": 123,
"answerCoverage": 123
},
"criteriaPassed": 123,
"criteriaTotal": 123,
"observedAt": "<string>",
"reviewReasonCode": "<string>",
"baselineSampleCount": 123,
"observedSampleCount": 123,
"publicationAnchor": {
"source": "<string>",
"liveAt": "<string>",
"publicUrl": "<string>",
"revisionRef": "<string>"
},
"nextAction": {
"opportunityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"recommendedAction": "create_article",
"rationale": "<string>",
"requiresMaterialDifference": true
}
}
],
"actionOutcomes": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"targetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"action": "update_existing_article",
"kind": "implementation",
"state": "implementation_verified",
"checkpointDay": 1,
"headline": "<string>",
"detail": "<string>",
"observedAt": "2023-11-07T05:31:56Z",
"dueAt": "2023-11-07T05:31:56Z",
"closureMeasurementId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}Settings
Get a plan with its evidence trail
Returns the plan, its publication receipts and measured outcomes. Locale lanes stay separate: this never presents them as translations.
GET
/
content-agent
/
plans
/
{planId}
Get a plan with its evidence trail
curl --request GET \
--url https://www.getsurfaced.ai/api/v1/content-agent/plans/{planId} \
--header 'Authorization: Bearer <token>' \
--header 'X-Workspace-Id: <x-workspace-id>'import requests
url = "https://www.getsurfaced.ai/api/v1/content-agent/plans/{planId}"
headers = {
"X-Workspace-Id": "<x-workspace-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Workspace-Id': '<x-workspace-id>', Authorization: 'Bearer <token>'}
};
fetch('https://www.getsurfaced.ai/api/v1/content-agent/plans/{planId}', 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://www.getsurfaced.ai/api/v1/content-agent/plans/{planId}",
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>",
"X-Workspace-Id: <x-workspace-id>"
],
]);
$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://www.getsurfaced.ai/api/v1/content-agent/plans/{planId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Workspace-Id", "<x-workspace-id>")
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("https://www.getsurfaced.ai/api/v1/content-agent/plans/{planId}")
.header("X-Workspace-Id", "<x-workspace-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.getsurfaced.ai/api/v1/content-agent/plans/{planId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Workspace-Id"] = '<x-workspace-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"plan": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"status": "planned",
"requiredTargetCount": 1,
"lanes": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"targetKey": "<string>",
"locale": "<string>",
"marketName": "<string>",
"title": "<string>",
"angle": "<string>",
"audienceNuance": "<string>",
"primaryKeyword": "<string>",
"riskLane": "green",
"status": "planned",
"phaseLabel": "<string>",
"progress": 123,
"updatedAt": "<string>",
"required": true,
"searchIntent": "<string>",
"rationale": "<string>",
"evidenceCovered": 123,
"evidenceRequired": 123,
"blocker": {
"title": "<string>",
"detail": "<string>",
"actionLabel": "<string>"
},
"generationRetry": {
"state": "available",
"attemptNo": 123,
"maxAttempts": 123,
"retryNotBefore": "<string>"
}
}
],
"receipts": [
{
"id": "<string>",
"headline": "<string>",
"occurredAt": "<string>",
"actorLabel": "<string>",
"tone": "neutral",
"detail": "<string>",
"reasonCode": "<string>",
"nextAction": "<string>",
"targetLabel": "<string>"
}
],
"objectiveHash": "<string>",
"approval": {
"eligible": true,
"reason": "<string>",
"briefId": "<string>"
},
"strategy": "create_article",
"canRequestGenerationRetry": true,
"canManageLocalActions": true,
"canReviewExternalPublication": true,
"changeReviews": {},
"changeReviewErrors": {},
"authorityReceipt": {
"autonomyMode": "assisted",
"riskLane": "green",
"policyVersion": 123,
"decisionDetails": {
"state": "available",
"selectedIntervention": "create_article",
"sourceRecommendation": "create_article",
"noActionReason": "<string>",
"reasonCodes": [
"<string>"
],
"alternatives": [
{
"intervention": "create_article",
"rank": 123,
"evidenceEligible": true,
"policyEligible": true,
"policyDecision": "allow",
"reasonCodes": [
"<string>"
]
}
]
},
"livePublicationIntent": true
},
"publicationEligibility": {
"eligible": true,
"autonomyEligible": true,
"activePolicy": true,
"destinationConnected": true,
"reason": "<string>"
},
"measurementOutcomes": {
"verified": 123,
"ineffective": 123,
"awaiting": 123
}
},
"publications": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"targetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"articleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resourceType": "article",
"handle": "<string>",
"status": "<string>",
"verificationState": "<string>",
"remoteAdminUrl": "<string>",
"remotePublicUrl": "<string>",
"remoteVerifiedAt": "<string>",
"remotePublishedAt": "<string>",
"liveCheckedAt": "<string>",
"failureCode": "<string>",
"failureMessage": "<string>",
"approvedAt": "<string>",
"autoLive": true
}
],
"outcomes": [
{
"measurementId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"targetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"targetStatus": "<string>",
"targetPublicUrl": "<string>",
"state": "awaiting_evidence",
"checkpointDay": 123,
"marketLabel": "<string>",
"locale": "<string>",
"before": {
"brandMentionRate": 123,
"citationRate": 123,
"answerCoverage": 123
},
"after": {
"brandMentionRate": 123,
"citationRate": 123,
"answerCoverage": 123
},
"criteriaPassed": 123,
"criteriaTotal": 123,
"observedAt": "<string>",
"reviewReasonCode": "<string>",
"baselineSampleCount": 123,
"observedSampleCount": 123,
"publicationAnchor": {
"source": "<string>",
"liveAt": "<string>",
"publicUrl": "<string>",
"revisionRef": "<string>"
},
"nextAction": {
"opportunityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"recommendedAction": "create_article",
"rationale": "<string>",
"requiresMaterialDifference": true
}
}
],
"actionOutcomes": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"targetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"action": "update_existing_article",
"kind": "implementation",
"state": "implementation_verified",
"checkpointDay": 1,
"headline": "<string>",
"detail": "<string>",
"observedAt": "2023-11-07T05:31:56Z",
"dueAt": "2023-11-07T05:31:56Z",
"closureMeasurementId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}Authorizations
API key (sk_live_...) created at https://www.getsurfaced.ai/app/settings/account/api-keys