Onboarding
Getting Started
The public DocuShell API is a queued job system: submit work, keep the returned job_id, poll status, then stream the finished file or artifact.
Base URL
https://api.docushell.com/api
Append /v1/... paths to call public API routes.
Auth
Bearer API key
Send Authorization: Bearer YOUR_API_KEY on submit, status, and download routes.
Job flow
submit, poll, download
Most routes return 202 with a job_id; completed files are streamed through the gateway.
Section
Quickstart Checklist
Start with Markdown to PDF: a small JSON request that still exercises the full queued job lifecycle.
- Create an API key in the dashboard Developer tab. The raw key is shown once.
- Send bearer auth with
Authorization: Bearer YOUR_API_KEYon every public API route. - Add
Idempotency-Keyon submit requests when callers may retry after a timeout. - Store
job_idandrequest_idfrom the queued response. Userequest_idwhen debugging with support. - Poll before download. The download link is valid after the job reaches
done.
Section
First Request
Submit a tiny Markdown document and save the returned job_id.
First request
bash
curl -X POST "https://api.docushell.com/api/v1/markdown-to-pdf" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: quickstart-001" \
-d '{
"markdown": "# DocuShell\n\nRendered through the public API.",
"file_name": "quickstart.md",
"page_size": "A4"
}'Section
Queued Job Lifecycle
A successful submit returns 202 immediately. The worker finishes the file asynchronously.
Queued response
json
{
"job_id": "job_01JX8Y5YJ2M2D8N1AQ5F7Q3KVT",
"status": "queued",
"cost": 5,
"service": "markdown-to-pdf",
"request_id": "req_01JX8Y62XCDNZ2BM7TBM2M9Q8E",
"links": {
"status": "/v1/jobs/job_01JX8Y5YJ2M2D8N1AQ5F7Q3KVT",
"download": "/v1/jobs/job_01JX8Y5YJ2M2D8N1AQ5F7Q3KVT/download"
}
}Poll status
bash
curl "https://api.docushell.com/api/v1/jobs/job_01JX8Y5YJ2M2D8N1AQ5F7Q3KVT" \
-H "Authorization: Bearer YOUR_API_KEY"Done response
json
{
"job_id": "job_01JX8Y5YJ2M2D8N1AQ5F7Q3KVT",
"status": "done",
"service": "markdown-to-pdf",
"request_id": "req_01JX8Y62XCDNZ2BM7TBM2M9Q8E",
"result": {
"filename": "quickstart.pdf",
"sizeBytes": 184322,
"download": "/v1/jobs/job_01JX8Y5YJ2M2D8N1AQ5F7Q3KVT/download"
},
"links": {
"status": "/v1/jobs/job_01JX8Y5YJ2M2D8N1AQ5F7Q3KVT",
"download": "/v1/jobs/job_01JX8Y5YJ2M2D8N1AQ5F7Q3KVT/download"
}
}Download result
bash
curl "https://api.docushell.com/api/v1/jobs/job_01JX8Y5YJ2M2D8N1AQ5F7Q3KVT/download" \
-H "Authorization: Bearer YOUR_API_KEY" \
--output quickstart.pdfSection
Request Basics
These fields apply across the public API unless an endpoint page says otherwise.
| Item | Required | Notes |
|---|---|---|
Authorization | Yes | Bearer API key. Send on submit, status, and download requests. |
Idempotency-Key | Recommended | Use a fresh value for each logical submit. Reuse it only for the exact same retry. |
| Content-Type | Depends | application/json for JSON routes; multipart/form-data for file uploads. |
| job_id | Response | Store it after submit and poll GET /v1/jobs/:jobId. |
| request_id | Response | Trace id returned in JSON and x-request-id; include it in support reports. |
| Field casing | Response | Public API JSON deliberately uses snake_case for stable wire compatibility. SDKs may map fields to language-native casing. |
Section
Next Steps
Move from the generic job flow to the endpoint you plan to ship.