curl --request POST \
--url http://localhost:3000/api/v1/portals \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"slug": "<string>",
"collections": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"intro": "<string>",
"access": "public",
"password": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"presets": [],
"theme": {
"logo": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"accent": "<string>",
"background": "<string>"
},
"domain": "<string>"
}
'import requests
url = "http://localhost:3000/api/v1/portals"
payload = {
"name": "<string>",
"slug": "<string>",
"collections": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"intro": "<string>",
"access": "public",
"password": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"presets": [],
"theme": {
"logo": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"accent": "<string>",
"background": "<string>"
},
"domain": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
slug: '<string>',
collections: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
intro: '<string>',
access: 'public',
password: '<string>',
expiresAt: '2023-11-07T05:31:56Z',
presets: [],
theme: {
logo: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
accent: '<string>',
background: '<string>'
},
domain: '<string>'
})
};
fetch('http://localhost:3000/api/v1/portals', 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",
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([
'name' => '<string>',
'slug' => '<string>',
'collections' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'intro' => '<string>',
'access' => 'public',
'password' => '<string>',
'expiresAt' => '2023-11-07T05:31:56Z',
'presets' => [
],
'theme' => [
'logo' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'accent' => '<string>',
'background' => '<string>'
],
'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"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"collections\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"intro\": \"<string>\",\n \"access\": \"public\",\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 \"domain\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("http://localhost:3000/api/v1/portals")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"collections\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"intro\": \"<string>\",\n \"access\": \"public\",\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 \"domain\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/v1/portals")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"collections\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"intro\": \"<string>\",\n \"access\": \"public\",\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 \"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>"
}
}Make a brand portal
A curated, themed front door onto chosen collections, for press, partners or retailers, at /p/ or a domain of its own. It shows only approved, unexpired, current assets, and offers images as renditions made for a purpose (presets) rather than raw originals. access: public, password, or members (people with access to the workspace); the last two take access requests. Needs sharing rights on each collection. A domain is served once its TXT record is in place: POST /api/v1/portals//domain.
Scope: write.
curl --request POST \
--url http://localhost:3000/api/v1/portals \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"slug": "<string>",
"collections": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"intro": "<string>",
"access": "public",
"password": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"presets": [],
"theme": {
"logo": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"accent": "<string>",
"background": "<string>"
},
"domain": "<string>"
}
'import requests
url = "http://localhost:3000/api/v1/portals"
payload = {
"name": "<string>",
"slug": "<string>",
"collections": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"intro": "<string>",
"access": "public",
"password": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"presets": [],
"theme": {
"logo": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"accent": "<string>",
"background": "<string>"
},
"domain": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
slug: '<string>',
collections: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
intro: '<string>',
access: 'public',
password: '<string>',
expiresAt: '2023-11-07T05:31:56Z',
presets: [],
theme: {
logo: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
accent: '<string>',
background: '<string>'
},
domain: '<string>'
})
};
fetch('http://localhost:3000/api/v1/portals', 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",
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([
'name' => '<string>',
'slug' => '<string>',
'collections' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'intro' => '<string>',
'access' => 'public',
'password' => '<string>',
'expiresAt' => '2023-11-07T05:31:56Z',
'presets' => [
],
'theme' => [
'logo' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'accent' => '<string>',
'background' => '<string>'
],
'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"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"collections\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"intro\": \"<string>\",\n \"access\": \"public\",\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 \"domain\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("http://localhost:3000/api/v1/portals")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"collections\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"intro\": \"<string>\",\n \"access\": \"public\",\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 \"domain\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/v1/portals")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"collections\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"intro\": \"<string>\",\n \"access\": \"public\",\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 \"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
An API key: ab_...
Body
What visitors see it called, e.g. Press kit
1 - 120Its address: /p/{slug}. Lowercase letters, digits and dashes
^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$What it shows, in this order
1 - 50 elements^([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 few paragraphs under the name
4000public: anyone; password: whoever has it; members: people with access to the workspace. Either of the last two takes access requests
public, password, members For access: password. Left out on a change, it stays
4 - 200It closes then
^(?:(?:\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
6web, social, story, print, png, original Show child attributes
Show child attributes
A host name of its own, e.g. press.example.com; served there once its TXT record is in place
253Response
The portal
Show child attributes
Show child attributes