Developers

External API integration for Base64 encode and decode

Home

Integration guide

Follow these steps to connect your application to the DocTools Base64 API.

  1. Create an API key

    Open and click “Generate New API Key” Copy and store the key securely; it is shown only once.

  2. Authenticate every request

    Send your key in the X-API-Key header on all /api/v1/* calls.

  3. Try with Postman

    Download or copy our Postman collection from the section. Import it into Postman, set the api_key collection variable to your key, and run the included requests.

  4. Encode files

    POST /encode with a multipart file upload or JSON content_base64. Files are encoded as-is — locked PDFs do not need a password. Or use POST /encode-url with a public PDF or Base64 file URL that the server can reach; pass password only when the source PDF is encrypted. The response includes inline base64, a document_id, and a base64_url for later retrieval.

  5. Decode Base64

    POST /decode with raw Base64 or a DocTools envelope to download the original file bytes — no storage required. Or use POST /decode-url with a public PDF or Base64 file URL that the server can reach and download directly; pass password only when the source PDF is encrypted.

  6. Fetch stored documents

    Use the document_id from encode to get metadata, download Base64 text, or fetch the decoded file. Send only your X-API-Key — stored downloads do not use a separate document password. Files are kept for 7 days.