X Enterprises
fastify-x-signwell

xsignwell.documents.list

List all SignWell documents with optional page-based pagination.

xsignwell.documents.list

List all SignWell documents with optional page-based pagination.

Signature

fastify.xsignwell.documents.list(
  params?: { page?: number; limit?: number }
): Promise<Object>

Params

NameTypeRequiredDescription
params.pagenumberNoPage number for pagination.
params.limitnumberNoNumber of documents per page.

Returns

A paginated response object from the SignWell API with an array of document summaries.

Throws

  • Re-throws SignWell API errors with statusCode and signwellError properties.

Examples

First page of documents

const result = await fastify.xsignwell.documents.list({ limit: 20 });

for (const doc of result.documents) {
  console.log(doc.id, doc.status);
}

Paginate through all documents

async function getAllDocuments() {
  const all = [];
  let page = 1;

  while (true) {
    const result = await fastify.xsignwell.documents.list({ page, limit: 50 });
    all.push(...result.documents);
    if (!result.documents.length || result.documents.length < 50) break;
    page++;
  }

  return all;
}

See also


AI Context

package: "@xenterprises/fastify-xsignwell"
method: fastify.xsignwell.documents.list(params?)
use-when: List all SignWell documents with optional page-based pagination to browse or audit documents
params: page (optional), limit (optional)
returns: Paginated response with array of document summaries
Copyright © 2026