Update Collection
curl --request PATCH \
--url https://getunblocked.com/api/v1/collections/{collectionId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Apollo",
"description": "Documents from the Apollo customer support tool including support responses.",
"iconUrl": "https://my.company.com/apollo/logo.svg"
}
'import requests
url = "https://getunblocked.com/api/v1/collections/{collectionId}"
payload = {
"name": "Apollo",
"description": "Documents from the Apollo customer support tool including support responses.",
"iconUrl": "https://my.company.com/apollo/logo.svg"
}
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({
name: 'Apollo',
description: 'Documents from the Apollo customer support tool including support responses.',
iconUrl: 'https://my.company.com/apollo/logo.svg'
})
};
fetch('https://getunblocked.com/api/v1/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://getunblocked.com/api/v1/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' => 'Apollo',
'description' => 'Documents from the Apollo customer support tool including support responses.',
'iconUrl' => 'https://my.company.com/apollo/logo.svg'
]),
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://getunblocked.com/api/v1/collections/{collectionId}"
payload := strings.NewReader("{\n \"name\": \"Apollo\",\n \"description\": \"Documents from the Apollo customer support tool including support responses.\",\n \"iconUrl\": \"https://my.company.com/apollo/logo.svg\"\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://getunblocked.com/api/v1/collections/{collectionId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Apollo\",\n \"description\": \"Documents from the Apollo customer support tool including support responses.\",\n \"iconUrl\": \"https://my.company.com/apollo/logo.svg\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://getunblocked.com/api/v1/collections/{collectionId}")
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 \"name\": \"Apollo\",\n \"description\": \"Documents from the Apollo customer support tool including support responses.\",\n \"iconUrl\": \"https://my.company.com/apollo/logo.svg\"\n}"
response = http.request(request)
puts response.read_body{
"status": 400
}{
"status": 400
}{
"status": 400
}{
"status": 400
}Collections
Update Collection
Update a collection.
PATCH
/
collections
/
{collectionId}
Update Collection
curl --request PATCH \
--url https://getunblocked.com/api/v1/collections/{collectionId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Apollo",
"description": "Documents from the Apollo customer support tool including support responses.",
"iconUrl": "https://my.company.com/apollo/logo.svg"
}
'import requests
url = "https://getunblocked.com/api/v1/collections/{collectionId}"
payload = {
"name": "Apollo",
"description": "Documents from the Apollo customer support tool including support responses.",
"iconUrl": "https://my.company.com/apollo/logo.svg"
}
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({
name: 'Apollo',
description: 'Documents from the Apollo customer support tool including support responses.',
iconUrl: 'https://my.company.com/apollo/logo.svg'
})
};
fetch('https://getunblocked.com/api/v1/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://getunblocked.com/api/v1/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' => 'Apollo',
'description' => 'Documents from the Apollo customer support tool including support responses.',
'iconUrl' => 'https://my.company.com/apollo/logo.svg'
]),
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://getunblocked.com/api/v1/collections/{collectionId}"
payload := strings.NewReader("{\n \"name\": \"Apollo\",\n \"description\": \"Documents from the Apollo customer support tool including support responses.\",\n \"iconUrl\": \"https://my.company.com/apollo/logo.svg\"\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://getunblocked.com/api/v1/collections/{collectionId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Apollo\",\n \"description\": \"Documents from the Apollo customer support tool including support responses.\",\n \"iconUrl\": \"https://my.company.com/apollo/logo.svg\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://getunblocked.com/api/v1/collections/{collectionId}")
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 \"name\": \"Apollo\",\n \"description\": \"Documents from the Apollo customer support tool including support responses.\",\n \"iconUrl\": \"https://my.company.com/apollo/logo.svg\"\n}"
response = http.request(request)
puts response.read_body{
"status": 400
}{
"status": 400
}{
"status": 400
}{
"status": 400
}Authorizations
The API key to authenticate requests. Obtainable from the web dashboard.
Path Parameters
The ID of the collection.
Body
application/json
A brief identifier for the collection.
Example:
"Apollo"
A sentence defining the document type within this collection, aiding the language model in grasping the content's essence.
Field Constraint:
- Collection description: 1-4096 characters
Example:
"Documents from the Apollo customer support tool including support responses."
A URL of a square image used to visually represent document references from the collection in the Unblocked UI. Preferred image formats are SVG, PNG, and JPG.
Example:
"https://my.company.com/apollo/logo.svg"
Response
OK
⌘I