Change a brand portal
curl --request PATCH \
--url http://localhost:3000/api/v1/portals/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"slug": "<string>",
"intro": "<string>",
"password": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"presets": [],
"theme": {
"logo": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"accent": "<string>",
"background": "<string>"
},
"collections": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"domain": "<string>"
}
'import requests
url = "http://localhost:3000/api/v1/portals/{id}"
payload = {
"name": "<string>",
"slug": "<string>",
"intro": "<string>",
"password": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"presets": [],
"theme": {
"logo": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"accent": "<string>",
"background": "<string>"
},
"collections": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"domain": "<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({
name: '<string>',
slug: '<string>',
intro: '<string>',
password: '<string>',
expiresAt: '2023-11-07T05:31:56Z',
presets: [],
theme: {
logo: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
accent: '<string>',
background: '<string>'
},
collections: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
domain: '<string>'
})
};
fetch('http://localhost:3000/api/v1/portals/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/api/v1/portals/{id}",
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' => '<string>',
'slug' => '<string>',
'intro' => '<string>',
'password' => '<string>',
'expiresAt' => '2023-11-07T05:31:56Z',
'presets' => [
],
'theme' => [
'logo' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'accent' => '<string>',
'background' => '<string>'
],
'collections' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'domain' => '<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 := "http://localhost:3000/api/v1/portals/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"intro\": \"<string>\",\n \"password\": \"<string>\",\n \"expiresAt\": \"2023-11-07T05:31:56Z\",\n \"presets\": [],\n \"theme\": {\n \"logo\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"accent\": \"<string>\",\n \"background\": \"<string>\"\n },\n \"collections\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"domain\": \"<string>\"\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("http://localhost:3000/api/v1/portals/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"intro\": \"<string>\",\n \"password\": \"<string>\",\n \"expiresAt\": \"2023-11-07T05:31:56Z\",\n \"presets\": [],\n \"theme\": {\n \"logo\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"accent\": \"<string>\",\n \"background\": \"<string>\"\n },\n \"collections\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"domain\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/v1/portals/{id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"intro\": \"<string>\",\n \"password\": \"<string>\",\n \"expiresAt\": \"2023-11-07T05:31:56Z\",\n \"presets\": [],\n \"theme\": {\n \"logo\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"accent\": \"<string>\",\n \"background\": \"<string>\"\n },\n \"collections\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"domain\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"name": "<string>",
"intro": "<string>",
"access": "public",
"password": true,
"expiresAt": "2023-11-07T05:31:56Z",
"expired": true,
"presets": [
"web"
],
"theme": {
"logo": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"accent": "<string>",
"background": "<string>"
},
"collections": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
],
"domain": {
"host": "<string>",
"verified": true,
"record": {
"type": "TXT",
"name": "<string>",
"value": "<string>"
}
},
"url": "<string>",
"pending": 0,
"createdBy": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"detail": "<unknown>"
}
}API Reference
Change a brand portal
Only what is given changes. A new domain needs proving again; null removes it. A left-out password stays.
Scope: write.
PATCH
/
api
/
v1
/
portals
/
{id}
Change a brand portal
curl --request PATCH \
--url http://localhost:3000/api/v1/portals/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"slug": "<string>",
"intro": "<string>",
"password": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"presets": [],
"theme": {
"logo": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"accent": "<string>",
"background": "<string>"
},
"collections": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"domain": "<string>"
}
'import requests
url = "http://localhost:3000/api/v1/portals/{id}"
payload = {
"name": "<string>",
"slug": "<string>",
"intro": "<string>",
"password": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"presets": [],
"theme": {
"logo": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"accent": "<string>",
"background": "<string>"
},
"collections": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"domain": "<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({
name: '<string>',
slug: '<string>',
intro: '<string>',
password: '<string>',
expiresAt: '2023-11-07T05:31:56Z',
presets: [],
theme: {
logo: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
accent: '<string>',
background: '<string>'
},
collections: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
domain: '<string>'
})
};
fetch('http://localhost:3000/api/v1/portals/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/api/v1/portals/{id}",
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' => '<string>',
'slug' => '<string>',
'intro' => '<string>',
'password' => '<string>',
'expiresAt' => '2023-11-07T05:31:56Z',
'presets' => [
],
'theme' => [
'logo' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'accent' => '<string>',
'background' => '<string>'
],
'collections' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'domain' => '<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 := "http://localhost:3000/api/v1/portals/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"intro\": \"<string>\",\n \"password\": \"<string>\",\n \"expiresAt\": \"2023-11-07T05:31:56Z\",\n \"presets\": [],\n \"theme\": {\n \"logo\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"accent\": \"<string>\",\n \"background\": \"<string>\"\n },\n \"collections\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"domain\": \"<string>\"\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("http://localhost:3000/api/v1/portals/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"intro\": \"<string>\",\n \"password\": \"<string>\",\n \"expiresAt\": \"2023-11-07T05:31:56Z\",\n \"presets\": [],\n \"theme\": {\n \"logo\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"accent\": \"<string>\",\n \"background\": \"<string>\"\n },\n \"collections\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"domain\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/v1/portals/{id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"intro\": \"<string>\",\n \"password\": \"<string>\",\n \"expiresAt\": \"2023-11-07T05:31:56Z\",\n \"presets\": [],\n \"theme\": {\n \"logo\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"accent\": \"<string>\",\n \"background\": \"<string>\"\n },\n \"collections\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"domain\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"name": "<string>",
"intro": "<string>",
"access": "public",
"password": true,
"expiresAt": "2023-11-07T05:31:56Z",
"expired": true,
"presets": [
"web"
],
"theme": {
"logo": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"accent": "<string>",
"background": "<string>"
},
"collections": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
],
"domain": {
"host": "<string>",
"verified": true,
"record": {
"type": "TXT",
"name": "<string>",
"value": "<string>"
}
},
"url": "<string>",
"pending": 0,
"createdBy": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"detail": "<unknown>"
}
}Authorizations
bearersession
An API key: ab_...
Path Parameters
Portal id
Body
application/json
What visitors see it called, e.g. Press kit
Required string length:
1 - 120Its address: /p/{slug}. Lowercase letters, digits and dashes
Pattern:
^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$A few paragraphs under the name
Maximum string length:
4000public: anyone; password: whoever has it; members: people with access to the workspace. Either of the last two takes access requests
Available options:
public, password, members For access: password. Left out on a change, it stays
Required string length:
4 - 200It closes then
Pattern:
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$What images download as; web, print and social when left out
Maximum array length:
6Available options:
web, social, story, print, png, original Show child attributes
Show child attributes
What it shows, in this order
Required array length:
1 - 50 elementsPattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$A host name of its own, e.g. press.example.com; served there once its TXT record is in place
Maximum string length:
253Response
The portal
Show child attributes
Show child attributes