Stage data for write jobs
curl --request POST \
--url https://api.hotglue.com/{env_id}/{flow}/{user_id}/connectors/api/uploads/url \
--header 'x-api-key: <api-key>'import requests
url = "https://api.hotglue.com/{env_id}/{flow}/{user_id}/connectors/api/uploads/url"
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.hotglue.com/{env_id}/{flow}/{user_id}/connectors/api/uploads/url', 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.hotglue.com/{env_id}/{flow}/{user_id}/connectors/api/uploads/url",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"x-api-key: <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"
"net/http"
"io"
)
func main() {
url := "https://api.hotglue.com/{env_id}/{flow}/{user_id}/connectors/api/uploads/url"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-api-key", "<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.hotglue.com/{env_id}/{flow}/{user_id}/connectors/api/uploads/url")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hotglue.com/{env_id}/{flow}/{user_id}/connectors/api/uploads/url")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"presigned_url": "https://s3.amazonaws.com/example-bucket/example-key?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=..."
}{
"Code": "BadRequestError",
"Message": "Connector api is not linked to flow customer-sync"
}Jobs
Stage data for write jobs
Generates a presigned URL for uploading a JSON file to a connector’s uploads directory. Upload the file to the returned URL, then trigger a write job to process it.
POST
/
{env_id}
/
{flow}
/
{user_id}
/
connectors
/
api
/
uploads
/
url
Stage data for write jobs
curl --request POST \
--url https://api.hotglue.com/{env_id}/{flow}/{user_id}/connectors/api/uploads/url \
--header 'x-api-key: <api-key>'import requests
url = "https://api.hotglue.com/{env_id}/{flow}/{user_id}/connectors/api/uploads/url"
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.hotglue.com/{env_id}/{flow}/{user_id}/connectors/api/uploads/url', 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.hotglue.com/{env_id}/{flow}/{user_id}/connectors/api/uploads/url",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"x-api-key: <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"
"net/http"
"io"
)
func main() {
url := "https://api.hotglue.com/{env_id}/{flow}/{user_id}/connectors/api/uploads/url"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-api-key", "<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.hotglue.com/{env_id}/{flow}/{user_id}/connectors/api/uploads/url")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hotglue.com/{env_id}/{flow}/{user_id}/connectors/api/uploads/url")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"presigned_url": "https://s3.amazonaws.com/example-bucket/example-key?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=..."
}{
"Code": "BadRequestError",
"Message": "Connector api is not linked to flow customer-sync"
}Instead of uploading your records in the POST job requests (which is subject to payload size limits), you can use this endpoint to stage records of arbitrary size.
After generating your presigned url, you can upload json records:
# Upload your data
curl --request PUT \
--url "$PRESIGNED_URL" \
--header 'Content-Type: application/json' \
--data '{
"Contacts": [
{
"email": "testemail@hg.io",
"id": "5634",
"name": "John Doe"
},
{
"email": "testemailtwo@hg.io",
"id": "6634",
"name": "Jane Doe"
}
]
}'
# Trigger a write job (no state body — the job reads the staged file)
curl --request POST \
--url 'https://api.hotglue.com/v2/{env_id}/{flow_id}/{tenant}/jobs' \
--header 'content-type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"connector_id": "hubspot",
"job_type": "write",
}'
⌘I