Quickstart

Quickstart guide for using the API

Scan Documents API is organized around REST and some ASYNC API principles. The API has predictable resource-oriented URLs, accepts JSON-encoded request bodies (except for file uploads), returns JSON-encoded responses, and uses standard HTTP response codes and methods.

Now let’s see how to get start with Scan Documents API.

The first step is creating an account.

Create an account

Scan your images and create readable PDFs with them

As soon as you sign up for the Scan Documents Dashboard, you will be able to generate an API Key. Under the free plan, you will be able to execute up to 25 free requests. Then, you will need to upgrade your account to a paid plan to continue using the API.

Using Your API Key

To authenticate your requests to the Scan Documents API, you need to include your API key in the x-api-key header of your request. Here is an example of how to do this using curl:

curl -X GET https://api.scan-documents.com/v1/files \
-H "x-api-key: YOUR_API_KEY"
-H "Content-Type: application/json"

Request that are not authenticated with a correct API key will receive a 401 Unauthorized response.

For example, let’s create an image!

Upload a File

Upload and store files securely in the cloud

Uploading a File

All the files in Scan Documents API, must be created. To create a file you can upload one from your computer or server using the creation endpoint.

Let’s upload the following image to the API:

File To Upload

First, copy your api key on the dashboard and replace it on the x-api-key field, and replace the file field with the path to the image you want to use as a watermark.

curl -X POST "https://api.scan-documents.com/v1/files" \
  -H "x-api-key: api-key" \
  -F name="File Name" \
  -F file="path-to-file"

This will return a file object of type image/jpeg.

{
  "id": "file_dug40glt2pezznum",
  "name": "File Name",
  "type": "image/jpeg",
  "properties": {
    "size": 271272,
    "width": 1835,
    "height": 2297
  },
  "task_id": null,
  "created_at": "2025-05-09T13:27:54.000Z"
}

Let's break down the response:

id
string

A unique identifier for the file (e.g., file_euyrvozb9302uwhq). You'll use this ID to refer to the file in other API operations.

name
string

The name you gave the file when you uploaded it (e.g., Example image).

type
string

The MIME type of the file (e.g., image/png, application/pdf). This tells you what kind of file it is.

properties
object

An object containing additional properties specific to the file type. This will include details like size, dimensions, or page count.

task_id
string

If this file was generated as the result of an API operation (like converting an image), this field will contain the ID of that task. Otherwise, it will be null.

created_at
string

The date and time when the file was uploaded or created, in ISO format (e.g., 2021-05-01T12:00:00Z).

Downloading the File

Do you want to check how it was uploaded? Just download the image using the download endpoint putting the ID of the file to download!

Download a File

Download a file from the API

Copy the file ID from the previous response and replace it along with the API key in the following command:

curl -X GET "https://api.scan-documents.com/v1/files/file_dug40glt2pezznum/download" \
  -H "x-api-key: api-key" \
  -o "File Name.jpeg"

This will download the file to your computer with the name File Name.jpeg.

The Next Steps

Here is everything you need to start. The next step is learning about the operations you can perform on the file you just uploaded.

Here are some of the things you can do: