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/export

Authorization

exports:readapi key scoperequired
Required scope when calling with an API key.
document:exportsession capabilityoptional
Required capability when calling with a signed-in session.

Path parameters

idstringrequired
Document ID

Example: doc_abc123

Query parameters

formatstringoptional
Export 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_auth

No credentials provided

401
invalid_api_key

API key is invalid or revoked

403
scope_insufficient

Key lacks exports:read scope

404
not_found

Document not found