v0.0.0
OAS 3.0.3
Documenso v2 beta API
Subject to breaking changes until v2 is fully released.
Client Libraries
Subject to breaking changes until v2 is fully released.
Find documents based on a search criteria
The search query.
The pagination page number, starts at 1.
The number of items per page.
Filter documents by the template ID used to create it.
Filter documents by how it was created.
Filter documents by the current status
import { Documenso } from "@documenso/sdk-typescript";
const documenso = new Documenso({
apiKey: process.env["DOCUMENSO_API_KEY"] ?? "",
});
async function run() {
const result = await documenso.documents.find({
orderByDirection: "desc",
});
// Handle the result
console.log(result);
}
run();
{
"data": [
{
"visibility": "EVERYONE",
"status": "DRAFT",
"source": "DOCUMENT",
"id": 1,
"externalId": "…",
"userId": 1,
"authOptions": {
"globalAccessAuth": "ACCOUNT",
"globalActionAuth": "ACCOUNT"
},
"formValues": {
"ANY_ADDITIONAL_PROPERTY": "…"
},
"title": "…",
"documentDataId": "…",
"createdAt": "…",
"updatedAt": "…",
"completedAt": "…",
"deletedAt": "…",
"teamId": 1,
"templateId": 1,
"user": {
"id": 1,
"name": "…",
"email": "…"
},
"recipients": [
{
"role": "CC",
"readStatus": "NOT_OPENED",
"signingStatus": "NOT_SIGNED",
"sendStatus": "NOT_SENT",
"id": 1,
"documentId": 1,
"templateId": 1,
"email": "…",
"name": "…",
"token": "…",
"documentDeletedAt": "…",
"expired": "…",
"signedAt": "…",
"authOptions": {
"accessAuth": "ACCOUNT",
"actionAuth": "ACCOUNT"
},
"signingOrder": 1,
"rejectionReason": "…"
}
],
"team": {
"id": 1,
"url": "…"
}
}
],
"count": 1,
"currentPage": 1,
"perPage": 1,
"totalPages": 1
}
Successful response