Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Create a new file.
cURL
curl --request POST \ --url https://api.useinvent.com/orgs/files \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "file": "<string>", "file_url": "https://example.com/files/document.pdf", "allowed_types": [ "*/*" ], "visibility": "PRIVATE" } '
import requests url = "https://api.useinvent.com/orgs/files" payload = { "file": "<string>", "file_url": "https://example.com/files/document.pdf", "allowed_types": ["*/*"], "visibility": "PRIVATE" } headers = { "Authorization": "Bearer <token>", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text)
const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: JSON.stringify({ file: '<string>', file_url: 'https://example.com/files/document.pdf', allowed_types: ['*/*'], visibility: 'PRIVATE' }) }; fetch('https://api.useinvent.com/orgs/files', 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.useinvent.com/orgs/files", 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' => '<string>', 'file_url' => 'https://example.com/files/document.pdf', 'allowed_types' => [ '*/*' ], 'visibility' => 'PRIVATE' ]), CURLOPT_HTTPHEADER => [ "Authorization: Bearer <token>", "Content-Type: application/json" ], ]); $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.useinvent.com/orgs/files" payload := strings.NewReader("{\n \"file\": \"<string>\",\n \"file_url\": \"https://example.com/files/document.pdf\",\n \"allowed_types\": [\n \"*/*\"\n ],\n \"visibility\": \"PRIVATE\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer <token>") 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.useinvent.com/orgs/files") .header("Authorization", "Bearer <token>") .header("Content-Type", "application/json") .body("{\n \"file\": \"<string>\",\n \"file_url\": \"https://example.com/files/document.pdf\",\n \"allowed_types\": [\n \"*/*\"\n ],\n \"visibility\": \"PRIVATE\"\n}") .asString();
require 'uri' require 'net/http' url = URI("https://api.useinvent.com/orgs/files") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer <token>' request["Content-Type"] = 'application/json' request.body = "{\n \"file\": \"<string>\",\n \"file_url\": \"https://example.com/files/document.pdf\",\n \"allowed_types\": [\n \"*/*\"\n ],\n \"visibility\": \"PRIVATE\"\n}" response = http.request(request) puts response.read_body
{ "id": "<string>", "file_path": "<string>", "file_filename": "document.pdf", "file_size": 1024, "file_mimetype": "application/pdf", "file_url": "<string>", "created_at": "2023-11-07T05:31:56Z" }
Bearer token authentication using your API key
CreateOrgFileSchema
File to be uploaded. It can be a file object, a base64 encoded string, or a file data object containing base64 data, name, and type.
URL of the file to be uploaded
"https://example.com/files/document.pdf"
The allowed mime types for the file field (e.g. image/*, application/pdf)
255
Whether the file is private or public, private files URLs are signed with a token and can be accessed temporarily
PUBLIC
PRIVATE
"PRIVATE"
Detailed information about a file
Unique identifier for the file
Path to the file in the storage system
2048
Name of the file
"document.pdf"
Size of the file in bytes
1024
MIME type of the file
"application/pdf"
URL to access the file
Timestamp when the file was created
Was this page helpful?