Products
Attach Delivery File
Attach the distributable file delivered after a purchase
PUT
/
api
/
v1
/
products
/
{productId}
/
delivery
Attach Delivery File
curl --request PUT \
--url https://api.sequenzy.com/api/v1/products/{productId}/delivery \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"source": "<string>",
"fileName": "<string>",
"fileSizeBytes": 123,
"mimeType": "<string>"
}
'import requests
url = "https://api.sequenzy.com/api/v1/products/{productId}/delivery"
payload = {
"url": "<string>",
"source": "<string>",
"fileName": "<string>",
"fileSizeBytes": 123,
"mimeType": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: '<string>',
source: '<string>',
fileName: '<string>',
fileSizeBytes: 123,
mimeType: '<string>'
})
};
fetch('https://api.sequenzy.com/api/v1/products/{productId}/delivery', 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.sequenzy.com/api/v1/products/{productId}/delivery",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>',
'source' => '<string>',
'fileName' => '<string>',
'fileSizeBytes' => 123,
'mimeType' => '<string>'
]),
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.sequenzy.com/api/v1/products/{productId}/delivery"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"source\": \"<string>\",\n \"fileName\": \"<string>\",\n \"fileSizeBytes\": 123,\n \"mimeType\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.sequenzy.com/api/v1/products/{productId}/delivery")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"source\": \"<string>\",\n \"fileName\": \"<string>\",\n \"fileSizeBytes\": 123,\n \"mimeType\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/products/{productId}/delivery")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"source\": \"<string>\",\n \"fileName\": \"<string>\",\n \"fileSizeBytes\": 123,\n \"mimeType\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"product": {
"id": "prod_internal_1",
"title": "The Indie Hacker Guide",
"digitalDelivery": {
"url": "https://example.com/guide.pdf",
"source": "url",
"fileName": "guide.pdf",
"fileSizeBytes": null,
"mimeType": null,
"updatedAt": "2026-06-11T00:00:00.000Z"
}
}
}
{
"success": false,
"error": "Delivery URL must start with http:// or https://"
}
{
"success": false,
"error": "Invalid or missing API key"
}
{
"success": false,
"error": "Product not found"
}
Attach the distributable file buyers receive after purchasing this product. Purchase events then expose it as
{{event.download.url}} and {{event.download.name}} in sequence emails.
Request
string
required
Product ID (from List Products). For products
pushed via the Commerce API, you can also use your own productId (e.g.
my-ebook).string
required
Public http(s) URL of the file. Use Create Upload
URL to host the file on Sequenzy, or link
to a file hosted elsewhere.
string
default:"url"
upload for files hosted on Sequenzy, url for external links.string
Display name for the file (e.g.
guide.pdf). Used as {{event.download.name}}.number
File size in bytes.
string
File MIME type.
curl -X PUT "https://api.sequenzy.com/api/v1/products/prod_internal_1/delivery" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/guide.pdf", "fileName": "guide.pdf"}'
Responses
{
"success": true,
"product": {
"id": "prod_internal_1",
"title": "The Indie Hacker Guide",
"digitalDelivery": {
"url": "https://example.com/guide.pdf",
"source": "url",
"fileName": "guide.pdf",
"fileSizeBytes": null,
"mimeType": null,
"updatedAt": "2026-06-11T00:00:00.000Z"
}
}
}
{
"success": false,
"error": "Delivery URL must start with http:// or https://"
}
{
"success": false,
"error": "Invalid or missing API key"
}
{
"success": false,
"error": "Product not found"
}
⌘I
Attach Delivery File
curl --request PUT \
--url https://api.sequenzy.com/api/v1/products/{productId}/delivery \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"source": "<string>",
"fileName": "<string>",
"fileSizeBytes": 123,
"mimeType": "<string>"
}
'import requests
url = "https://api.sequenzy.com/api/v1/products/{productId}/delivery"
payload = {
"url": "<string>",
"source": "<string>",
"fileName": "<string>",
"fileSizeBytes": 123,
"mimeType": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: '<string>',
source: '<string>',
fileName: '<string>',
fileSizeBytes: 123,
mimeType: '<string>'
})
};
fetch('https://api.sequenzy.com/api/v1/products/{productId}/delivery', 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.sequenzy.com/api/v1/products/{productId}/delivery",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>',
'source' => '<string>',
'fileName' => '<string>',
'fileSizeBytes' => 123,
'mimeType' => '<string>'
]),
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.sequenzy.com/api/v1/products/{productId}/delivery"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"source\": \"<string>\",\n \"fileName\": \"<string>\",\n \"fileSizeBytes\": 123,\n \"mimeType\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.sequenzy.com/api/v1/products/{productId}/delivery")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"source\": \"<string>\",\n \"fileName\": \"<string>\",\n \"fileSizeBytes\": 123,\n \"mimeType\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/products/{productId}/delivery")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"source\": \"<string>\",\n \"fileName\": \"<string>\",\n \"fileSizeBytes\": 123,\n \"mimeType\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"product": {
"id": "prod_internal_1",
"title": "The Indie Hacker Guide",
"digitalDelivery": {
"url": "https://example.com/guide.pdf",
"source": "url",
"fileName": "guide.pdf",
"fileSizeBytes": null,
"mimeType": null,
"updatedAt": "2026-06-11T00:00:00.000Z"
}
}
}
{
"success": false,
"error": "Delivery URL must start with http:// or https://"
}
{
"success": false,
"error": "Invalid or missing API key"
}
{
"success": false,
"error": "Product not found"
}