Skip to content

First Integration

In this tutorial, you’ll learn how to connect to the DocuStack API, upload a document, and retrieve extracted data — all from code. By the end, you’ll have a working integration that processes documents programmatically.

  • A DocuStack account with API access
  • An API key from your workspace settings
  • A sample PDF document to process

All API requests require a Bearer token. Use your API key in the Authorization header:

Terminal window
curl -X GET https://api.docustack.com/v1/workspaces \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"

Upload a document to your workspace for processing:

Terminal window
curl -X POST https://api.docustack.com/v1/documents \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@invoice.pdf" \
-F "workspace_id=ws_abc123"

Once processing completes, retrieve the extracted data:

Terminal window
curl -X GET https://api.docustack.com/v1/documents/doc_xyz789/results \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"

Now that you’ve completed your first API integration: