Upload File to Folder
curl --request POST \
--url https://be.datagol.ai/noCo/api/v2/workspaces/{workspaceId}/folder/upload \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form files=@example-file \
--form parentId=7b0b1bda-9836-420e-9a0b-6bf3b6bb6e5aimport requests
url = "https://be.datagol.ai/noCo/api/v2/workspaces/{workspaceId}/folder/upload"
files = { "files": ("example-file", open("example-file", "rb")) }
payload = { "parentId": "7b0b1bda-9836-420e-9a0b-6bf3b6bb6e5a" }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('files', '<string>');
form.append('parentId', '7b0b1bda-9836-420e-9a0b-6bf3b6bb6e5a');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://be.datagol.ai/noCo/api/v2/workspaces/{workspaceId}/folder/upload', 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://be.datagol.ai/noCo/api/v2/workspaces/{workspaceId}/folder/upload",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"parentId\"\r\n\r\n7b0b1bda-9836-420e-9a0b-6bf3b6bb6e5a\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$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://be.datagol.ai/noCo/api/v2/workspaces/{workspaceId}/folder/upload"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"parentId\"\r\n\r\n7b0b1bda-9836-420e-9a0b-6bf3b6bb6e5a\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://be.datagol.ai/noCo/api/v2/workspaces/{workspaceId}/folder/upload")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"parentId\"\r\n\r\n7b0b1bda-9836-420e-9a0b-6bf3b6bb6e5a\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://be.datagol.ai/noCo/api/v2/workspaces/{workspaceId}/folder/upload")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"parentId\"\r\n\r\n7b0b1bda-9836-420e-9a0b-6bf3b6bb6e5a\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body[
{
"id": "dcc00239-8190-4f7e-a2fc-a87448cd121d",
"name": "order_history.csv",
"parentId": "7b0b1bda-9836-420e-9a0b-6bf3b6bb6e5a",
"type": "csv",
"byteSize": 4879,
"isFolder": false,
"workspaceId": "a00140c3-a621-4bd4-a300-00b9ddb1ed26",
"companyId": 1,
"children": [],
"uiMetadata": {}
}
]Enterprise Search
Upload File to Folder
1️⃣ Overview
Purpose:
Uploads one or more files into a specific folder within a workspace.
Supports any file type. The target folder is specified via parentId.
2️⃣ Endpoint
POST /noCo/api/v2/workspaces/{workspaceId}/folder/upload
3️⃣ Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| workspaceId | string | ✅ Yes | The ID of the workspace to upload the file into |
4️⃣ Authentication
Requires authentication using:
Authorization: Bearer <token>
5️⃣ Request Headers
| Header | Required |
|---|---|
| Authorization | ✅ Yes |
6️⃣ Request Body (multipart/form-data)
| Field | Type | Required | Description |
|---|---|---|---|
| files | file | ✅ Yes | The file(s) to upload |
| parentId | string | ❌ No | ID of the target folder. If omitted, the file is uploaded to the workspace root |
7️⃣ Example Request
curl --location 'https://be.datagol.ai/noCo/api/v2/workspaces/{workspaceId}/folder/upload' \
--header 'Authorization: Bearer <token>' \
--form 'files=@"/path/to/file"' \
--form 'parentId="{folderId}"'
8️⃣ Behavior Summary
Uploads one or more files into the specified folder within a workspace.
Returns an array of uploaded file objects, each containing the file id, name, type, size, and location metadata.
If parentId is omitted, the file is placed at the workspace root level.
POST
/
noCo
/
api
/
v2
/
workspaces
/
{workspaceId}
/
folder
/
upload
Upload File to Folder
curl --request POST \
--url https://be.datagol.ai/noCo/api/v2/workspaces/{workspaceId}/folder/upload \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form files=@example-file \
--form parentId=7b0b1bda-9836-420e-9a0b-6bf3b6bb6e5aimport requests
url = "https://be.datagol.ai/noCo/api/v2/workspaces/{workspaceId}/folder/upload"
files = { "files": ("example-file", open("example-file", "rb")) }
payload = { "parentId": "7b0b1bda-9836-420e-9a0b-6bf3b6bb6e5a" }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('files', '<string>');
form.append('parentId', '7b0b1bda-9836-420e-9a0b-6bf3b6bb6e5a');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://be.datagol.ai/noCo/api/v2/workspaces/{workspaceId}/folder/upload', 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://be.datagol.ai/noCo/api/v2/workspaces/{workspaceId}/folder/upload",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"parentId\"\r\n\r\n7b0b1bda-9836-420e-9a0b-6bf3b6bb6e5a\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$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://be.datagol.ai/noCo/api/v2/workspaces/{workspaceId}/folder/upload"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"parentId\"\r\n\r\n7b0b1bda-9836-420e-9a0b-6bf3b6bb6e5a\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://be.datagol.ai/noCo/api/v2/workspaces/{workspaceId}/folder/upload")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"parentId\"\r\n\r\n7b0b1bda-9836-420e-9a0b-6bf3b6bb6e5a\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://be.datagol.ai/noCo/api/v2/workspaces/{workspaceId}/folder/upload")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"parentId\"\r\n\r\n7b0b1bda-9836-420e-9a0b-6bf3b6bb6e5a\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body[
{
"id": "dcc00239-8190-4f7e-a2fc-a87448cd121d",
"name": "order_history.csv",
"parentId": "7b0b1bda-9836-420e-9a0b-6bf3b6bb6e5a",
"type": "csv",
"byteSize": 4879,
"isFolder": false,
"workspaceId": "a00140c3-a621-4bd4-a300-00b9ddb1ed26",
"companyId": 1,
"children": [],
"uiMetadata": {}
}
]Authorizations
Body
multipart/form-data
Response
200 - application/json
Upload File to Folder