---
updatedAt: 2026-10-14T10:49:42.000Z
agentTools:
  projectIndex: https://support.docsumo.com/llms.txt
---

# Upload from URL or Base64

Upload a document from a public URL or by providing its Base64 encoded content.

**Supported File Extensions:** `jpg`, `jpeg`, `png`, `tiff`, `pdf`

**Supported Document Types:**\
You can retrieve the list of supported document types from the [User enabled doc\_types](https://support.docsumo.com/v1.4/reference/user-enabled-doc_types) endpoint.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Docsumo API",
    "description": "The official API for interacting with the Docsumo platform.\n\nAll documents uploaded via the API are automatically added to your account in the [Docsumo web app](https://app.docsumo.com).\n\n##### Supported File Types\n- .jpg\n- .jpeg\n- .png\n- .tiff\n- .pdf\n\n##### Get Your API Key\nTo authenticate your requests, you'll need an API key. You can obtain your key from the [Docsumo settings page](https://app.docsumo.com/settings/webhook-api/).\n\n[![apikey](https://files.readme.io/8387a9576ff61643731e36e5cbd6ada5412b803b8809c62e4fc5637972d5c3c1-image.png)](https://app.docsumo.com/settings/webhook-api/)",
    "version": "0.1"
  },
  "servers": [
    {
      "url": "https://app.docsumo.com"
    }
  ],
  "paths": {
    "/api/v1/eevee/apikey/upload/custom/": {
      "post": {
        "tags": [
          "Documents"
        ],
        "summary": "Upload from URL or Base64",
        "description": "Upload a document from a public URL or by providing its Base64 encoded content.",
        "parameters": [
          {
            "name": "apikey",
            "in": "header",
            "description": "Your personal API key for authentication. You can find it on your [Docsumo settings page](https://app.docsumo.com/settings/webhook-api/).",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "{{apikey}}"
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/upload_custom_body"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "Date": {
                "schema": {
                  "type": "string",
                  "example": "Tue, 25 Feb 2020 12:10:04 GMT"
                }
              },
              "Content-Type": {
                "schema": {
                  "type": "string",
                  "example": "application/json"
                }
              },
              "Transfer-Encoding": {
                "schema": {
                  "type": "string",
                  "example": "chunked"
                }
              },
              "Connection": {
                "schema": {
                  "type": "string",
                  "example": "keep-alive"
                }
              },
              "Set-Cookie": {
                "schema": {
                  "type": "string",
                  "example": "__cfduid=d275266661767c23a58160a032ff7b0191582632603; expires=Thu, 26-Mar-20 12:10:03 GMT; path=/; domain=.docsumo.com; HttpOnly; SameSite=Lax; Secure"
                }
              },
              "Vary": {
                "schema": {
                  "type": "string",
                  "example": "Accept-Encoding"
                }
              },
              "Strict-Transport-Security": {
                "schema": {
                  "type": "string",
                  "example": "max-age=15724800; includeSubDomains"
                }
              },
              "Content-Encoding": {
                "schema": {
                  "type": "string",
                  "example": "gzip"
                }
              },
              "CF-Cache-Status": {
                "schema": {
                  "type": "string",
                  "example": "DYNAMIC"
                }
              },
              "Expect-CT": {
                "schema": {
                  "type": "string",
                  "example": "max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\""
                }
              },
              "Server": {
                "schema": {
                  "type": "string",
                  "example": "cloudflare"
                }
              },
              "CF-RAY": {
                "schema": {
                  "type": "string",
                  "example": "56a992ecb912a761-KTM"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/inline_response_200_1"
                },
                "example": {
                  "data": {
                    "document": [
                      {
                        "created_at": "Mon, 15 Jun 2020 17:06:12 GMT",
                        "doc_id": "5fc057651e0b46cab722d56c720e940a",
                        "doc_meta_data": "{'company':'XYZ', 'location':'ABC', 'any_other_metadata': '...' }",
                        "email": "bikram.dahal+jun13@docsumo.com",
                        "review_url": "http://eevee:5000/review-document/5fc057651e0b46cab722d56c720e940a",
                        "status": "new",
                        "title": "example.jpg",
                        "type": "invoice",
                        "user_doc_id": "123456",
                        "user_id": "5ee5014898f87977a1175644"
                      }
                    ]
                  },
                  "error": "",
                  "error_code": "",
                  "message": "",
                  "status": "success",
                  "status_code": 200
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "Date": {
                "schema": {
                  "type": "string",
                  "example": "Sat, 13 Jun 2020 20:23:17 GMT"
                }
              },
              "Content-Type": {
                "schema": {
                  "type": "string",
                  "example": "application/json"
                }
              },
              "Transfer-Encoding": {
                "schema": {
                  "type": "string",
                  "example": "chunked"
                }
              },
              "Connection": {
                "schema": {
                  "type": "string",
                  "example": "keep-alive"
                }
              },
              "Strict-Transport-Security": {
                "schema": {
                  "type": "string",
                  "example": "max-age=15724800; includeSubDomains"
                }
              },
              "CF-Cache-Status": {
                "schema": {
                  "type": "string",
                  "example": "DYNAMIC"
                }
              },
              "cf-request-id": {
                "schema": {
                  "type": "string",
                  "example": "0350f2dda00000e660fcba8200000001"
                }
              },
              "Expect-CT": {
                "schema": {
                  "type": "string",
                  "example": "max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\""
                }
              },
              "Server": {
                "schema": {
                  "type": "string",
                  "example": "cloudflare"
                }
              },
              "CF-RAY": {
                "schema": {
                  "type": "string",
                  "example": "5a2e87429ea6e660-LHR"
                }
              },
              "Content-Encoding": {
                "schema": {
                  "type": "string",
                  "example": "gzip"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/inline_response_400"
                },
                "example": {
                  "error": "Only .jpg, .jpeg, .png, .tiff, .pdf, and .tif file types are allowed.",
                  "message": "",
                  "status": "fail",
                  "status_code": 400
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "Date": {
                "schema": {
                  "type": "string",
                  "example": "Sat, 13 Jun 2020 20:23:17 GMT"
                }
              },
              "Content-Type": {
                "schema": {
                  "type": "string",
                  "example": "application/json"
                }
              },
              "Transfer-Encoding": {
                "schema": {
                  "type": "string",
                  "example": "chunked"
                }
              },
              "Connection": {
                "schema": {
                  "type": "string",
                  "example": "keep-alive"
                }
              },
              "Strict-Transport-Security": {
                "schema": {
                  "type": "string",
                  "example": "max-age=15724800; includeSubDomains"
                }
              },
              "CF-Cache-Status": {
                "schema": {
                  "type": "string",
                  "example": "DYNAMIC"
                }
              },
              "cf-request-id": {
                "schema": {
                  "type": "string",
                  "example": "0350f2dda00000e660fcba8200000001"
                }
              },
              "Expect-CT": {
                "schema": {
                  "type": "string",
                  "example": "max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\""
                }
              },
              "Server": {
                "schema": {
                  "type": "string",
                  "example": "cloudflare"
                }
              },
              "CF-RAY": {
                "schema": {
                  "type": "string",
                  "example": "5a2e87429ea6e660-LHR"
                }
              },
              "Content-Encoding": {
                "schema": {
                  "type": "string",
                  "example": "gzip"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/inline_response_400"
                },
                "examples": {
                  "example-0": {
                    "summary": "Invalid Token",
                    "value": {
                      "error": "token is invalid",
                      "message": "",
                      "status": "fail",
                      "status_code": 401
                    }
                  },
                  "example-1": {
                    "summary": "Missing Token",
                    "value": {
                      "error": "token is missing",
                      "message": "",
                      "status": "fail",
                      "status_code": 401
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inline_response_400": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "description": "A message describing the error."
          },
          "message": {
            "type": "string",
            "description": "Additional information or context about the error."
          },
          "status": {
            "type": "string",
            "description": "The status of the request, typically 'fail'."
          },
          "status_code": {
            "type": "integer",
            "description": "The HTTP status code of the response."
          }
        }
      },
      "upload_custom_body": {
        "required": [
          "file",
          "file_type",
          "type"
        ],
        "type": "object",
        "properties": {
          "file": {
            "type": "string",
            "description": "The public URL of the file or the Base64-encoded file content.",
            "example": "https://templates.invoicehome.com/invoice-template-us-classic-white-750px.png"
          },
          "type": {
            "type": "string",
            "description": "The type of document being uploaded. Obtain the list of available types from the 'Get User Details and Document Types' endpoint.",
            "example": "invoice"
          },
          "user_doc_id": {
            "type": "string",
            "description": "An optional, unique identifier that you can assign to the document for your own internal tracking purposes."
          },
          "doc_meta_data": {
            "type": "string",
            "description": "Optional JSON string containing any additional metadata you want to associate with the document."
          },
          "filename": {
            "type": "string",
            "description": "The name for the file, including its extension. This is required when uploading a file using Base64.",
            "example": "example.png"
          },
          "file_type": {
            "type": "string",
            "description": "Specifies whether the `file` parameter contains a `url` or `base64` content.",
            "enum": [
              "url",
              "base64"
            ]
          },
          "review_token": {
            "type": "boolean",
            "description": "If `true`, the response will include a temporary, signed review URL that can be shared with external users."
          },
          "password": {
            "type": "string",
            "description": "The password for the document, if it is password-protected."
          }
        }
      },
      "inline_response_200_1": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/inline_response_200_1_data"
          },
          "error": {
            "type": "string",
            "description": "A message describing any errors encountered during the request."
          },
          "error_code": {
            "type": "string",
            "description": "A code representing the specific error, if any."
          },
          "message": {
            "type": "string",
            "description": "Additional information or context about the response."
          },
          "status": {
            "type": "string",
            "description": "The status of the request (e.g., 'success' or 'fail')."
          },
          "status_code": {
            "type": "integer",
            "description": "The HTTP status code of the response."
          }
        }
      },
      "inline_response_200_1_data": {
        "type": "object",
        "properties": {
          "created_at": {
            "type": "string",
            "description": "Timestamp indicating when the document was created."
          },
          "doc_id": {
            "type": "string",
            "description": "Unique identifier for the uploaded document."
          },
          "doc_meta_data": {
            "type": "string",
            "description": "Metadata associated with the document, provided during upload."
          },
          "email": {
            "type": "string",
            "description": "Email associated with the uploaded document."
          },
          "review_url": {
            "type": "string",
            "description": "URL for reviewing the uploaded document. This will be a signed URL if `review_token` was set to `true` in the upload request."
          },
          "status": {
            "type": "string",
            "description": "The current processing status of the document (e.g., 'new')."
          },
          "title": {
            "type": "string",
            "description": "The title of the uploaded document, typically derived from the filename."
          },
          "type": {
            "type": "string",
            "description": "The type of the uploaded document."
          },
          "user_doc_id": {
            "type": "string",
            "description": "The custom identifier you provided for the document for internal tracking."
          },
          "user_id": {
            "type": "string",
            "description": "Unique identifier for the user who uploaded the document."
          }
        },
        "description": "Contains data related to the uploaded document."
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```