Update content asset
curl --request PATCH \
--url https://ai.wisepilot.app/api/v1/content/assets/{id}/update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"status": "<string>",
"primary_keyword": "<string>",
"journey_stage": "<string>",
"sections": [
{
"id": "<string>",
"title": "<string>",
"content": "<string>"
}
]
}
'import requests
url = "https://ai.wisepilot.app/api/v1/content/assets/{id}/update"
payload = {
"title": "<string>",
"status": "<string>",
"primary_keyword": "<string>",
"journey_stage": "<string>",
"sections": [
{
"id": "<string>",
"title": "<string>",
"content": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
status: '<string>',
primary_keyword: '<string>',
journey_stage: '<string>',
sections: [{id: '<string>', title: '<string>', content: '<string>'}]
})
};
fetch('https://ai.wisepilot.app/api/v1/content/assets/{id}/update', 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://ai.wisepilot.app/api/v1/content/assets/{id}/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'title' => '<string>',
'status' => '<string>',
'primary_keyword' => '<string>',
'journey_stage' => '<string>',
'sections' => [
[
'id' => '<string>',
'title' => '<string>',
'content' => '<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://ai.wisepilot.app/api/v1/content/assets/{id}/update"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"status\": \"<string>\",\n \"primary_keyword\": \"<string>\",\n \"journey_stage\": \"<string>\",\n \"sections\": [\n {\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"content\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://ai.wisepilot.app/api/v1/content/assets/{id}/update")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"status\": \"<string>\",\n \"primary_keyword\": \"<string>\",\n \"journey_stage\": \"<string>\",\n \"sections\": [\n {\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"content\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://ai.wisepilot.app/api/v1/content/assets/{id}/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"status\": \"<string>\",\n \"primary_keyword\": \"<string>\",\n \"journey_stage\": \"<string>\",\n \"sections\": [\n {\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"content\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"contentId": "<string>",
"title": "<string>",
"assetType": "<string>",
"status": "<string>",
"excerpt": "<string>",
"rawContent": "<string>",
"primaryKeyword": "<string>",
"secondaryKeyword": "<string>",
"seoTitle": "<string>",
"seoDescription": "<string>",
"seoContext": {},
"journeyStage": "<string>",
"intent": "<string>",
"optimizationScore": 123,
"categories": [
"<string>"
],
"tags": [
"<string>"
],
"publishDate": "2023-11-07T05:31:56Z",
"author": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"sections": [
{
"id": "<string>",
"sectionType": "<string>",
"title": "<string>",
"content": "<string>",
"sortOrder": 123
}
]
}
}{
"success": false,
"error": "Invalid API key",
"code": "INVALID_API_KEY"
}{
"success": false,
"error": "Not found"
}Content
Update content asset
Update an existing content asset. Runs surgical rewrite and eval persist on section content updates. minRole: editor
PATCH
/
content
/
assets
/
{id}
/
update
Update content asset
curl --request PATCH \
--url https://ai.wisepilot.app/api/v1/content/assets/{id}/update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"status": "<string>",
"primary_keyword": "<string>",
"journey_stage": "<string>",
"sections": [
{
"id": "<string>",
"title": "<string>",
"content": "<string>"
}
]
}
'import requests
url = "https://ai.wisepilot.app/api/v1/content/assets/{id}/update"
payload = {
"title": "<string>",
"status": "<string>",
"primary_keyword": "<string>",
"journey_stage": "<string>",
"sections": [
{
"id": "<string>",
"title": "<string>",
"content": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
status: '<string>',
primary_keyword: '<string>',
journey_stage: '<string>',
sections: [{id: '<string>', title: '<string>', content: '<string>'}]
})
};
fetch('https://ai.wisepilot.app/api/v1/content/assets/{id}/update', 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://ai.wisepilot.app/api/v1/content/assets/{id}/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'title' => '<string>',
'status' => '<string>',
'primary_keyword' => '<string>',
'journey_stage' => '<string>',
'sections' => [
[
'id' => '<string>',
'title' => '<string>',
'content' => '<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://ai.wisepilot.app/api/v1/content/assets/{id}/update"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"status\": \"<string>\",\n \"primary_keyword\": \"<string>\",\n \"journey_stage\": \"<string>\",\n \"sections\": [\n {\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"content\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://ai.wisepilot.app/api/v1/content/assets/{id}/update")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"status\": \"<string>\",\n \"primary_keyword\": \"<string>\",\n \"journey_stage\": \"<string>\",\n \"sections\": [\n {\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"content\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://ai.wisepilot.app/api/v1/content/assets/{id}/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"status\": \"<string>\",\n \"primary_keyword\": \"<string>\",\n \"journey_stage\": \"<string>\",\n \"sections\": [\n {\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"content\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"contentId": "<string>",
"title": "<string>",
"assetType": "<string>",
"status": "<string>",
"excerpt": "<string>",
"rawContent": "<string>",
"primaryKeyword": "<string>",
"secondaryKeyword": "<string>",
"seoTitle": "<string>",
"seoDescription": "<string>",
"seoContext": {},
"journeyStage": "<string>",
"intent": "<string>",
"optimizationScore": 123,
"categories": [
"<string>"
],
"tags": [
"<string>"
],
"publishDate": "2023-11-07T05:31:56Z",
"author": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"sections": [
{
"id": "<string>",
"sectionType": "<string>",
"title": "<string>",
"content": "<string>",
"sortOrder": 123
}
]
}
}{
"success": false,
"error": "Invalid API key",
"code": "INVALID_API_KEY"
}{
"success": false,
"error": "Not found"
}Authorizations
API key prefixed with cr_ (e.g. cr_a1b2c3...)
Path Parameters
Asset content_id
Body
application/json
⌘I