---
title: "Adds a new role to the document."
method: POST
path: "/v2/documents/{document_id}/roles"
tags: ["Documents"]
---

# Adds a new role to the document.

`POST /v2/documents/{document_id}/roles`

Adds a new role to the document.

## Path parameters

- `document_id` string, required

## Headers

- `authorization` string, required

## Request body

- V2AddRole
  - `collaborators` string[]
  - `key` string — Key is either hex encoded 32 byte ID or string label. String label is used as a preimage to sha256 for 32 byte hash.

## Response `200`

OK

- V2Role
  - `collaborators` string[]
  - `id` string

## Other responses

- `400` — Bad Request
- `403` — Forbidden
- `404` — Not Found

---

[API](https://skmtc.net/centrifuge/apis/centrifuge-os-node-api.md) · [All operations](https://skmtc.net/centrifuge/apis/centrifuge-os-node-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/centrifuge/centrifuge-os-node-api/revisions/36808f8744e0/schema)
