Create upload session
curl --request POST \
--url https://api.creditor.younegotiate.com/import-consumers/uploads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"client_upload_id": "2b0f5f25-2bf7-438c-9b09-98c2c6c77a7d",
"filename": "consumer-import.csv",
"content_type": "text/csv",
"size_bytes": 1048576
}
'import requests
url = "https://api.creditor.younegotiate.com/import-consumers/uploads"
payload = {
"client_upload_id": "2b0f5f25-2bf7-438c-9b09-98c2c6c77a7d",
"filename": "consumer-import.csv",
"content_type": "text/csv",
"size_bytes": 1048576
}
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({
client_upload_id: '2b0f5f25-2bf7-438c-9b09-98c2c6c77a7d',
filename: 'consumer-import.csv',
content_type: 'text/csv',
size_bytes: 1048576
})
};
fetch('https://api.creditor.younegotiate.com/import-consumers/uploads', 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.creditor.younegotiate.com/import-consumers/uploads",
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([
'client_upload_id' => '2b0f5f25-2bf7-438c-9b09-98c2c6c77a7d',
'filename' => 'consumer-import.csv',
'content_type' => 'text/csv',
'size_bytes' => 1048576
]),
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.creditor.younegotiate.com/import-consumers/uploads"
payload := strings.NewReader("{\n \"client_upload_id\": \"2b0f5f25-2bf7-438c-9b09-98c2c6c77a7d\",\n \"filename\": \"consumer-import.csv\",\n \"content_type\": \"text/csv\",\n \"size_bytes\": 1048576\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.creditor.younegotiate.com/import-consumers/uploads")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"client_upload_id\": \"2b0f5f25-2bf7-438c-9b09-98c2c6c77a7d\",\n \"filename\": \"consumer-import.csv\",\n \"content_type\": \"text/csv\",\n \"size_bytes\": 1048576\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.creditor.younegotiate.com/import-consumers/uploads")
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 \"client_upload_id\": \"2b0f5f25-2bf7-438c-9b09-98c2c6c77a7d\",\n \"filename\": \"consumer-import.csv\",\n \"content_type\": \"text/csv\",\n \"size_bytes\": 1048576\n}"
response = http.request(request)
puts response.read_body{
"message": "Import upload session created.",
"data": {
"id": 123,
"client_upload_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"disk": "s3",
"s3_key": "import_consumers/staged/1/2/2b0f5f25-2bf7-438c-9b09-98c2c6c77a7d/consumer-import.csv",
"expires_at": "2023-11-07T05:31:56Z",
"content_type": "<string>",
"size_bytes": 123,
"consumed_at": "2023-11-07T05:31:56Z"
},
"upload": {
"url": "<string>",
"headers": {},
"method": "PUT",
"expires_at": "2023-11-07T05:31:56Z"
},
"meta": {
"max_size_bytes": 123
}
}{
"message": "<string>"
}{
"message": "An active membership is required."
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Create upload session
Create or retry a short-lived private S3 upload target for a CSV file. The same creditor, company, and client_upload_id returns the same unconsumed session with a refreshed presigned PUT URL.
POST
/
import-consumers
/
uploads
Create upload session
curl --request POST \
--url https://api.creditor.younegotiate.com/import-consumers/uploads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"client_upload_id": "2b0f5f25-2bf7-438c-9b09-98c2c6c77a7d",
"filename": "consumer-import.csv",
"content_type": "text/csv",
"size_bytes": 1048576
}
'import requests
url = "https://api.creditor.younegotiate.com/import-consumers/uploads"
payload = {
"client_upload_id": "2b0f5f25-2bf7-438c-9b09-98c2c6c77a7d",
"filename": "consumer-import.csv",
"content_type": "text/csv",
"size_bytes": 1048576
}
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({
client_upload_id: '2b0f5f25-2bf7-438c-9b09-98c2c6c77a7d',
filename: 'consumer-import.csv',
content_type: 'text/csv',
size_bytes: 1048576
})
};
fetch('https://api.creditor.younegotiate.com/import-consumers/uploads', 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.creditor.younegotiate.com/import-consumers/uploads",
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([
'client_upload_id' => '2b0f5f25-2bf7-438c-9b09-98c2c6c77a7d',
'filename' => 'consumer-import.csv',
'content_type' => 'text/csv',
'size_bytes' => 1048576
]),
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.creditor.younegotiate.com/import-consumers/uploads"
payload := strings.NewReader("{\n \"client_upload_id\": \"2b0f5f25-2bf7-438c-9b09-98c2c6c77a7d\",\n \"filename\": \"consumer-import.csv\",\n \"content_type\": \"text/csv\",\n \"size_bytes\": 1048576\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.creditor.younegotiate.com/import-consumers/uploads")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"client_upload_id\": \"2b0f5f25-2bf7-438c-9b09-98c2c6c77a7d\",\n \"filename\": \"consumer-import.csv\",\n \"content_type\": \"text/csv\",\n \"size_bytes\": 1048576\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.creditor.younegotiate.com/import-consumers/uploads")
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 \"client_upload_id\": \"2b0f5f25-2bf7-438c-9b09-98c2c6c77a7d\",\n \"filename\": \"consumer-import.csv\",\n \"content_type\": \"text/csv\",\n \"size_bytes\": 1048576\n}"
response = http.request(request)
puts response.read_body{
"message": "Import upload session created.",
"data": {
"id": 123,
"client_upload_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"disk": "s3",
"s3_key": "import_consumers/staged/1/2/2b0f5f25-2bf7-438c-9b09-98c2c6c77a7d/consumer-import.csv",
"expires_at": "2023-11-07T05:31:56Z",
"content_type": "<string>",
"size_bytes": 123,
"consumed_at": "2023-11-07T05:31:56Z"
},
"upload": {
"url": "<string>",
"headers": {},
"method": "PUT",
"expires_at": "2023-11-07T05:31:56Z"
},
"meta": {
"max_size_bytes": 123
}
}{
"message": "<string>"
}{
"message": "An active membership is required."
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Last modified on July 20, 2026
Was this page helpful?
⌘I

