Export a document
Downloads the .dstack binary package for a document. Response is a ZIP archive with Content-Type application/vnd.digitalstack.dstack+zip.
GET
/api/v1/documents/:id/exportAuthorization
exports:readapi key scoperequiredRequired scope when calling with an API key.
document:exportsession capabilityoptionalRequired capability when calling with a signed-in session.
Path parameters
idstringrequiredDocument ID
Example: doc_abc123
Query parameters
formatstringoptionalExport format
Example: dstack
Request
curl -X GET "https://www.digitalstack360.com/api/v1/documents/doc_abc123/export" \
-H "Authorization: Bearer $DS_API_KEY"Examples use a placeholder key from your environment. Store your key in $DS_API_KEY — never commit it.
Response
200 OK
{
"note": "Binary response — not JSON. Use -o flag with curl."
}Errors
401
missing_authNo credentials provided
401
invalid_api_keyAPI key is invalid or revoked
403
scope_insufficientKey lacks exports:read scope
404
not_foundDocument not found