Introduction
Introduction to our API.
Doczilla offers three endpoint types: direct
, sync
and async
.
-
direct
: your document is generated and returned directly in the response to your request, providing simplicity and efficiency. For requests with responses exceeding 32 MiB, refer to the Content type section. -
sync
: your document is created and directly returns a URL instead of the raw document. Optionally, write the document directly into your bucket by using the storage option, bypassing the need for our temporary storage. -
async
: you provide a webhook where the result is sent to after the document is created.
Endpoints
Endpoint | Type | Body | |
---|---|---|---|
POST | /v1/pdf | direct | page, pdf |
POST | /v1/pdf/sync | sync | page, pdf, storage |
POST | /v1/pdf/async | async | page, pdf, storage, webhook |
POST | /v1/screenshot | direct | page, screenshot |
POST | /v1/screenshot/sync | sync | page, screenshot, storage |
POST | /v1/screenshot/async | async | page, screenshot, storage, webhook |
POST | /v1/template/:id | direct | page, pdf, screenshot, storage, webhook |
POST | /v1/template/:id/sync | sync | page, pdf, screenshot, storage, webhook |
POST | /v1/template/:id/async | async | page, pdf, screenshot, storage, webhook |
Content type
By default, when doing a direct
request Doczilla will return with the Content-Type
header associated with the endpoint, this will be:
/v1/pdf
->application/pdf
/v1/screenshot
withscreenshot.type
set topng
->image/png
(default)/v1/screenshot
withscreenshot.type
set tojpeg
->image/jpeg
/v1/screenshot
withscreenshot.type
set towebp
->image/webp
If the size of the final document or screenshot exceeds 32 MiB, the Transfer-Encoding
header will be set
to chunked
, and the Content-Type
header will be changed to application/octet-stream
.
Was this page helpful?