Skip to main content
Version: v2

Documents

The Documents API allows you to create and manage documents. A document is any file uploaded in the Getpaid platform.

Documents in the system can serve various purposes, including user uploads, scheduled imports, and system-generated outputs. These files are used to support different functionalities, such as attaching documents to records, enriching data, or exporting information.

For a complete and up-to-date list of supported file types and their use cases, refer to the Documents API endpoints.

Steps

1. Create document

The type of the document is required and it will influence the validation of the file.

Request

POST /v2/documents
POST /documents HTTP/1.1
Content-Length: 1764
Content-Type: multipart/form-data; boundary=boundary
Host: files.getpaid.io

--boundary
Content-Disposition: form-data; name="type"

company_logo
--boundary
Content-Disposition: form-data; name=""; filename="company_logo.png"
Content-Type: image/png

--boundary--

Response

201 Created
{
"id": "doc_411t0m5432ynkfs03wzz02rqn2"
}

2. Get document metadata

Retrieve metadata for a specific document, including details such as its type, filename, size, upload date, and associated tags. This endpoint allows you to inspect document properties without downloading the actual file.

Get document metadata by calling GET /v2/documents/{document_id}.

Response

200 OK
{
"id": "doc_411t0m5432ynkfs03wzz02rqn2",
"type": "company_logo",
"filename": "company_logo.png",
"content_type": "image/png",
"uploaded_at": "2025-01-22T08:02:06.3170881+00:00",
}

3. Download document content

Retrieve the content of a specific document for download. This endpoint allows you to access the file associated with a document, such as PDFs, images, or other supported formats.

Download document content by calling GET /v2/documents/{document_id}/content.

Response

200 OK
HTTP/1.1 200 OK
Content-Type: image/png
content-disposition: attachment; filename=getpaid_company_logo.png; filename*=UTF-8''getpaid_company_logo.png
Content-Length: 14040

IHDR � � ;��  PLTELiq)5��6 *...