Introduction
Programmatically manage digital products, assets, and orders for your Shopify store through the Filemonk API.
Last updated
The Filemonk API lets you manage your digital products and assets programmatically. Create and organize assets, link them to Shopify products as digital products, and query orders and download data — all through a simple REST API. Use it to automate your catalog, build custom integrations, sync data with external systems, or power your own workflows.
What you can do
Section titled “What you can do”Base URL
Section titled “Base URL”All API requests are made to:
https://app.filemonk.io/api/v1/externalQuick start
Section titled “Quick start”-
Get your API key
Open the Filemonk app in your Shopify admin and navigate to Settings > Other > API. Copy the API key displayed there.
-
Create an asset
Assets are the files or licence keys that customers receive when they purchase a product. Start by creating one:Terminal window curl -X POST 'https://app.filemonk.io/api/v1/external/assets' \-H 'X-Auth-Token: YOUR_API_KEY' \-H 'Content-Type: application/json' \-d '{"asset": {"type": "external","external_url": "https://cdn.example.com/files/ebook-v2.pdf","name": "Premium eBook"}}'const response = await fetch('https://app.filemonk.io/api/v1/external/assets', {method: 'POST',headers: {'X-Auth-Token': 'YOUR_API_KEY','Content-Type': 'application/json'},body: JSON.stringify({asset: {type: 'external',external_url: 'https://cdn.example.com/files/ebook-v2.pdf',name: 'Premium eBook'}})});const data = await response.json();import requestsresponse = requests.post('https://app.filemonk.io/api/v1/external/assets',headers={'X-Auth-Token': 'YOUR_API_KEY'},json={'asset': {'type': 'external','external_url': 'https://cdn.example.com/files/ebook-v2.pdf','name': 'Premium eBook'}})data = response.json()The response includes the asset's `id` — save this for the next step:```json{"asset": {"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890","type": "external","name": "Premium eBook","filename": "ebook-v2.pdf","external_url": "https://cdn.example.com/files/ebook-v2.pdf",...}}``` -
Create a digital product
Link the asset to a Shopify product so customers receive it on purchase:Terminal window curl -X POST 'https://app.filemonk.io/api/v1/external/digital_products' \-H 'X-Auth-Token: YOUR_API_KEY' \-H 'Content-Type: application/json' \-d '{"digital_product": {"shopify_product_id": 8847261098265,"asset_ids": ["a1b2c3d4-e5f6-7890-abcd-ef1234567890"],"custom_message": "Thanks for your purchase!"}}'const response = await fetch('https://app.filemonk.io/api/v1/external/digital_products', {method: 'POST',headers: {'X-Auth-Token': 'YOUR_API_KEY','Content-Type': 'application/json'},body: JSON.stringify({digital_product: {shopify_product_id: 8847261098265,asset_ids: ['a1b2c3d4-e5f6-7890-abcd-ef1234567890'],custom_message: 'Thanks for your purchase!'}})});const data = await response.json();import requestsresponse = requests.post('https://app.filemonk.io/api/v1/external/digital_products',headers={'X-Auth-Token': 'YOUR_API_KEY'},json={'digital_product': {'shopify_product_id': 8847261098265,'asset_ids': ['a1b2c3d4-e5f6-7890-abcd-ef1234567890'],'custom_message': 'Thanks for your purchase!'}})data = response.json()That's it — the Shopify product is now a digital product. When a customer purchases it, Filemonk will deliver the linked asset automatically. -
Verify with a list request
Confirm everything is set up by listing your digital products:Terminal window curl -X GET 'https://app.filemonk.io/api/v1/external/digital_products' \-H 'X-Auth-Token: YOUR_API_KEY'const response = await fetch('https://app.filemonk.io/api/v1/external/digital_products', {headers: { 'X-Auth-Token': 'YOUR_API_KEY' }});const data = await response.json();import requestsresponse = requests.get('https://app.filemonk.io/api/v1/external/digital_products',headers={'X-Auth-Token': 'YOUR_API_KEY'})data = response.json()
Typical workflow
Section titled “Typical workflow”The API is designed around two core resources: assets and digital products.
- Create assets — Upload files directly, register external URLs, or generate licence keys via
POST /assets. See Upload Asset for the direct-upload flow. - Create digital products — Link assets to Shopify products via
POST /digital_products, providing theasset_idsfrom step 1 and theshopify_product_idyou want to attach them to. - Manage and iterate — Update assets or digital products as needed. You can add or remove assets from a digital product, change preorder settings, or swap out files.
- Query orders — Use
GET /ordersandGET /orders/{id}/downloadsto monitor purchases and download activity.
Key concepts
Section titled “Key concepts”Assets vs digital products
Section titled “Assets vs digital products”An asset is a deliverable file or licence key — the thing customers actually receive. A digital product is the link between one or more assets and a Shopify product (or variant). You create assets first, then bundle them into digital products.
Pre-computed download status
Section titled “Pre-computed download status”The downloads endpoint returns a flat array of files with all business logic already resolved. Each download object includes boolean flags like download_expired, download_limit_reached, access_revoked, and a master downloadable flag. You do not need to implement any expiration or limit checking on your side.
Pagination
Section titled “Pagination”All list endpoints return paginated results. Use the page and per_page query parameters to navigate through results. The response includes a pagination object with total_count and total_pages for building pagination controls.
Rate limiting
Section titled “Rate limiting”The API uses a token-bucket rate limiter. Every response includes X-RateLimit-* headers so you can track your usage. See Rate Limiting for details.
Thanks for letting us know.
Still stuck? Ask Quinn or chat with support