Upload a file to a project by ID and attachment_scope with optional sensitivity labels
curl --request POST \
--url https://api.zivio.net/api/v3/jobs/{id}/file_upload \
--header 'Content-Type: multipart/form-data' \
--header 'X-API-Key: <api-key>' \
--header 'zivio-tenant-id: <api-key>' \
--form file='@example-file' \
--form 'sensitivity_labels=<string>'import requests
url = "https://api.zivio.net/api/v3/jobs/{id}/file_upload"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = { "sensitivity_labels": "<string>" }
headers = {
"X-API-Key": "<api-key>",
"zivio-tenant-id": "<api-key>"
}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
form.append('sensitivity_labels', '<string>');
const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'zivio-tenant-id': '<api-key>'}
};
options.body = form;
fetch('https://api.zivio.net/api/v3/jobs/{id}/file_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://api.zivio.net/api/v3/jobs/{id}/file_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=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"sensitivity_labels\"\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data",
"X-API-Key: <api-key>",
"zivio-tenant-id: <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.zivio.net/api/v3/jobs/{id}/file_upload"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"sensitivity_labels\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("zivio-tenant-id", "<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.zivio.net/api/v3/jobs/{id}/file_upload")
.header("X-API-Key", "<api-key>")
.header("zivio-tenant-id", "<api-key>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"sensitivity_labels\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zivio.net/api/v3/jobs/{id}/file_upload")
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["zivio-tenant-id"] = '<api-key>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"sensitivity_labels\"\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"message": "File uploaded successfully to Project 123"
}Jobs
Upload a file to a project by ID and attachment_scope with optional sensitivity labels
POST
/
jobs
/
{id}
/
file_upload
Upload a file to a project by ID and attachment_scope with optional sensitivity labels
curl --request POST \
--url https://api.zivio.net/api/v3/jobs/{id}/file_upload \
--header 'Content-Type: multipart/form-data' \
--header 'X-API-Key: <api-key>' \
--header 'zivio-tenant-id: <api-key>' \
--form file='@example-file' \
--form 'sensitivity_labels=<string>'import requests
url = "https://api.zivio.net/api/v3/jobs/{id}/file_upload"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = { "sensitivity_labels": "<string>" }
headers = {
"X-API-Key": "<api-key>",
"zivio-tenant-id": "<api-key>"
}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
form.append('sensitivity_labels', '<string>');
const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'zivio-tenant-id': '<api-key>'}
};
options.body = form;
fetch('https://api.zivio.net/api/v3/jobs/{id}/file_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://api.zivio.net/api/v3/jobs/{id}/file_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=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"sensitivity_labels\"\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data",
"X-API-Key: <api-key>",
"zivio-tenant-id: <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.zivio.net/api/v3/jobs/{id}/file_upload"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"sensitivity_labels\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("zivio-tenant-id", "<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.zivio.net/api/v3/jobs/{id}/file_upload")
.header("X-API-Key", "<api-key>")
.header("zivio-tenant-id", "<api-key>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"sensitivity_labels\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zivio.net/api/v3/jobs/{id}/file_upload")
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["zivio-tenant-id"] = '<api-key>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"sensitivity_labels\"\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"message": "File uploaded successfully to Project 123"
}Path Parameters
ID of the Project
Body
multipart/form-data
Scope of the attachment - Shared file (job_posting) or internal file (internal)
Available options:
job_posting, internal Optional sensitivity labels for the file, pass name/s of existing or new labels split by comma e.g. 'label1,label2'
Response
ok
Example:
"File uploaded successfully to Project 123"
⌘I

