Create a digital product
/digital_productsCosts 2 rate-limit points · Rate limits
Link assets to a Shopify product or variant, creating a digital product.
You must provide a shopify_product_id. To link to a specific variant
(rather than the product as a whole), also include shopify_variant_id.
Provide an array of asset_ids to attach assets to this digital product.
Shopify IDs are the numeric IDs (e.g. 8847261098265), not GID strings.
You can find these in your Shopify admin URL or via the Shopify API.
Headers
X-Auth-TokenstringRequiredAPI key for authentication
Request body
digital_productobjectRequiredShow 10 child attributesHide child attributes
shopify_product_idintegerRequiredThe numeric Shopify product ID.
shopify_variant_idinteger, nullableThe numeric Shopify variant ID. Omit to link at the product level.
asset_idsarray of stringsRequiredIDs of assets to attach to this digital product.
upsert_alwaysbooleanWhen
true, a new copy of this digital product's assets is created for each order, even if the customer has ordered before.Defaultfalsecustom_messagestringA custom message shown to customers on the download page.
preorder_enabledbooleanWhether this digital product is a preorder. Requires
preorder_launch_dateandcustom_message.Defaultfalsepreorder_launch_datestringWhen the preorder content becomes available. Must be at least 2 hours in the future. Required when
preorder_enabledistrue.preorder_subjectstringEmail subject for the preorder notification.
preorder_headingstringHeading shown on the download page while in preorder.
preorder_descriptionstringDescription shown on the download page while in preorder.
Returns
Errors
Validation failed
curl -X POST "https://app.filemonk.io/api/v1/external/digital_products" \
-H "X-Auth-Token: $FILEMONK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"digital_product": {
"shopify_product_id": 8847261098265,
"shopify_variant_id": 46012345678921,
"asset_ids": [
"3e84eb8d-e1d9-4e92-a4b2-a419c7f1122f"
],
"upsert_always": false,
"custom_message": "string",
"preorder_enabled": false,
"preorder_launch_date": "2026-01-15T09:30:00Z",
"preorder_subject": "string",
"preorder_heading": "string",
"preorder_description": "string"
}
}'const res = await fetch("https://app.filemonk.io/api/v1/external/digital_products", {
method: "POST",
headers: {
"X-Auth-Token": process.env.FILEMONK_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
"digital_product": {
"shopify_product_id": 8847261098265,
"shopify_variant_id": 46012345678921,
"asset_ids": [
"3e84eb8d-e1d9-4e92-a4b2-a419c7f1122f"
],
"upsert_always": false,
"custom_message": "string",
"preorder_enabled": false,
"preorder_launch_date": "2026-01-15T09:30:00Z",
"preorder_subject": "string",
"preorder_heading": "string",
"preorder_description": "string"
}
}),
});
const data = await res.json();import os
import requests
res = requests.post(
"https://app.filemonk.io/api/v1/external/digital_products",
headers={"X-Auth-Token": os.environ["FILEMONK_API_KEY"]},
json={
"digital_product": {
"shopify_product_id": 8847261098265,
"shopify_variant_id": 46012345678921,
"asset_ids": [
"3e84eb8d-e1d9-4e92-a4b2-a419c7f1122f"
],
"upsert_always": False,
"custom_message": "string",
"preorder_enabled": False,
"preorder_launch_date": "2026-01-15T09:30:00Z",
"preorder_subject": "string",
"preorder_heading": "string",
"preorder_description": "string"
}
},
)
data = res.json()require "net/http"
require "json"
uri = URI("https://app.filemonk.io/api/v1/external/digital_products")
req = Net::HTTP::Post.new(uri, "X-Auth-Token" => ENV["FILEMONK_API_KEY"], "Content-Type" => "application/json")
req.body = {
digital_product: {
shopify_product_id: 8847261098265,
shopify_variant_id: 46012345678921,
asset_ids: [
"3e84eb8d-e1d9-4e92-a4b2-a419c7f1122f"
],
upsert_always: false,
custom_message: "string",
preorder_enabled: false,
preorder_launch_date: "2026-01-15T09:30:00Z",
preorder_subject: "string",
preorder_heading: "string",
preorder_description: "string"
}
}.to_json
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body){
"digital_product": {
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"shopify_product_id": 8847261098265,
"shopify_variant_id": 46012345678921,
"assets": [
{
"id": "3e84eb8d-e1d9-4e92-a4b2-a419c7f1122f",
"type": "internal",
"name": "string",
"filename": "string",
"external_url": "https://example.com",
"content_type": "string",
"byte_size": 1,
"created_at": "2026-01-15T09:30:00Z"
}
],
"upsert_always": false,
"custom_message": "Thank you for your purchase!",
"preorder_enabled": false,
"preorder_launch_date": "2026-01-15T09:30:00Z",
"preorder_subject": "string",
"preorder_heading": "string",
"preorder_description": "string",
"created_at": "2026-01-15T09:30:00Z",
"updated_at": "2026-01-15T09:30:00Z"
}
}{
"error": "API key is required"
}