> **Source:** https://knowledge.leegality.com/sign-station/api/search-users > **Site:** Leegality Knowledge Base — https://knowledge.leegality.com > **About:** Leegality is a document execution platform covering eSigning, stamps, NeSL, workflows, and REST API integration. > **Navigation:** Every article on this site has a plain-text version at `.txt` (this format). To get an index of all articles with their `.txt` links, read: https://knowledge.leegality.com/llms.txt > **AI Guide:** For instructions on how to navigate this knowledge base as an AI agent, read: https://knowledge.leegality.com/ai-readable.txt --- # POST /api/v1/users/search — Search users Search users for the current user's organization using advanced search criteria **Authentication:** `X-Auth-Token` header required on every request. ## Request URL ``` POST https://app1.leegality.com/api/api/v1/users/search ``` **Environments:** - Production: `https://app1.leegality.com/api/api/v1/users/search` - Sandbox: `https://sandbox.leegality.com/api/api/v1/users/search` --- ## Request Body **Content-Type:** `application/json` Search criteria including filters, sorting, and pagination | Field | Type | Required | Description | Example | |-------|------|----------|-------------|---------| | `filter` | Filter Request Schema | No | Filter Request Schema represents the group of parameters which filters the records. See **Filter Request Schema** below. | — | | `sort` | array\ | No | Sort Request Schema list represents the group of parameters which sorts the records. See **Sort Request Schema** below. | — | | `limit` | integer | No | Limit represents the maximum number of records to be displayed per page. | `10` | | `page` | integer | No | Page represents the current page index to display records starting from 0. | `0` | #### Filter Request Schema Filter Request Schema represents the group of parameters which filters the records. | Field | Type | Required | Description | Example | |-------|------|----------|-------------|---------| | `field` | string | No | Field represents the field on which operator would be applied. | `Audit Trail (2).pdf` | | `operator` | string | Yes | Operator represents the condition which would be applied for searching. Allowed: `EQ`, `NEQ`, `IN`, `NOT_IN`, `IS_NULL`, `NOT_NULL`, `AND`, `OR`, `GT`, `LT`, `GTE`, `LTE`, `BETWEEN`, `LIKE`. | — | | `value` | array\ | No | Value represents the value of the field which would be searched within the records. | — | | `filters` | array\ | No | List of filters represents filters to be applied if the operator used is AND or OR | — | #### Sort Request Schema Sort Request Schema list represents the group of parameters which sorts the records. | Field | Type | Required | Description | Example | |-------|------|----------|-------------|---------| | `field` | string | Yes | Field represents the field on which sorting would be applied. | `createdAt` | | `direction` | string | No | Direction represents the order in which sorting would be applied. Allowed: `ASC`, `DESC`. | — | ### Sample Request ```json { "filter": { "field": "Audit Trail (2).pdf", "operator": "EQ", "value": [ {} ], "filters": [ "value" ] }, "sort": [ { "field": "createdAt", "direction": "ASC" } ], "limit": 10, "page": 0 } ``` --- ## Responses ### 200 — Users found successfully | Field | Type | Required | Description | Example | |-------|------|----------|-------------|---------| | `data` | array\ | No | See **CertificateSearchItemVO** below. | — | | `pagination` | Pagination Response Schema | No | See **Pagination Response Schema** below. | — | #### CertificateSearchItemVO Certificate item in search results | Field | Type | Required | Description | Example | |-------|------|----------|-------------|---------| | `id` | string | No | Certificate unique identifier | `37d14717-5c1a-44fe-9b8f-6d5184b09f06` | | `name` | string | No | Certificate name | `*.leegality.com` | | `certificateType` | string | No | Type of certificate | `PKCS12_PFX` | | `expiry` | string | No | Certificate expiry date and time | `2026-09-12T12:53:04` | | `createdAt` | string | No | Certificate creation date and time | `2025-10-14T20:38:06` | | `departmentId` | string | No | Department unique identifier | `a2906183-8b02-4aa3-9d27-e5ba3efef203` | | `departmentName` | string | No | Department name | `HR` | #### Pagination Response Schema | Field | Type | Required | Description | Example | |-------|------|----------|-------------|---------| | `limit` | integer | No | Limit represents the maximum number of records to be displayed per page. | `10` | | `page` | integer | No | Page represents the current page index to display records starting from 0. | `0` | | `total` | integer | No | Total represents the total number of records fetched. | `50` | ### 400 — Invalid search criteria | Field | Type | Required | Description | Example | |-------|------|----------|-------------|---------| | `code` | string | No | Top-level error code | `LE_ERR_SS_400` | | `errors` | array\ | No | List of error details See **ErrorDetailSearchUsers400VO** below. | — | #### ErrorDetailSearchUsers400VO | Field | Type | Required | Description | Example | |-------|------|----------|-------------|---------| | `message` | string | No | Detailed error message | `Invalid value for field [filter.filters], [field, filters]` | | `path` | string | No | API path that generated the error | `/api/v1/users/search` | ### 401 — Unauthorized - Invalid or expired token | Field | Type | Required | Description | Example | |-------|------|----------|-------------|---------| | `code` | string | No | Top-level error code | `LE_ERR_SS_401` | | `errors` | array\ | No | List of error details See **ErrorDetail401Unauthorized** below. | — | #### ErrorDetail401Unauthorized | Field | Type | Required | Description | Example | |-------|------|----------|-------------|---------| | `message` | string | No | Detailed error message | `Invalid or expired token` | | `path` | string | No | API path that generated the error | `/api/v1/*` | | `code` | string | No | Specific error code | `LE_ERR_SS_303` | ### 500 — Internal server error | Field | Type | Required | Description | Example | |-------|------|----------|-------------|---------| | `code` | string | No | Top-level error code | `LE_ERR_SS_500` | | `errors` | array\ | No | List of error details See **ErrorDetailToken500VO** below. | — | #### ErrorDetailToken500VO | Field | Type | Required | Description | Example | |-------|------|----------|-------------|---------| | `message` | string | No | Detailed error message | `Internal Server Error` | | `path` | string | No | API path that generated the error | `null` | | `code` | string | No | Specific error code | `null` | ### Sample Response (200) ```json { "data": [ { "id": "37d14717-5c1a-44fe-9b8f-6d5184b09f06", "name": "*.leegality.com", "certificateType": "PKCS12_PFX", "expiry": "2026-09-12T12:53:04", "createdAt": "2025-10-14T20:38:06", "departmentId": "a2906183-8b02-4aa3-9d27-e5ba3efef203", "departmentName": "HR" } ], "pagination": { "limit": 10, "page": 0, "total": 50 } } ```