---
title: "Read documents"
method: POST
path: "/rest/api/v1/getdocuments"
tags: ["Documents"]
---

# Read documents

`POST /rest/api/v1/getdocuments`

Read the documents including metadata (does not include enhanced metadata via `/documentmetadata`) for the given list of Glean Document IDs or URLs specified in the request.

## Query parameters

- `locale` string

## Request body

- GetDocumentsRequest
  - `documentSpecs` DocumentSpec[], required — The specification for the documents to be retrieved.
    - union
      - object
        - `url` string, required — The URL of the document.
      - object
        - `id` string, required — The ID of the document.
      - object
        - `ugcType` 'ANNOUNCEMENTS' | 'ANSWERS' | 'COLLECTIONS' | 'SHORTCUTS' | 'CHATS', required — The type of the user generated content (UGC datasource).
        - `contentId` integer, required — The numeric id for user generated content. Used for ANNOUNCEMENTS, ANSWERS, COLLECTIONS, SHORTCUTS.
        - `docType` string — The specific type of the user generated content type.
      - object
        - `ugcType` 'ANNOUNCEMENTS' | 'ANSWERS' | 'ARTIFACTS' | 'COLLECTIONS' | 'SHORTCUTS' | 'CHATS', required — The type of the user generated content (UGC datasource).
        - `ugcId` string, required — The string id for user generated content. Used for CHATS.
        - `docType` string — The specific type of the user generated content type.
  - `includeFields` string[] — List of Document fields to return (that aren't returned by default)

## Response `200`

OK

- GetDocumentsResponse
  - `documents` object — The document details or the error if document is not found.

## Other responses

- `400` — Invalid request
- `401` — Not Authorized
- `403` — Documents does not exist, or user cannot access documents.
- `429` — Too Many Requests

## Changes

> 92 revisions in range; 7 could not be searched.

- **2026-08-05** `eb8771f34824` — 23 info
  - added the optional property `documents/additionalProperties/oneOf[#/components/schemas/Document]/metadata/assignedTo/metadata/jobFunction` to the response with the `200` status
  - added the optional property `documents/additionalProperties/oneOf[#/components/schemas/Document]/metadata/author/metadata/jobFunction` to the response with the `200` status
  - added the optional property `documents/additionalProperties/oneOf[#/components/schemas/Document]/metadata/collections/items/allOf[#/components/schemas/CollectionMutableProperties]/allOf[#/components/schemas/CollectionBaseMutableProperties]/addedRoles/items/person/metadata/jobFunction` to the response with the `200` status
  - added the optional property `documents/additionalProperties/oneOf[#/components/schemas/Document]/metadata/collections/items/allOf[#/components/schemas/CollectionMutableProperties]/allOf[#/components/schemas/CollectionBaseMutableProperties]/removedRoles/items/person/metadata/jobFunction` to the response with the `200` status
  - …19 more
- **2026-07-22** `12f321ae935e` — 1 info
  - the endpoint scheme security `APIToken` was added to the API
- **2026-07-22** `90948cb39546` — 1 info
  - the endpoint scheme security `APIToken` was removed from the API
- **2026-07-21** `972a5118199e` — 1 info
  - the endpoint scheme security `APIToken` was added to the API
- …earlier changes not shown

[Full history](https://skmtc.dev/gleanwork/apis/glean-api/changes/rest/api/v1/getdocuments/post.md)

---

[API](https://skmtc.dev/gleanwork/apis/glean-api.md) · [All operations](https://skmtc.dev/gleanwork/apis/glean-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/gleanwork/glean-api/revisions/7ed1f79f6fb7/schema)
