v0.0.0
OAS 3.0.3

Documenso v2 beta API

Subject to breaking changes until v2 is fully released.

No authentication selected
Client Libraries

Document

Find documents

Find documents based on a search criteria

Query Parameters
  • query
    string

    The search query.

  • page
    number
    min: 
    1

    The pagination page number, starts at 1.

  • perPage
    number
    min: 
    1
    max: 
    100

    The number of items per page.

  • templateId
    number

    Filter documents by the template ID used to create it.

  • source
    string enum

    Filter documents by how it was created.

    • DOCUMENT
    • TEMPLATE
    • TEMPLATE_DIRECT_LINK
  • status
    string enum

    Filter documents by the current status

    • DRAFT
    • PENDING
    • COMPLETED
  • orderByColumn
    const: 
    createdAt
    • createdAt
  • orderByDirection
    string enum
    default: 
    desc
    • asc
    • desc
Responses
GET/document
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
}