Publish Handoff
curl --request POST \
--url https://api.example.com/api/v1/brands/{brand_id}/brand-intelligence/native-create/{revision_id}/publish-handoff \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"revisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idempotencyKey": "<string>",
"destinationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"approved": true,
"childContext": {
"programRevisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"childRevisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"updateTarget": {
"revisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"destinationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sourcePageRef": {
"brandId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"revisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contentHash": "<string>",
"canonicalUrl": "<string>",
"evidenceRecordId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"canonicalUrl": "<string>",
"currentTitle": "<string>",
"currentBody": "<string>",
"currentContentSha256": "<string>",
"preparedAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"proof": "<string>",
"provider": "wordpress",
"postId": 2,
"modifiedGmt": "<string>"
}
}
'import requests
url = "https://api.example.com/api/v1/brands/{brand_id}/brand-intelligence/native-create/{revision_id}/publish-handoff"
payload = {
"revisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idempotencyKey": "<string>",
"destinationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"approved": True,
"childContext": {
"programRevisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"childRevisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"updateTarget": {
"revisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"destinationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sourcePageRef": {
"brandId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"revisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contentHash": "<string>",
"canonicalUrl": "<string>",
"evidenceRecordId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"canonicalUrl": "<string>",
"currentTitle": "<string>",
"currentBody": "<string>",
"currentContentSha256": "<string>",
"preparedAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"proof": "<string>",
"provider": "wordpress",
"postId": 2,
"modifiedGmt": "<string>"
}
}
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({
revisionId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
idempotencyKey: '<string>',
destinationId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
approved: true,
childContext: {
programRevisionId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
assetId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
childRevisionId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
},
updateTarget: {
revisionId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
destinationId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
sourcePageRef: {
brandId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
revisionId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
contentHash: '<string>',
canonicalUrl: '<string>',
evidenceRecordId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
},
canonicalUrl: '<string>',
currentTitle: '<string>',
currentBody: '<string>',
currentContentSha256: '<string>',
preparedAt: '2023-11-07T05:31:56Z',
expiresAt: '2023-11-07T05:31:56Z',
proof: '<string>',
provider: 'wordpress',
postId: 2,
modifiedGmt: '<string>'
}
})
};
fetch('https://api.example.com/api/v1/brands/{brand_id}/brand-intelligence/native-create/{revision_id}/publish-handoff', 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.example.com/api/v1/brands/{brand_id}/brand-intelligence/native-create/{revision_id}/publish-handoff",
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([
'revisionId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'idempotencyKey' => '<string>',
'destinationId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'approved' => true,
'childContext' => [
'programRevisionId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'assetId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'childRevisionId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'updateTarget' => [
'revisionId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'destinationId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'sourcePageRef' => [
'brandId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'revisionId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'contentHash' => '<string>',
'canonicalUrl' => '<string>',
'evidenceRecordId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'canonicalUrl' => '<string>',
'currentTitle' => '<string>',
'currentBody' => '<string>',
'currentContentSha256' => '<string>',
'preparedAt' => '2023-11-07T05:31:56Z',
'expiresAt' => '2023-11-07T05:31:56Z',
'proof' => '<string>',
'provider' => 'wordpress',
'postId' => 2,
'modifiedGmt' => '<string>'
]
]),
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://api.example.com/api/v1/brands/{brand_id}/brand-intelligence/native-create/{revision_id}/publish-handoff"
payload := strings.NewReader("{\n \"revisionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"idempotencyKey\": \"<string>\",\n \"destinationId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"approved\": true,\n \"childContext\": {\n \"programRevisionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"childRevisionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"updateTarget\": {\n \"revisionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"destinationId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sourcePageRef\": {\n \"brandId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"revisionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"contentHash\": \"<string>\",\n \"canonicalUrl\": \"<string>\",\n \"evidenceRecordId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"canonicalUrl\": \"<string>\",\n \"currentTitle\": \"<string>\",\n \"currentBody\": \"<string>\",\n \"currentContentSha256\": \"<string>\",\n \"preparedAt\": \"2023-11-07T05:31:56Z\",\n \"expiresAt\": \"2023-11-07T05:31:56Z\",\n \"proof\": \"<string>\",\n \"provider\": \"wordpress\",\n \"postId\": 2,\n \"modifiedGmt\": \"<string>\"\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://api.example.com/api/v1/brands/{brand_id}/brand-intelligence/native-create/{revision_id}/publish-handoff")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"revisionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"idempotencyKey\": \"<string>\",\n \"destinationId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"approved\": true,\n \"childContext\": {\n \"programRevisionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"childRevisionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"updateTarget\": {\n \"revisionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"destinationId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sourcePageRef\": {\n \"brandId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"revisionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"contentHash\": \"<string>\",\n \"canonicalUrl\": \"<string>\",\n \"evidenceRecordId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"canonicalUrl\": \"<string>\",\n \"currentTitle\": \"<string>\",\n \"currentBody\": \"<string>\",\n \"currentContentSha256\": \"<string>\",\n \"preparedAt\": \"2023-11-07T05:31:56Z\",\n \"expiresAt\": \"2023-11-07T05:31:56Z\",\n \"proof\": \"<string>\",\n \"provider\": \"wordpress\",\n \"postId\": 2,\n \"modifiedGmt\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/brands/{brand_id}/brand-intelligence/native-create/{revision_id}/publish-handoff")
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 \"revisionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"idempotencyKey\": \"<string>\",\n \"destinationId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"approved\": true,\n \"childContext\": {\n \"programRevisionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"childRevisionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"updateTarget\": {\n \"revisionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"destinationId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sourcePageRef\": {\n \"brandId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"revisionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"contentHash\": \"<string>\",\n \"canonicalUrl\": \"<string>\",\n \"evidenceRecordId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"canonicalUrl\": \"<string>\",\n \"currentTitle\": \"<string>\",\n \"currentBody\": \"<string>\",\n \"currentContentSha256\": \"<string>\",\n \"preparedAt\": \"2023-11-07T05:31:56Z\",\n \"expiresAt\": \"2023-11-07T05:31:56Z\",\n \"proof\": \"<string>\",\n \"provider\": \"wordpress\",\n \"postId\": 2,\n \"modifiedGmt\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"revisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"handoffId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"destinationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"teamId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"teamTaskId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "needs_approval",
"accessState": "available",
"childContext": {
"programRevisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"childRevisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"publishTaskId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"operation": "create_post",
"sourceUrl": "<string>",
"reviewDraftUrl": "<string>",
"publicationStatus": "draft",
"reused": false
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}SEO and Content Create
Publish Handoff
POST
/
api
/
v1
/
brands
/
{brand_id}
/
brand-intelligence
/
native-create
/
{revision_id}
/
publish-handoff
Publish Handoff
curl --request POST \
--url https://api.example.com/api/v1/brands/{brand_id}/brand-intelligence/native-create/{revision_id}/publish-handoff \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"revisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idempotencyKey": "<string>",
"destinationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"approved": true,
"childContext": {
"programRevisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"childRevisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"updateTarget": {
"revisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"destinationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sourcePageRef": {
"brandId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"revisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contentHash": "<string>",
"canonicalUrl": "<string>",
"evidenceRecordId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"canonicalUrl": "<string>",
"currentTitle": "<string>",
"currentBody": "<string>",
"currentContentSha256": "<string>",
"preparedAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"proof": "<string>",
"provider": "wordpress",
"postId": 2,
"modifiedGmt": "<string>"
}
}
'import requests
url = "https://api.example.com/api/v1/brands/{brand_id}/brand-intelligence/native-create/{revision_id}/publish-handoff"
payload = {
"revisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idempotencyKey": "<string>",
"destinationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"approved": True,
"childContext": {
"programRevisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"childRevisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"updateTarget": {
"revisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"destinationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sourcePageRef": {
"brandId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"revisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contentHash": "<string>",
"canonicalUrl": "<string>",
"evidenceRecordId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"canonicalUrl": "<string>",
"currentTitle": "<string>",
"currentBody": "<string>",
"currentContentSha256": "<string>",
"preparedAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"proof": "<string>",
"provider": "wordpress",
"postId": 2,
"modifiedGmt": "<string>"
}
}
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({
revisionId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
idempotencyKey: '<string>',
destinationId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
approved: true,
childContext: {
programRevisionId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
assetId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
childRevisionId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
},
updateTarget: {
revisionId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
destinationId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
sourcePageRef: {
brandId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
revisionId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
contentHash: '<string>',
canonicalUrl: '<string>',
evidenceRecordId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
},
canonicalUrl: '<string>',
currentTitle: '<string>',
currentBody: '<string>',
currentContentSha256: '<string>',
preparedAt: '2023-11-07T05:31:56Z',
expiresAt: '2023-11-07T05:31:56Z',
proof: '<string>',
provider: 'wordpress',
postId: 2,
modifiedGmt: '<string>'
}
})
};
fetch('https://api.example.com/api/v1/brands/{brand_id}/brand-intelligence/native-create/{revision_id}/publish-handoff', 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.example.com/api/v1/brands/{brand_id}/brand-intelligence/native-create/{revision_id}/publish-handoff",
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([
'revisionId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'idempotencyKey' => '<string>',
'destinationId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'approved' => true,
'childContext' => [
'programRevisionId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'assetId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'childRevisionId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'updateTarget' => [
'revisionId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'destinationId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'sourcePageRef' => [
'brandId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'revisionId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'contentHash' => '<string>',
'canonicalUrl' => '<string>',
'evidenceRecordId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'canonicalUrl' => '<string>',
'currentTitle' => '<string>',
'currentBody' => '<string>',
'currentContentSha256' => '<string>',
'preparedAt' => '2023-11-07T05:31:56Z',
'expiresAt' => '2023-11-07T05:31:56Z',
'proof' => '<string>',
'provider' => 'wordpress',
'postId' => 2,
'modifiedGmt' => '<string>'
]
]),
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://api.example.com/api/v1/brands/{brand_id}/brand-intelligence/native-create/{revision_id}/publish-handoff"
payload := strings.NewReader("{\n \"revisionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"idempotencyKey\": \"<string>\",\n \"destinationId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"approved\": true,\n \"childContext\": {\n \"programRevisionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"childRevisionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"updateTarget\": {\n \"revisionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"destinationId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sourcePageRef\": {\n \"brandId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"revisionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"contentHash\": \"<string>\",\n \"canonicalUrl\": \"<string>\",\n \"evidenceRecordId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"canonicalUrl\": \"<string>\",\n \"currentTitle\": \"<string>\",\n \"currentBody\": \"<string>\",\n \"currentContentSha256\": \"<string>\",\n \"preparedAt\": \"2023-11-07T05:31:56Z\",\n \"expiresAt\": \"2023-11-07T05:31:56Z\",\n \"proof\": \"<string>\",\n \"provider\": \"wordpress\",\n \"postId\": 2,\n \"modifiedGmt\": \"<string>\"\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://api.example.com/api/v1/brands/{brand_id}/brand-intelligence/native-create/{revision_id}/publish-handoff")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"revisionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"idempotencyKey\": \"<string>\",\n \"destinationId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"approved\": true,\n \"childContext\": {\n \"programRevisionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"childRevisionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"updateTarget\": {\n \"revisionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"destinationId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sourcePageRef\": {\n \"brandId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"revisionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"contentHash\": \"<string>\",\n \"canonicalUrl\": \"<string>\",\n \"evidenceRecordId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"canonicalUrl\": \"<string>\",\n \"currentTitle\": \"<string>\",\n \"currentBody\": \"<string>\",\n \"currentContentSha256\": \"<string>\",\n \"preparedAt\": \"2023-11-07T05:31:56Z\",\n \"expiresAt\": \"2023-11-07T05:31:56Z\",\n \"proof\": \"<string>\",\n \"provider\": \"wordpress\",\n \"postId\": 2,\n \"modifiedGmt\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/brands/{brand_id}/brand-intelligence/native-create/{revision_id}/publish-handoff")
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 \"revisionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"idempotencyKey\": \"<string>\",\n \"destinationId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"approved\": true,\n \"childContext\": {\n \"programRevisionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"childRevisionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"updateTarget\": {\n \"revisionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"destinationId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sourcePageRef\": {\n \"brandId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"revisionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"contentHash\": \"<string>\",\n \"canonicalUrl\": \"<string>\",\n \"evidenceRecordId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"canonicalUrl\": \"<string>\",\n \"currentTitle\": \"<string>\",\n \"currentBody\": \"<string>\",\n \"currentContentSha256\": \"<string>\",\n \"preparedAt\": \"2023-11-07T05:31:56Z\",\n \"expiresAt\": \"2023-11-07T05:31:56Z\",\n \"proof\": \"<string>\",\n \"provider\": \"wordpress\",\n \"postId\": 2,\n \"modifiedGmt\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"revisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"handoffId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"destinationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"teamId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"teamTaskId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "needs_approval",
"accessState": "available",
"childContext": {
"programRevisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"childRevisionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"publishTaskId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"operation": "create_post",
"sourceUrl": "<string>",
"reviewDraftUrl": "<string>",
"publicationStatus": "draft",
"reused": false
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Required string length:
1 - 128Show child attributes
Show child attributes
- NativeCreateWordPressPageUpdateTarget
- NativeCreateKeystaticPageUpdateTarget
Show child attributes
Show child attributes
Response
Successful Response
Available options:
needs_approval, queued, published, failed Available options:
available, restricted, erased Show child attributes
Show child attributes
Available options:
create_post, update_page, create_review_draft Required string length:
1 - 2083Required string length:
1 - 2083Allowed value:
"draft"Was this page helpful?