Extended Setup Actions
Upload NDA file
Upload an NDA file for participants to sign before accessing the study. Accepts PDF files via multipart/form-data.
PUT
/
v1
/
projects
/
{projectId}
/
files
/
form-data
Upload NDA file
curl --request PUT \
--url https://api-staging.respondent.io/v1/projects/{projectId}/files/form-data \
--header 'Content-Length: <content-length>' \
--header 'Content-Type: multipart/form-data' \
--header 'x-api-key: <x-api-key>' \
--header 'x-api-secret: <x-api-secret>' \
--form uploadFile='@example-file'import requests
url = "https://api-staging.respondent.io/v1/projects/{projectId}/files/form-data"
files = { "uploadFile": ("example-file", open("example-file", "rb")) }
headers = {
"x-api-key": "<x-api-key>",
"x-api-secret": "<x-api-secret>",
"Content-Length": "<content-length>"
}
response = requests.put(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('uploadFile', '<string>');
const options = {
method: 'PUT',
headers: {
'x-api-key': '<x-api-key>',
'x-api-secret': '<x-api-secret>',
'Content-Length': '<content-length>'
}
};
options.body = form;
fetch('https://api-staging.respondent.io/v1/projects/{projectId}/files/form-data', 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-staging.respondent.io/v1/projects/{projectId}/files/form-data",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"uploadFile\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Length: <content-length>",
"Content-Type: multipart/form-data",
"x-api-key: <x-api-key>",
"x-api-secret: <x-api-secret>"
],
]);
$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-staging.respondent.io/v1/projects/{projectId}/files/form-data"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"uploadFile\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("x-api-secret", "<x-api-secret>")
req.Header.Add("Content-Length", "<content-length>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api-staging.respondent.io/v1/projects/{projectId}/files/form-data")
.header("x-api-key", "<x-api-key>")
.header("x-api-secret", "<x-api-secret>")
.header("Content-Length", "<content-length>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"uploadFile\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.respondent.io/v1/projects/{projectId}/files/form-data")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<x-api-key>'
request["x-api-secret"] = '<x-api-secret>'
request["Content-Length"] = '<content-length>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"uploadFile\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{}Headers
Path Parameters
Query Parameters
Available options:
nda, picture, attachment Body
multipart/form-data
Response
200 - application/json
The response is of type object.
Last modified on March 18, 2026
Was this page helpful?
Previous
Copy a projectDuplicate an existing project as a new draft, including its screener questions and targeting configuration. Useful for running follow-up studies with similar criteria.
Next
⌘I
Upload NDA file
curl --request PUT \
--url https://api-staging.respondent.io/v1/projects/{projectId}/files/form-data \
--header 'Content-Length: <content-length>' \
--header 'Content-Type: multipart/form-data' \
--header 'x-api-key: <x-api-key>' \
--header 'x-api-secret: <x-api-secret>' \
--form uploadFile='@example-file'import requests
url = "https://api-staging.respondent.io/v1/projects/{projectId}/files/form-data"
files = { "uploadFile": ("example-file", open("example-file", "rb")) }
headers = {
"x-api-key": "<x-api-key>",
"x-api-secret": "<x-api-secret>",
"Content-Length": "<content-length>"
}
response = requests.put(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('uploadFile', '<string>');
const options = {
method: 'PUT',
headers: {
'x-api-key': '<x-api-key>',
'x-api-secret': '<x-api-secret>',
'Content-Length': '<content-length>'
}
};
options.body = form;
fetch('https://api-staging.respondent.io/v1/projects/{projectId}/files/form-data', 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-staging.respondent.io/v1/projects/{projectId}/files/form-data",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"uploadFile\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Length: <content-length>",
"Content-Type: multipart/form-data",
"x-api-key: <x-api-key>",
"x-api-secret: <x-api-secret>"
],
]);
$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-staging.respondent.io/v1/projects/{projectId}/files/form-data"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"uploadFile\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("x-api-secret", "<x-api-secret>")
req.Header.Add("Content-Length", "<content-length>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api-staging.respondent.io/v1/projects/{projectId}/files/form-data")
.header("x-api-key", "<x-api-key>")
.header("x-api-secret", "<x-api-secret>")
.header("Content-Length", "<content-length>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"uploadFile\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.respondent.io/v1/projects/{projectId}/files/form-data")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<x-api-key>'
request["x-api-secret"] = '<x-api-secret>'
request["Content-Length"] = '<content-length>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"uploadFile\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{}