---
title: "Create document in organization"
method: POST
path: "/v1/organizations/{id}/documents"
tags: ["Organization", "Document"]
---

# Create document in organization

`POST /v1/organizations/{id}/documents`

Create a new document in the organization library.

## Request body

- object
  - `title` string, required — Title of the document.
  - `excerpt` string, nullable — Excerpt of the document.
  - `content` string — Body of the document.

## Response `201`

Created

- Document — A document in an organization or namespace library.
  - `id` string, required — Unique identifier of the document.
  - `title` string, required — Title of the document.
  - `excerpt` string, nullable — Excerpt of the document.
  - `content` string, required — Body of the document.
  - `created_by` PartialUser, required — A simplified user used on issue list and detail responses.
    - `id` string, required — Unique identifier of the user.
    - `first_name` string, required — First name of the user.
    - `last_name` string, required — Last name of the user.
    - `picture` string, uri, nullable — Profile picture of the user.
  - `library` DocumentLibrary, required — The organization or namespace a document or folder is scoped to.
    - `id` string, required — Unique identifier of the library.
    - `type` 'Organization' | 'Namespace', required — Resource type of the library.
    - `name` string, required — Name of the organization or namespace.
  - `folder` DocumentFolder, required — The folder a document or nested folder is located in.
    - `id` string, required — Unique identifier of the folder.
    - `name` string, required — Name of the folder.
    - `parent_id` string — Parent folder ID when the folder is nested.
  - `relations` DocumentRelation[], required — Projects and issues this document is related to.
    - `id` string, required — Unique identifier of the related resource.
    - `type` 'Project' | 'Issue', required — Resource type of the related resource.
    - `name` string, required — Project name, or issue key.
  - `labels` PartialLabel[], required — Labels attached to the document.
    - `id` string, required — Unique identifier of the label.
    - `name` string, required — Name of the label.
  - `comment_count` integer, nullable — Number of comments on the document when projected.
  - `attachment_count` integer, nullable — Number of attachments on the document when projected.
  - `created_at` string, date-time, required — Date when the document was created.
  - `updated_at` string, date-time, nullable, required — Date when the document was updated.

## Other responses

- `400` — Bad request
- `401` — Unauthorized request
- `403` — Forbidden
- `404` — The requested resource not found
- `500` — Internal Server Error

---

[API](https://skmtc.net/opcotech/apis/elemo-api.md) · [All operations](https://skmtc.net/opcotech/apis/elemo-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/opcotech/elemo-api/revisions/addaba6fddad/schema)
