Workspace API

Downloads content

Downloads content endpoints of the Zanfia Workspace API, with schemas and code samples.

3 min readLast updated Jul 26, 2026

Content of Downloads products, addressed by the product id: the Markdown description and the downloadable file list. Upload the bytes first via POST /media, then attach the URL as a file. All routes require a Authorization: Bearer header — see Authentication.

Downloads content

GET/products/{productId}/downloads

Authorization

bearerAuth
AuthorizationBearer <token>

API key from Dashboard → Integrations → API, MCP and CLI.

In: header

Path Parameters

productId*string

Product id

Response Body

application/json

application/json

curl -X GET "https://example.com/products/string/downloads"
{  "editorContent": "string",  "files": [    {      "url": "string",      "name": "string",      "uid": "string",      "mediaId": "string",      "size": 0    }  ]}
{  "error": "string"}

Update downloads description

PATCH/products/{productId}/downloads

Authorization

bearerAuth
AuthorizationBearer <token>

API key from Dashboard → Integrations → API, MCP and CLI.

In: header

Path Parameters

productId*string

Product id

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X PATCH "https://example.com/products/string/downloads" \  -H "Content-Type: application/json" \  -d '{    "editorContent": "string"  }'
{  "updated": true}
{  "error": "string"}

Add download files

POST/products/{productId}/downloads/files

Authorization

bearerAuth
AuthorizationBearer <token>

API key from Dashboard → Integrations → API, MCP and CLI.

In: header

Path Parameters

productId*string

Product id

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/products/string/downloads/files" \  -H "Content-Type: application/json" \  -d '{    "files": [      {        "url": "string",        "name": "string"      }    ]  }'
{  "added": [    {      "url": "string",      "name": "string",      "uid": "string",      "mediaId": "string",      "size": 0    }  ],  "files": [    {      "url": "string",      "name": "string",      "uid": "string",      "mediaId": "string",      "size": 0    }  ]}
{  "error": "string"}

Remove a download file

DELETE/products/{productId}/downloads/files/{uid}

Authorization

bearerAuth
AuthorizationBearer <token>

API key from Dashboard → Integrations → API, MCP and CLI.

In: header

Path Parameters

productId*string

Product id

uid*string

Download file uid

Response Body

application/json

application/json

curl -X DELETE "https://example.com/products/string/downloads/files/string"
{  "removed": {    "url": "string",    "name": "string",    "uid": "string",    "mediaId": "string",    "size": 0  },  "files": [    {      "url": "string",      "name": "string",      "uid": "string",      "mediaId": "string",      "size": 0    }  ]}
{  "error": "string"}

Reorder download files

POST/products/{productId}/downloads/files/reorder

Authorization

bearerAuth
AuthorizationBearer <token>

API key from Dashboard → Integrations → API, MCP and CLI.

In: header

Path Parameters

productId*string

Product id

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Complete new order — must be a permutation of the current file uids.

Response Body

application/json

application/json

curl -X POST "https://example.com/products/string/downloads/files/reorder" \  -H "Content-Type: application/json" \  -d '{    "uids": [      "string"    ]  }'
{  "files": [    {      "url": "string",      "name": "string",      "uid": "string",      "mediaId": "string",      "size": 0    }  ]}
{  "error": "string"}

Was this article helpful?

Related articles

Spotted something off? Tell us at support@zanfia.com.