curl --request POST \
--url https://api.eu.linqalpha.com/v2/vault/presigned_url \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"file_name": "Q4_report.pdf",
"content_type": "application/pdf",
"workspace": "personal"
}
'import requests
url = "https://api.eu.linqalpha.com/v2/vault/presigned_url"
payload = {
"file_name": "Q4_report.pdf",
"content_type": "application/pdf",
"workspace": "personal"
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
file_name: 'Q4_report.pdf',
content_type: 'application/pdf',
workspace: 'personal'
})
};
fetch('https://api.eu.linqalpha.com/v2/vault/presigned_url', 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.eu.linqalpha.com/v2/vault/presigned_url",
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([
'file_name' => 'Q4_report.pdf',
'content_type' => 'application/pdf',
'workspace' => 'personal'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$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://api.eu.linqalpha.com/v2/vault/presigned_url"
payload := strings.NewReader("{\n \"file_name\": \"Q4_report.pdf\",\n \"content_type\": \"application/pdf\",\n \"workspace\": \"personal\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
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("https://api.eu.linqalpha.com/v2/vault/presigned_url")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"file_name\": \"Q4_report.pdf\",\n \"content_type\": \"application/pdf\",\n \"workspace\": \"personal\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eu.linqalpha.com/v2/vault/presigned_url")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"file_name\": \"Q4_report.pdf\",\n \"content_type\": \"application/pdf\",\n \"workspace\": \"personal\"\n}"
response = http.request(request)
puts response.read_body{
"presigned_url": "https://<presigned-upload-host>/.../<hash>.pdf?...",
"file_key": "development/data-original/<hash>.pdf",
"document_id": "3a5b47d5-124e-4052-9fa6-0647ddcb1d97",
"expiration_seconds": 600
}Vault — Get Upload URL
Step 1 of the Vault upload flow. Returns a single-use presigned upload (PUT) URL. Upload the file directly to that URL, then register it via POST /v2/vault/confirm.
curl --request POST \
--url https://api.eu.linqalpha.com/v2/vault/presigned_url \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"file_name": "Q4_report.pdf",
"content_type": "application/pdf",
"workspace": "personal"
}
'import requests
url = "https://api.eu.linqalpha.com/v2/vault/presigned_url"
payload = {
"file_name": "Q4_report.pdf",
"content_type": "application/pdf",
"workspace": "personal"
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
file_name: 'Q4_report.pdf',
content_type: 'application/pdf',
workspace: 'personal'
})
};
fetch('https://api.eu.linqalpha.com/v2/vault/presigned_url', 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.eu.linqalpha.com/v2/vault/presigned_url",
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([
'file_name' => 'Q4_report.pdf',
'content_type' => 'application/pdf',
'workspace' => 'personal'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$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://api.eu.linqalpha.com/v2/vault/presigned_url"
payload := strings.NewReader("{\n \"file_name\": \"Q4_report.pdf\",\n \"content_type\": \"application/pdf\",\n \"workspace\": \"personal\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
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("https://api.eu.linqalpha.com/v2/vault/presigned_url")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"file_name\": \"Q4_report.pdf\",\n \"content_type\": \"application/pdf\",\n \"workspace\": \"personal\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eu.linqalpha.com/v2/vault/presigned_url")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"file_name\": \"Q4_report.pdf\",\n \"content_type\": \"application/pdf\",\n \"workspace\": \"personal\"\n}"
response = http.request(request)
puts response.read_body{
"presigned_url": "https://<presigned-upload-host>/.../<hash>.pdf?...",
"file_key": "development/data-original/<hash>.pdf",
"document_id": "3a5b47d5-124e-4052-9fa6-0647ddcb1d97",
"expiration_seconds": 600
}Flow
POST /v2/vault/presigned_url→{ presigned_url, file_key, document_id }PUTthe file topresigned_urlwith a matchingContent-TypeheaderPOST /v2/vault/confirm→ registers the document and triggers processingGET /v2/vault/status→ poll untilstatusisSynced(for the slow tail)
curl --request POST \
--url 'https://api.eu.linqalpha.com/v2/vault/presigned_url' \
--header 'X-API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--data '{"file_name":"Q4_report.pdf","content_type":"application/pdf","workspace":"personal"}'
PUT request’s Content-Type must match the content_type you sent here.Authorizations
Body
Original file name (with extension).
"Q4_report.pdf"
MIME type of the file.
"application/pdf"
Vault scope the document is uploaded into. Must match between presigned_url and confirm. Note: the analytics SSE search must use the same workspace to retrieve the document.
personal, organization Organization ID (optional).
User id (optional).
User email (optional).
User name (optional).
Response
Presigned upload URL generated
Single-use presigned upload (PUT) URL. Upload the file body via PUT with header Content-Type matching the request content_type.
Server-generated file key. Pass back to POST /v2/vault/confirm.
Document id for this upload. Pass back to confirm.
600