Update content
curl --request PATCH \
--url https://api.1club.ai/v1/platform/content/{contentId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"slug": "<string>",
"contentBlocks": [
{}
],
"contentHtml": "<string>",
"excerpt": "<string>",
"tags": [
"<string>"
],
"images": [
"<string>"
],
"imageNameQueries": [
"<string>"
],
"audience": {
"memberTypes": [
"<string>"
],
"tags": [
"<string>"
],
"membershipPlanIds": [
123
],
"membershipPlanCategoryIds": [
123
],
"progressionLevelIds": [
123
]
},
"metaTitle": "<string>",
"metaDescription": "<string>",
"canonicalUrl": "<string>",
"language": "<string>",
"featured": true,
"faqs": [
{
"question": "<string>",
"answer": "<string>"
}
]
}
'import requests
url = "https://api.1club.ai/v1/platform/content/{contentId}"
payload = {
"title": "<string>",
"slug": "<string>",
"contentBlocks": [{}],
"contentHtml": "<string>",
"excerpt": "<string>",
"tags": ["<string>"],
"images": ["<string>"],
"imageNameQueries": ["<string>"],
"audience": {
"memberTypes": ["<string>"],
"tags": ["<string>"],
"membershipPlanIds": [123],
"membershipPlanCategoryIds": [123],
"progressionLevelIds": [123]
},
"metaTitle": "<string>",
"metaDescription": "<string>",
"canonicalUrl": "<string>",
"language": "<string>",
"featured": True,
"faqs": [
{
"question": "<string>",
"answer": "<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>',
slug: '<string>',
contentBlocks: [{}],
contentHtml: '<string>',
excerpt: '<string>',
tags: ['<string>'],
images: ['<string>'],
imageNameQueries: ['<string>'],
audience: {
memberTypes: ['<string>'],
tags: ['<string>'],
membershipPlanIds: [123],
membershipPlanCategoryIds: [123],
progressionLevelIds: [123]
},
metaTitle: '<string>',
metaDescription: '<string>',
canonicalUrl: '<string>',
language: '<string>',
featured: true,
faqs: [{question: '<string>', answer: '<string>'}]
})
};
fetch('https://api.1club.ai/v1/platform/content/{contentId}', 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.1club.ai/v1/platform/content/{contentId}",
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>',
'slug' => '<string>',
'contentBlocks' => [
[
]
],
'contentHtml' => '<string>',
'excerpt' => '<string>',
'tags' => [
'<string>'
],
'images' => [
'<string>'
],
'imageNameQueries' => [
'<string>'
],
'audience' => [
'memberTypes' => [
'<string>'
],
'tags' => [
'<string>'
],
'membershipPlanIds' => [
123
],
'membershipPlanCategoryIds' => [
123
],
'progressionLevelIds' => [
123
]
],
'metaTitle' => '<string>',
'metaDescription' => '<string>',
'canonicalUrl' => '<string>',
'language' => '<string>',
'featured' => true,
'faqs' => [
[
'question' => '<string>',
'answer' => '<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.1club.ai/v1/platform/content/{contentId}"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"slug\": \"<string>\",\n \"contentBlocks\": [\n {}\n ],\n \"contentHtml\": \"<string>\",\n \"excerpt\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"images\": [\n \"<string>\"\n ],\n \"imageNameQueries\": [\n \"<string>\"\n ],\n \"audience\": {\n \"memberTypes\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"membershipPlanIds\": [\n 123\n ],\n \"membershipPlanCategoryIds\": [\n 123\n ],\n \"progressionLevelIds\": [\n 123\n ]\n },\n \"metaTitle\": \"<string>\",\n \"metaDescription\": \"<string>\",\n \"canonicalUrl\": \"<string>\",\n \"language\": \"<string>\",\n \"featured\": true,\n \"faqs\": [\n {\n \"question\": \"<string>\",\n \"answer\": \"<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://api.1club.ai/v1/platform/content/{contentId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"slug\": \"<string>\",\n \"contentBlocks\": [\n {}\n ],\n \"contentHtml\": \"<string>\",\n \"excerpt\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"images\": [\n \"<string>\"\n ],\n \"imageNameQueries\": [\n \"<string>\"\n ],\n \"audience\": {\n \"memberTypes\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"membershipPlanIds\": [\n 123\n ],\n \"membershipPlanCategoryIds\": [\n 123\n ],\n \"progressionLevelIds\": [\n 123\n ]\n },\n \"metaTitle\": \"<string>\",\n \"metaDescription\": \"<string>\",\n \"canonicalUrl\": \"<string>\",\n \"language\": \"<string>\",\n \"featured\": true,\n \"faqs\": [\n {\n \"question\": \"<string>\",\n \"answer\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.1club.ai/v1/platform/content/{contentId}")
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 \"slug\": \"<string>\",\n \"contentBlocks\": [\n {}\n ],\n \"contentHtml\": \"<string>\",\n \"excerpt\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"images\": [\n \"<string>\"\n ],\n \"imageNameQueries\": [\n \"<string>\"\n ],\n \"audience\": {\n \"memberTypes\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"membershipPlanIds\": [\n 123\n ],\n \"membershipPlanCategoryIds\": [\n 123\n ],\n \"progressionLevelIds\": [\n 123\n ]\n },\n \"metaTitle\": \"<string>\",\n \"metaDescription\": \"<string>\",\n \"canonicalUrl\": \"<string>\",\n \"language\": \"<string>\",\n \"featured\": true,\n \"faqs\": [\n {\n \"question\": \"<string>\",\n \"answer\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"organizationId": 123,
"title": "<string>",
"slug": "<string>",
"type": "faq",
"status": "<string>",
"visibility": "Public",
"audience": {
"memberTypes": [
"<string>"
],
"tags": [
"<string>"
],
"membershipPlanIds": [
123
],
"membershipPlanCategoryIds": [
123
],
"progressionLevelIds": [
123
]
},
"content": {
"html": "<string>",
"blocks": {},
"summary": "<string>",
"keywords": [
"<string>"
]
},
"excerpt": "<string>",
"metaTitle": "<string>",
"metaDescription": "<string>",
"metaKeywords": "<string>",
"canonicalUrl": "<string>",
"template": "<string>",
"layout": "<string>",
"customFields": {},
"tags": [
"<string>"
],
"summary": "<string>",
"keywords": [
"<string>"
],
"images": [
"<string>"
],
"featured": true,
"faqs": [
{
"question": "<string>",
"answer": "<string>"
}
],
"authorId": 123,
"author": {
"id": 123,
"name": "<string>",
"email": "<string>",
"profileImage": "<string>"
},
"publishedAt": "2023-11-07T05:31:56Z",
"language": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}Content
Update content
Updates a content item by id - the numeric id from the list endpoint, not the slug. Only the fields you send change.
tags and images replace their arrays wholesale. Switching status to draft takes the item off the public site without deleting it.
PATCH
/
v1
/
platform
/
content
/
{contentId}
Update content
curl --request PATCH \
--url https://api.1club.ai/v1/platform/content/{contentId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"slug": "<string>",
"contentBlocks": [
{}
],
"contentHtml": "<string>",
"excerpt": "<string>",
"tags": [
"<string>"
],
"images": [
"<string>"
],
"imageNameQueries": [
"<string>"
],
"audience": {
"memberTypes": [
"<string>"
],
"tags": [
"<string>"
],
"membershipPlanIds": [
123
],
"membershipPlanCategoryIds": [
123
],
"progressionLevelIds": [
123
]
},
"metaTitle": "<string>",
"metaDescription": "<string>",
"canonicalUrl": "<string>",
"language": "<string>",
"featured": true,
"faqs": [
{
"question": "<string>",
"answer": "<string>"
}
]
}
'import requests
url = "https://api.1club.ai/v1/platform/content/{contentId}"
payload = {
"title": "<string>",
"slug": "<string>",
"contentBlocks": [{}],
"contentHtml": "<string>",
"excerpt": "<string>",
"tags": ["<string>"],
"images": ["<string>"],
"imageNameQueries": ["<string>"],
"audience": {
"memberTypes": ["<string>"],
"tags": ["<string>"],
"membershipPlanIds": [123],
"membershipPlanCategoryIds": [123],
"progressionLevelIds": [123]
},
"metaTitle": "<string>",
"metaDescription": "<string>",
"canonicalUrl": "<string>",
"language": "<string>",
"featured": True,
"faqs": [
{
"question": "<string>",
"answer": "<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>',
slug: '<string>',
contentBlocks: [{}],
contentHtml: '<string>',
excerpt: '<string>',
tags: ['<string>'],
images: ['<string>'],
imageNameQueries: ['<string>'],
audience: {
memberTypes: ['<string>'],
tags: ['<string>'],
membershipPlanIds: [123],
membershipPlanCategoryIds: [123],
progressionLevelIds: [123]
},
metaTitle: '<string>',
metaDescription: '<string>',
canonicalUrl: '<string>',
language: '<string>',
featured: true,
faqs: [{question: '<string>', answer: '<string>'}]
})
};
fetch('https://api.1club.ai/v1/platform/content/{contentId}', 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.1club.ai/v1/platform/content/{contentId}",
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>',
'slug' => '<string>',
'contentBlocks' => [
[
]
],
'contentHtml' => '<string>',
'excerpt' => '<string>',
'tags' => [
'<string>'
],
'images' => [
'<string>'
],
'imageNameQueries' => [
'<string>'
],
'audience' => [
'memberTypes' => [
'<string>'
],
'tags' => [
'<string>'
],
'membershipPlanIds' => [
123
],
'membershipPlanCategoryIds' => [
123
],
'progressionLevelIds' => [
123
]
],
'metaTitle' => '<string>',
'metaDescription' => '<string>',
'canonicalUrl' => '<string>',
'language' => '<string>',
'featured' => true,
'faqs' => [
[
'question' => '<string>',
'answer' => '<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.1club.ai/v1/platform/content/{contentId}"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"slug\": \"<string>\",\n \"contentBlocks\": [\n {}\n ],\n \"contentHtml\": \"<string>\",\n \"excerpt\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"images\": [\n \"<string>\"\n ],\n \"imageNameQueries\": [\n \"<string>\"\n ],\n \"audience\": {\n \"memberTypes\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"membershipPlanIds\": [\n 123\n ],\n \"membershipPlanCategoryIds\": [\n 123\n ],\n \"progressionLevelIds\": [\n 123\n ]\n },\n \"metaTitle\": \"<string>\",\n \"metaDescription\": \"<string>\",\n \"canonicalUrl\": \"<string>\",\n \"language\": \"<string>\",\n \"featured\": true,\n \"faqs\": [\n {\n \"question\": \"<string>\",\n \"answer\": \"<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://api.1club.ai/v1/platform/content/{contentId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"slug\": \"<string>\",\n \"contentBlocks\": [\n {}\n ],\n \"contentHtml\": \"<string>\",\n \"excerpt\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"images\": [\n \"<string>\"\n ],\n \"imageNameQueries\": [\n \"<string>\"\n ],\n \"audience\": {\n \"memberTypes\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"membershipPlanIds\": [\n 123\n ],\n \"membershipPlanCategoryIds\": [\n 123\n ],\n \"progressionLevelIds\": [\n 123\n ]\n },\n \"metaTitle\": \"<string>\",\n \"metaDescription\": \"<string>\",\n \"canonicalUrl\": \"<string>\",\n \"language\": \"<string>\",\n \"featured\": true,\n \"faqs\": [\n {\n \"question\": \"<string>\",\n \"answer\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.1club.ai/v1/platform/content/{contentId}")
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 \"slug\": \"<string>\",\n \"contentBlocks\": [\n {}\n ],\n \"contentHtml\": \"<string>\",\n \"excerpt\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"images\": [\n \"<string>\"\n ],\n \"imageNameQueries\": [\n \"<string>\"\n ],\n \"audience\": {\n \"memberTypes\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"membershipPlanIds\": [\n 123\n ],\n \"membershipPlanCategoryIds\": [\n 123\n ],\n \"progressionLevelIds\": [\n 123\n ]\n },\n \"metaTitle\": \"<string>\",\n \"metaDescription\": \"<string>\",\n \"canonicalUrl\": \"<string>\",\n \"language\": \"<string>\",\n \"featured\": true,\n \"faqs\": [\n {\n \"question\": \"<string>\",\n \"answer\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"organizationId": 123,
"title": "<string>",
"slug": "<string>",
"type": "faq",
"status": "<string>",
"visibility": "Public",
"audience": {
"memberTypes": [
"<string>"
],
"tags": [
"<string>"
],
"membershipPlanIds": [
123
],
"membershipPlanCategoryIds": [
123
],
"progressionLevelIds": [
123
]
},
"content": {
"html": "<string>",
"blocks": {},
"summary": "<string>",
"keywords": [
"<string>"
]
},
"excerpt": "<string>",
"metaTitle": "<string>",
"metaDescription": "<string>",
"metaKeywords": "<string>",
"canonicalUrl": "<string>",
"template": "<string>",
"layout": "<string>",
"customFields": {},
"tags": [
"<string>"
],
"summary": "<string>",
"keywords": [
"<string>"
],
"images": [
"<string>"
],
"featured": true,
"faqs": [
{
"question": "<string>",
"answer": "<string>"
}
],
"authorId": 123,
"author": {
"id": 123,
"name": "<string>",
"email": "<string>",
"profileImage": "<string>"
},
"publishedAt": "2023-11-07T05:31:56Z",
"language": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}Authorizations
Body
application/json
Response
The updated content item
A content item (FAQ, post, document, block, or how-to guide) for the organization.
Was this page helpful?