cURL
curl --request GET \
--url https://api.example.com/api/v2/documents/downloads/{token}import requests
url = "https://api.example.com/api/v2/documents/downloads/{token}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v2/documents/downloads/{token}', 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://api.example.com/api/v2/documents/downloads/{token}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v2/documents/downloads/{token}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v2/documents/downloads/{token}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v2/documents/downloads/{token}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"error": {
"code": "agent_not_available",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "agent_not_available",
"message": "<string>",
"request_id": "<string>"
}
}documents
Get apiv2documentsdownloads
GET /api/v2/documents/downloads/{token} — redeeming a §27 grant.
Unauthenticated for the same reason as the upload endpoint, and re-checked against the row for a reason the signature cannot cover: a valid grant for a document that has since been deleted, or whose isolation tuple changed, is a 404. A signature proves the link was issued. It does not prove the thing it points at still exists and is still the same caller’s.
No API key. Download-grant redemption. Same shape: a capability, not a credential — it authorises one document for one subject and expires.
GET
/
api
/
v2
/
documents
/
downloads
/
{token}
cURL
curl --request GET \
--url https://api.example.com/api/v2/documents/downloads/{token}import requests
url = "https://api.example.com/api/v2/documents/downloads/{token}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v2/documents/downloads/{token}', 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://api.example.com/api/v2/documents/downloads/{token}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v2/documents/downloads/{token}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v2/documents/downloads/{token}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v2/documents/downloads/{token}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"error": {
"code": "agent_not_available",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "agent_not_available",
"message": "<string>",
"request_id": "<string>"
}
}Path Parameters
Response
No response body

