---
title: "Search Account Documents"
method: POST
path: "/v2/accounts/me/documents/search"
tags: ["Document Access"]
---

# Search Account Documents

`POST /v2/accounts/me/documents/search`

## Request

- Base URL: `https://api.lucid.co`
- URL: `https://api.lucid.co/v2/accounts/me/documents/search`
- Auth: one of:
  - HTTP bearer
  - OAuth 2
    - Authorization code: `https://lucid.app/oauth2/authorize`
    - Token URL: `https://api.lucid.co/oauth2/token` scopes: `lucidchart.document.content:admin.readonly`, `lucidspark.document.content:admin.readonly`, `lucidscale.document.content:admin.readonly`
- TypeScript: <https://skmtc.dev/lucid/apis/lucid-rest-api/docs/v2/accounts/me/documents/search/post.ts> (a function with typed inputs; its response is checked against the schema)

Returns a list of all documents belonging to the requesting user's account, sorted by created date. This API is exclusive to Enterprise Shield accounts. The endpoint supports pagination. Search Documents and Search Account Documents share a limit of 300 requests per 5 seconds per account.

## Headers

- `Lucid-Request-As` string, required

## Request body

- object
  - `userIds` number[]: When provided, limit the search to documents that at least one specified user can access. If no list is provided, search across the entire account.
  - `ownedByUsers` boolean: When true, search results will only include documents owned by users specified by userIds. Ignored if no userIds are provided.
  - `documentIds` string[]: List of documentIds to filter by.
  - `classificationIds` string[]: List of classificationIds to filter by.
  - `statusIds` number[]: List of statusIds to filter by.
  - `createdStartTime` string, date-time: Start of range to filter documents by created time.
  - `createdEndTime` string, date-time: End of range to filter documents by created time.
  - `lastModifiedStartTime` string, date-time: Start of range to filter documents by last modified time.
  - `lastModifiedEndTime` string, date-time: End of range to filter documents by last modified time.
  - `product` Product[]: Array of Lucid Suite products to filter by. Default value assumes all valid products for the given scopes.
  - `keywords` string: Keyword(s) to search against document content and titles. When provided, results will be sorted by relevance to keyword search. Use quotes to search for exact phrases (e.g. "Project X")
  - `documentLocation` 'team folders' | 'users' | 'deleted' | 'repositories': Specify to search for documents in team folders, owned by users, deleted, or contained within repositories
  - `externalAccess` 'any' | 'external-collaborators' | 'external-links': Specify to search for documents with either “any” type of external access, “external-collaborators”, or "external-links"

## Response `200`

With paginated list of Account Documents

- AccountDocumentV2[]
  - `documentId` string, uuid, required: Unique ID of the document
  - `title` string, required: Title of the document
  - `adminViewUrl` string, uri, required: Link to view the document
  - `created` string, date-time, required: Date and time of when the document was created
  - `owner` object, required
    - `ownerType` string: user or account
    - `id` number: userId or accountId
    - `resourceType` 'team' | 'teamFolder' | 'repository', nullable: For account-owned documents, the type of resource that owns the document.
    - `resourceId` string, nullable: ID of the owning resource, prefixed to match `resourceType` - `team_` for `team` and `repo_` for `repository`. `teamFolder` resource IDs are numeric, as folders have no prefixed ID.
  - `lastModified` string, date-time, required: Date and time of when the document was last modified
  - `trashed` string, date-time, nullable: If defined, the timestamp when the document was moved to the trash
  - `customTags` string[], required: List of any custom tags assigned to the document
  - `product` 'lucidchart' | 'lucidscale' | 'lucidspark', required: The Lucid Suite product that a document was created in.
  - `status` string, nullable: Current assigned status of the document
  - `classification` string, nullable: Current assigned classification of the document
  - `parent` integer, nullable: ID of the parent folder
  - `userCollaboratorIds` integer[], required: List of IDs of users that are collaborators on the document
  - `teamCollaboratorIds` string[], required: List of prefixed IDs of teams that are collaborators on the document

## Other responses

- `400`: Bad Request if incorrect format
- `403`: Forbidden if "product" query parameter is used and the token’s scopes do not contain the matching readonly scope for each product, or account does not have access to the API
- `429`: Too Many Requests if the account exceeds the shared limit of 300 document searches per 5 seconds.

## Changes

- **2026-11-03** `9c2c917ec59c`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/lucid/apis/lucid-rest-api/changes/v2/accounts/me/documents/search/post.md)

---

[API](https://skmtc.dev/lucid/apis/lucid-rest-api.md) - [All operations](https://skmtc.dev/lucid/apis/lucid-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/lucid/apis/lucid-rest-api/revisions/9c2c917ec59c?raw)
