Create a new collection
curl --request POST \
--url https://helpcenter.thena.ai/collections \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"helpCenterId": "507f1f77bcf86cd799439011",
"name": "Getting Started Guide",
"description": "Learn how to get started with our platform",
"icon": "book",
"isProtected": false,
"parentId": "507f1f77bcf86cd799439013"
}
'import requests
url = "https://helpcenter.thena.ai/collections"
payload = {
"helpCenterId": "507f1f77bcf86cd799439011",
"name": "Getting Started Guide",
"description": "Learn how to get started with our platform",
"icon": "book",
"isProtected": False,
"parentId": "507f1f77bcf86cd799439013"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
helpCenterId: '507f1f77bcf86cd799439011',
name: 'Getting Started Guide',
description: 'Learn how to get started with our platform',
icon: 'book',
isProtected: false,
parentId: '507f1f77bcf86cd799439013'
})
};
fetch('https://helpcenter.thena.ai/collections', 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",
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([
'helpCenterId' => '507f1f77bcf86cd799439011',
'name' => 'Getting Started Guide',
'description' => 'Learn how to get started with our platform',
'icon' => 'book',
'isProtected' => false,
'parentId' => '507f1f77bcf86cd799439013'
]),
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"
payload := strings.NewReader("{\n \"helpCenterId\": \"507f1f77bcf86cd799439011\",\n \"name\": \"Getting Started Guide\",\n \"description\": \"Learn how to get started with our platform\",\n \"icon\": \"book\",\n \"isProtected\": false,\n \"parentId\": \"507f1f77bcf86cd799439013\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://helpcenter.thena.ai/collections")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"helpCenterId\": \"507f1f77bcf86cd799439011\",\n \"name\": \"Getting Started Guide\",\n \"description\": \"Learn how to get started with our platform\",\n \"icon\": \"book\",\n \"isProtected\": false,\n \"parentId\": \"507f1f77bcf86cd799439013\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://helpcenter.thena.ai/collections")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"helpCenterId\": \"507f1f77bcf86cd799439011\",\n \"name\": \"Getting Started Guide\",\n \"description\": \"Learn how to get started with our platform\",\n \"icon\": \"book\",\n \"isProtected\": false,\n \"parentId\": \"507f1f77bcf86cd799439013\"\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 created successfully."
}Collections
Create a new collection
POST
/
collections
Create a new collection
curl --request POST \
--url https://helpcenter.thena.ai/collections \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"helpCenterId": "507f1f77bcf86cd799439011",
"name": "Getting Started Guide",
"description": "Learn how to get started with our platform",
"icon": "book",
"isProtected": false,
"parentId": "507f1f77bcf86cd799439013"
}
'import requests
url = "https://helpcenter.thena.ai/collections"
payload = {
"helpCenterId": "507f1f77bcf86cd799439011",
"name": "Getting Started Guide",
"description": "Learn how to get started with our platform",
"icon": "book",
"isProtected": False,
"parentId": "507f1f77bcf86cd799439013"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
helpCenterId: '507f1f77bcf86cd799439011',
name: 'Getting Started Guide',
description: 'Learn how to get started with our platform',
icon: 'book',
isProtected: false,
parentId: '507f1f77bcf86cd799439013'
})
};
fetch('https://helpcenter.thena.ai/collections', 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",
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([
'helpCenterId' => '507f1f77bcf86cd799439011',
'name' => 'Getting Started Guide',
'description' => 'Learn how to get started with our platform',
'icon' => 'book',
'isProtected' => false,
'parentId' => '507f1f77bcf86cd799439013'
]),
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"
payload := strings.NewReader("{\n \"helpCenterId\": \"507f1f77bcf86cd799439011\",\n \"name\": \"Getting Started Guide\",\n \"description\": \"Learn how to get started with our platform\",\n \"icon\": \"book\",\n \"isProtected\": false,\n \"parentId\": \"507f1f77bcf86cd799439013\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://helpcenter.thena.ai/collections")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"helpCenterId\": \"507f1f77bcf86cd799439011\",\n \"name\": \"Getting Started Guide\",\n \"description\": \"Learn how to get started with our platform\",\n \"icon\": \"book\",\n \"isProtected\": false,\n \"parentId\": \"507f1f77bcf86cd799439013\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://helpcenter.thena.ai/collections")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"helpCenterId\": \"507f1f77bcf86cd799439011\",\n \"name\": \"Getting Started Guide\",\n \"description\": \"Learn how to get started with our platform\",\n \"icon\": \"book\",\n \"isProtected\": false,\n \"parentId\": \"507f1f77bcf86cd799439013\"\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 created successfully."
}Authorizations
Enter your API key
Body
application/json
Help Center ID
Example:
"507f1f77bcf86cd799439011"
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
Parent collection ID
Example:
"507f1f77bcf86cd799439013"
Get all collections of an organization
Previous
Get collection tree with articles of a help center
Next
⌘I