Update a collection
curl --request PATCH \
--url https://helpcenter.thena.ai/collections/{collectionId} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "Getting Started Guide",
"description": "Learn how to get started with our platform",
"icon": "book",
"isProtected": false,
"meta": {
"title": "SEO Title",
"description": "SEO Description",
"image": "https://example.com/image.jpg"
}
}
'import requests
url = "https://helpcenter.thena.ai/collections/{collectionId}"
payload = {
"name": "Getting Started Guide",
"description": "Learn how to get started with our platform",
"icon": "book",
"isProtected": False,
"meta": {
"title": "SEO Title",
"description": "SEO Description",
"image": "https://example.com/image.jpg"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Getting Started Guide',
description: 'Learn how to get started with our platform',
icon: 'book',
isProtected: false,
meta: {
title: 'SEO Title',
description: 'SEO Description',
image: 'https://example.com/image.jpg'
}
})
};
fetch('https://helpcenter.thena.ai/collections/{collectionId}', 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://helpcenter.thena.ai/collections/{collectionId}",
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([
'name' => 'Getting Started Guide',
'description' => 'Learn how to get started with our platform',
'icon' => 'book',
'isProtected' => false,
'meta' => [
'title' => 'SEO Title',
'description' => 'SEO Description',
'image' => 'https://example.com/image.jpg'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://helpcenter.thena.ai/collections/{collectionId}"
payload := strings.NewReader("{\n \"name\": \"Getting Started Guide\",\n \"description\": \"Learn how to get started with our platform\",\n \"icon\": \"book\",\n \"isProtected\": false,\n \"meta\": {\n \"title\": \"SEO Title\",\n \"description\": \"SEO Description\",\n \"image\": \"https://example.com/image.jpg\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://helpcenter.thena.ai/collections/{collectionId}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Getting Started Guide\",\n \"description\": \"Learn how to get started with our platform\",\n \"icon\": \"book\",\n \"isProtected\": false,\n \"meta\": {\n \"title\": \"SEO Title\",\n \"description\": \"SEO Description\",\n \"image\": \"https://example.com/image.jpg\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://helpcenter.thena.ai/collections/{collectionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Getting Started Guide\",\n \"description\": \"Learn how to get started with our platform\",\n \"icon\": \"book\",\n \"isProtected\": false,\n \"meta\": {\n \"title\": \"SEO Title\",\n \"description\": \"SEO Description\",\n \"image\": \"https://example.com/image.jpg\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"_id": "671b855619d8f51c01c0d28f",
"orgId": "667d37bb3a401eba4a609426",
"uid": 3115095248,
"helpCenterId": "671a2ddbccca6b1c3dc0d3b6",
"name": "General",
"slug": "3115095248-general",
"order": 0,
"createdBy": "66d9652332a786110182e40c",
"isProtected": false,
"createdAt": "2024-10-25T11:47:35.005Z",
"updatedAt": "2024-11-18T07:37:11.001Z",
"description": "Description of the collection",
"parentId": null,
"articles": [
"6735b68c2baad6fe6f6da745"
],
"icon": "AnnotationIcon",
"meta": {
"title": null,
"description": null,
"image": null
}
},
"message": "Collection updated successfully."
}Collections
Update a collection
PATCH
/
collections
/
{collectionId}
Update a collection
curl --request PATCH \
--url https://helpcenter.thena.ai/collections/{collectionId} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "Getting Started Guide",
"description": "Learn how to get started with our platform",
"icon": "book",
"isProtected": false,
"meta": {
"title": "SEO Title",
"description": "SEO Description",
"image": "https://example.com/image.jpg"
}
}
'import requests
url = "https://helpcenter.thena.ai/collections/{collectionId}"
payload = {
"name": "Getting Started Guide",
"description": "Learn how to get started with our platform",
"icon": "book",
"isProtected": False,
"meta": {
"title": "SEO Title",
"description": "SEO Description",
"image": "https://example.com/image.jpg"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Getting Started Guide',
description: 'Learn how to get started with our platform',
icon: 'book',
isProtected: false,
meta: {
title: 'SEO Title',
description: 'SEO Description',
image: 'https://example.com/image.jpg'
}
})
};
fetch('https://helpcenter.thena.ai/collections/{collectionId}', 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://helpcenter.thena.ai/collections/{collectionId}",
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([
'name' => 'Getting Started Guide',
'description' => 'Learn how to get started with our platform',
'icon' => 'book',
'isProtected' => false,
'meta' => [
'title' => 'SEO Title',
'description' => 'SEO Description',
'image' => 'https://example.com/image.jpg'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://helpcenter.thena.ai/collections/{collectionId}"
payload := strings.NewReader("{\n \"name\": \"Getting Started Guide\",\n \"description\": \"Learn how to get started with our platform\",\n \"icon\": \"book\",\n \"isProtected\": false,\n \"meta\": {\n \"title\": \"SEO Title\",\n \"description\": \"SEO Description\",\n \"image\": \"https://example.com/image.jpg\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://helpcenter.thena.ai/collections/{collectionId}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Getting Started Guide\",\n \"description\": \"Learn how to get started with our platform\",\n \"icon\": \"book\",\n \"isProtected\": false,\n \"meta\": {\n \"title\": \"SEO Title\",\n \"description\": \"SEO Description\",\n \"image\": \"https://example.com/image.jpg\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://helpcenter.thena.ai/collections/{collectionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Getting Started Guide\",\n \"description\": \"Learn how to get started with our platform\",\n \"icon\": \"book\",\n \"isProtected\": false,\n \"meta\": {\n \"title\": \"SEO Title\",\n \"description\": \"SEO Description\",\n \"image\": \"https://example.com/image.jpg\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"_id": "671b855619d8f51c01c0d28f",
"orgId": "667d37bb3a401eba4a609426",
"uid": 3115095248,
"helpCenterId": "671a2ddbccca6b1c3dc0d3b6",
"name": "General",
"slug": "3115095248-general",
"order": 0,
"createdBy": "66d9652332a786110182e40c",
"isProtected": false,
"createdAt": "2024-10-25T11:47:35.005Z",
"updatedAt": "2024-11-18T07:37:11.001Z",
"description": "Description of the collection",
"parentId": null,
"articles": [
"6735b68c2baad6fe6f6da745"
],
"icon": "AnnotationIcon",
"meta": {
"title": null,
"description": null,
"image": null
}
},
"message": "Collection updated successfully."
}Authorizations
Enter your API key
Path Parameters
Collection ID
Example:
"507f1f77bcf86cd799439011"
Body
application/json
Name of the collection
Minimum string length:
1Example:
"Getting Started Guide"
Description of the collection
Minimum string length:
1Example:
"Learn how to get started with our platform"
Icon identifier for the collection
Minimum string length:
1Example:
"book"
Whether the collection requires authentication to access
Example:
false
Meta information for SEO
Show child attributes
Show child attributes
Example:
{
"title": "SEO Title",
"description": "SEO Description",
"image": "https://example.com/image.jpg"
}⌘I