Skip to content

Search API

Kunal Priyadarshi edited this page Oct 3, 2026 · 1 revision

Search API

The application search API supports richer search than the document CRUD list. Prefix these paths with /api/v1/search. User authentication, workspace status, and visible-resource restrictions apply.

Method Suffix Purpose
GET /agreements Search agreements with supported facets
GET /templates Search accessible templates
GET / Global search across supported resources
GET /presets List saved presets; optionally filter by entityType
POST /presets Save a supported filter configuration
DELETE /presets/{id} Remove an owned/authorized preset
PATCH /presets/{id}/default Set a default preset under applicable rules

Use the search endpoint's supported parameters rather than copying the document-list query contract. Agreement search supports application filtering and sorting; the document integration list has different parameters and currently fixed sorting. Responses can use an application success envelope with results and pagination, rather than direct document DTOs.

Search parameters

Agreement search accepts q or search (up to 100 characters), status, datePreset, startDate, endDate, authorId, authorEmail, recipientEmail, recipientName, tag, tags, documentType, isArchived, sortBy, sortOrder, page, and limit.

Date presets include today, week, last_7_days, month, last_30_days, last_90_days, custom, and all. Explicit dates accept YYYY-MM-DD or timezone-bearing ISO 8601 timestamps. Document types are all, pdf, markdown, and docx. Multiple tags can be comma-separated. Sort fields are relevance, createdAt, updatedAt, title, status, or expiresAt; order is asc or desc. Default paging is page 1, limit 20, with maximum 100; default sorting uses updatedAt descending.

Template search accepts the keyword, category, tag, publication/archive state, sort, and paging controls. Its sort fields include version instead of agreement status or expiresAt. Global search supports entityType (all, agreements, templates) and a limit up to 50, default 10.

Save a preset

POST /presets requires name (1–100 characters), an entityType (AGREEMENT or TEMPLATE), and a filters object. Optional isDefault selects a default. Use the target endpoint's parameter names inside filters and review the applied results in the application.

The browser exposes search and advanced filters in Agreements and Templates. For everyday steps, see Agreement Management and Template Management. Search cannot be used to obtain records outside the caller's authorized visibility.

Clone this wiki locally