Get file download URL
curl --request GET \
--url https://app.teamai.com/api/v1/projects/{projectId}/files/{fileId}/download \
--header 'x-teamai-api-key: <api-key>'import requests
url = "https://app.teamai.com/api/v1/projects/{projectId}/files/{fileId}/download"
headers = {"x-teamai-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-teamai-api-key': '<api-key>'}};
fetch('https://app.teamai.com/api/v1/projects/{projectId}/files/{fileId}/download', 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://app.teamai.com/api/v1/projects/{projectId}/files/{fileId}/download",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-teamai-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"
"net/http"
"io"
)
func main() {
url := "https://app.teamai.com/api/v1/projects/{projectId}/files/{fileId}/download"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-teamai-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.teamai.com/api/v1/projects/{projectId}/files/{fileId}/download")
.header("x-teamai-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.teamai.com/api/v1/projects/{projectId}/files/{fileId}/download")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-teamai-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"downloadUrl": "<string>",
"filename": "<string>",
"contentType": "<string>",
"sizeBytes": 123
}
}{
"code": "bad_request",
"message": "<string>",
"details": {}
}{
"code": "bad_request",
"message": "<string>",
"details": {}
}Projects
Get file download URL
Returns a signed download URL valid for 4 hours, plus file metadata. The response contains the URL — fetch it separately to retrieve the file bytes.
GET
/
projects
/
{projectId}
/
files
/
{fileId}
/
download
Get file download URL
curl --request GET \
--url https://app.teamai.com/api/v1/projects/{projectId}/files/{fileId}/download \
--header 'x-teamai-api-key: <api-key>'import requests
url = "https://app.teamai.com/api/v1/projects/{projectId}/files/{fileId}/download"
headers = {"x-teamai-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-teamai-api-key': '<api-key>'}};
fetch('https://app.teamai.com/api/v1/projects/{projectId}/files/{fileId}/download', 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://app.teamai.com/api/v1/projects/{projectId}/files/{fileId}/download",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-teamai-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"
"net/http"
"io"
)
func main() {
url := "https://app.teamai.com/api/v1/projects/{projectId}/files/{fileId}/download"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-teamai-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.teamai.com/api/v1/projects/{projectId}/files/{fileId}/download")
.header("x-teamai-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.teamai.com/api/v1/projects/{projectId}/files/{fileId}/download")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-teamai-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"downloadUrl": "<string>",
"filename": "<string>",
"contentType": "<string>",
"sizeBytes": 123
}
}{
"code": "bad_request",
"message": "<string>",
"details": {}
}{
"code": "bad_request",
"message": "<string>",
"details": {}
}Authorizations
Secret API key created in Workspace Settings → API Keys (workspace keys) or Organization Admin → API Keys (organization keys).
Response
Signed download URL and metadata.
Show child attributes
Show child attributes
Was this page helpful?
⌘I