---
title: "Add a group to a document"
method: POST
path: "/documents.add_group"
tags: ["Documents"]
---

# Add a group to a document

`POST /documents.add_group`

## Request

- Base URL: `https://app.getoutline.com/api`
- URL: `https://app.getoutline.com/api/documents.add_group`
- Auth: one of:
  - HTTP bearer
  - OAuth 2
    - Authorization code: `https://app.getoutline.com/oauth/authorize`
    - Token URL: `https://app.getoutline.com/oauth/token` scopes: `read`, `write`

This method allows you to give all members in a group access to a document.

## Request body

- object
  - `id` string, required: Unique identifier for the document. Either the UUID or the urlId is acceptable.
  - `groupId` string, uuid, required
  - `permission` 'read' | 'read_write'

## Response `200`

OK

- object
  - `data` object
    - `groupMemberships` CollectionGroupMembership[]
      - `id` string: Unique identifier for the object.
      - `groupId` string, uuid: Identifier for the associated group.
      - `documentId` string, uuid, nullable: Identifier for the associated document, if any.
      - `collectionId` string, uuid, nullable: Identifier for the associated collection, if any.
      - `permission` 'read' | 'read_write'
      - `sourceId` string, uuid, nullable: Identifier for the membership this one was inherited from, if any.

## Other responses

- `400`: The request failed one or more validations.
- `401`: The API key is missing or otherwise invalid.
- `403`: The current API key is not authorized to perform this action.
- `404`: The specified resource was not found.
- `429`: The request was rate limited.

## Changes

- **2026-05-30** `304cd065561b`: 1 breaking, 2 info
  - the response property `data/groupMemberships/items/collectionId` became nullable for the status `200`
  - added the optional property `data/groupMemberships/items/documentId` to the response with the `200` status
  - added the optional property `data/groupMemberships/items/sourceId` to the response with the `200` status
- **2026-02-01** `2b998aa571f9`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/defaulr/apis/outline-api/changes/documents.add_group/post.md)

---

[API](https://skmtc.dev/defaulr/apis/outline-api.md) - [All operations](https://skmtc.dev/defaulr/apis/outline-api/llms.txt) - [OpenAPI document](https://skmtc.dev/defaulr/apis/outline-api/revisions/5ddf01ffba84?raw)
