Skip to content

Get All Documents

Retrieve a list of all documents using the Docstron API. This endpoint allows you to fetch all document metadata, including the templates used and the data attributes for each document.

GET https://api.docstron.com/v1/documents

This endpoint requires authentication using a Bearer token. Include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

This endpoint does not require any parameters.

Terminal window
curl --location 'https://api.docstron.com/v1/documents' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data ''

200 - Success Response

{
"success": true,
"message": "Request successful",
"data": [
{
"document_id": "document-48201f3d-8b7f-443b-8223-8e75a692a325",
"template_id": "template-8c043edf-fa70-4e51-a8a2-36f67958c123",
"attributes": {
"amount": "$299.00",
"customer_name": "John Doe"
},
"created_at": "2025-10-12T17:07:27",
"updated_at": "2025-10-12T17:07:27"
},
{
"document_id": "document-fb5cf3c7-eddc-4edd-9683-81ff7fc64f34",
"template_id": "template-8c043edf-fa70-4e51-a8a2-36f67958c654",
"attributes": {
"amount": "$299.00",
"customer_name": "John Doe"
},
"created_at": "2025-10-12T17:07:55",
"updated_at": "2025-10-12T17:07:55"
}
]
}
FieldTypeDescription
successbooleanIndicates if the request was successful
messagestringA message describing the response
dataarrayArray of document objects
data.document_idstringUnique identifier of the document
data.template_idstringThe template used to generate this document
data.attributesobjectJSON object containing the data used to generate the document
data.created_atstringTimestamp when the document was created (ISO 8601 format)
data.updated_atstringTimestamp when the document was last updated (ISO 8601 format)

500 - Internal Server Error

Returned when an unexpected server error occurs while retrieving the documents.

{
"success": false,
"message": "Failed to get the documents.",
"data": []
}

Common causes:

  • Temporary server issue
  • Database connectivity problem
  • Service maintenance

Solution: Wait a few moments and retry the request. If the problem persists, contact support@docstron.com.

If you have questions about applications or need assistance:

  • 📧 Email: support@docstron.com
  • 💬 Live Chat: Available in your dashboard
  • 📚 Documentation: You’re reading it!