Publish a file to make it publicly accessible.
curl --request POST \
--url https://api.parallellabs.app/api/v0/projects/{project_id}/files/{file_id}/publish \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.parallellabs.app/api/v0/projects/{project_id}/files/{file_id}/publish"
headers = {"X-API-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.parallellabs.app/api/v0/projects/{project_id}/files/{file_id}/publish', 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.parallellabs.app/api/v0/projects/{project_id}/files/{file_id}/publish",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.parallellabs.app/api/v0/projects/{project_id}/files/{file_id}/publish"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-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.post("https://api.parallellabs.app/api/v0/projects/{project_id}/files/{file_id}/publish")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.parallellabs.app/api/v0/projects/{project_id}/files/{file_id}/publish")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"path": "<string>",
"type": "<string>",
"mimeType": "<string>",
"content": "<string>",
"isDirectory": true,
"size": 123,
"isPublished": true,
"publicSlug": "<string>",
"publicUrl": "<string>",
"created": 123,
"updated": 123
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Projects
Publish a file to make it publicly accessible.
Returns the file with publicSlug and publicUrl for sharing.
POST
/
api
/
v0
/
projects
/
{project_id}
/
files
/
{file_id}
/
publish
Publish a file to make it publicly accessible.
curl --request POST \
--url https://api.parallellabs.app/api/v0/projects/{project_id}/files/{file_id}/publish \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.parallellabs.app/api/v0/projects/{project_id}/files/{file_id}/publish"
headers = {"X-API-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.parallellabs.app/api/v0/projects/{project_id}/files/{file_id}/publish', 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.parallellabs.app/api/v0/projects/{project_id}/files/{file_id}/publish",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.parallellabs.app/api/v0/projects/{project_id}/files/{file_id}/publish"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-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.post("https://api.parallellabs.app/api/v0/projects/{project_id}/files/{file_id}/publish")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.parallellabs.app/api/v0/projects/{project_id}/files/{file_id}/publish")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"path": "<string>",
"type": "<string>",
"mimeType": "<string>",
"content": "<string>",
"isDirectory": true,
"size": 123,
"isPublished": true,
"publicSlug": "<string>",
"publicUrl": "<string>",
"created": 123,
"updated": 123
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
CompanyApiKeyBearerAuth & CompanyId
Company API key - scoped to a specific company. Generate from the Integrations page in your dashboard.
Query Parameters
Company ID
Response
Published file with public URL
Project file object
File ID
File name
File path
File type/extension
MIME type
File content (if requested)
Whether this is a directory
File size in bytes
Whether file is publicly published
Public URL slug (if published)
Full public URL (if published)
Creation timestamp
Last update timestamp

