Make a share link
curl --request POST \
--url http://localhost:3000/api/v1/shares \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"collection": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"asset": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"password": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"emails": [
"[email protected]"
]
}
'import requests
url = "http://localhost:3000/api/v1/shares"
payload = {
"collection": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"asset": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"password": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"emails": ["[email protected]"]
}
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({
collection: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
asset: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
password: '<string>',
expiresAt: '2023-11-07T05:31:56Z',
emails: ['[email protected]']
})
};
fetch('http://localhost:3000/api/v1/shares', 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/shares",
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([
'collection' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'asset' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'name' => '<string>',
'password' => '<string>',
'expiresAt' => '2023-11-07T05:31:56Z',
'emails' => [
'[email protected]'
]
]),
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/shares"
payload := strings.NewReader("{\n \"collection\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"asset\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"password\": \"<string>\",\n \"expiresAt\": \"2023-11-07T05:31:56Z\",\n \"emails\": [\n \"[email protected]\"\n ]\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/shares")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"collection\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"asset\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"password\": \"<string>\",\n \"expiresAt\": \"2023-11-07T05:31:56Z\",\n \"emails\": [\n \"[email protected]\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/v1/shares")
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 \"collection\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"asset\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"password\": \"<string>\",\n \"expiresAt\": \"2023-11-07T05:31:56Z\",\n \"emails\": [\n \"[email protected]\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "view",
"name": "<string>",
"target": {
"type": "collection",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>"
},
"url": "<string>",
"password": true,
"expiresAt": "2023-11-07T05:31:56Z",
"expired": true,
"createdBy": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"emailed": 0
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"detail": "<unknown>"
}
}API Reference
Make a share link
For people without an account. view: a collection’s approved assets, or one asset, to see and download. upload: files sent in land proposed, in the collection (or the workspace), for review. Either can expire and ask for a password. Needs write on what it shares.
Scope: write.
POST
/
api
/
v1
/
shares
Make a share link
curl --request POST \
--url http://localhost:3000/api/v1/shares \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"collection": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"asset": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"password": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"emails": [
"[email protected]"
]
}
'import requests
url = "http://localhost:3000/api/v1/shares"
payload = {
"collection": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"asset": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"password": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"emails": ["[email protected]"]
}
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({
collection: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
asset: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
password: '<string>',
expiresAt: '2023-11-07T05:31:56Z',
emails: ['[email protected]']
})
};
fetch('http://localhost:3000/api/v1/shares', 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/shares",
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([
'collection' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'asset' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'name' => '<string>',
'password' => '<string>',
'expiresAt' => '2023-11-07T05:31:56Z',
'emails' => [
'[email protected]'
]
]),
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/shares"
payload := strings.NewReader("{\n \"collection\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"asset\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"password\": \"<string>\",\n \"expiresAt\": \"2023-11-07T05:31:56Z\",\n \"emails\": [\n \"[email protected]\"\n ]\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/shares")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"collection\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"asset\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"password\": \"<string>\",\n \"expiresAt\": \"2023-11-07T05:31:56Z\",\n \"emails\": [\n \"[email protected]\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/v1/shares")
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 \"collection\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"asset\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"password\": \"<string>\",\n \"expiresAt\": \"2023-11-07T05:31:56Z\",\n \"emails\": [\n \"[email protected]\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "view",
"name": "<string>",
"target": {
"type": "collection",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>"
},
"url": "<string>",
"password": true,
"expiresAt": "2023-11-07T05:31:56Z",
"expired": true,
"createdBy": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"emailed": 0
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"detail": "<unknown>"
}
}Authorizations
bearersession
An API key: ab_...
Body
application/json
view: see and download; upload: send files in, as proposals
Available options:
view, upload The collection it shows, or files uploads into
Pattern:
^([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)$For a view link: one asset instead of a collection
Pattern:
^([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)$What the holder sees it called, e.g. Press kit
Maximum string length:
120Required string length:
4 - 200It stops working 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)))$Email the link to these people, through the organization's email
Maximum array length:
20Maximum string length:
320Pattern:
^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$Response
The link, and how many of emails it was sent to
Show child attributes
Show child attributes