Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.docinject.com/llms.txt

Use this file to discover all available pages before exploring further.

Use these endpoints to read documents from your DocInject organization. You can list all documents you own or that have been shared with you, get a breakdown of document counts by status, or fetch a single document with its complete section and step hierarchy.

List documents

GET https://api.docinject.io/api/v1/documents
Returns an array of documents. By default, only documents you own are returned. Pass filter=shared to list documents where you are assigned as editor instead.

Query parameters

filter
string
default:"owned"
Which documents to return. owned returns documents you created. shared returns documents where you are assigned as editor.Accepted values: owned, shared
limit
number
Maximum number of documents to return. Omit to return all documents.

Example request

curl "https://api.docinject.io/api/v1/documents?filter=owned&limit=25" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

Returns 200 OK with an array of document objects.
id
string
required
Unique identifier for the document.
organization_id
string
required
ID of the organization that owns this document.
created_by
string
required
User ID of the document owner.
editor_id
string
User ID of the assigned editor, if any.
parent_doc_id
string
ID of the previous published version this document was revised from. Present only on revision drafts.
title
string
required
Document title.
version
string
required
Version label, for example 1.0 or Q2-2025.
department
string
required
Department or team this document belongs to.
status
string
required
Current lifecycle status: draft, published, or archived.
published_at
string
ISO 8601 timestamp of when the document was last published. null for drafts.
created_at
string
required
ISO 8601 timestamp of when the document was created.
updated_at
string
required
ISO 8601 timestamp of the last update.
nodes
object[]
Full node tree. This field is always an empty array on list responses — fetch a single document to get the complete tree.
200
[
  {
    "id": "doc_01hxyz1a2b3c4d5e6f7g8h9j",
    "organization_id": "org_01habcdefghijklmnopqrstu",
    "created_by": "usr_01ha1b2c3d4e5f6g7h8i9j0k",
    "editor_id": null,
    "parent_doc_id": null,
    "title": "Employee Onboarding Checklist",
    "version": "2.1",
    "department": "People Operations",
    "status": "published",
    "published_at": "2025-04-10T14:32:00.000Z",
    "created_at": "2025-03-01T09:00:00.000Z",
    "updated_at": "2025-04-10T14:32:00.000Z",
    "nodes": []
  },
  {
    "id": "doc_01hyza9b8c7d6e5f4g3h2j1k",
    "organization_id": "org_01habcdefghijklmnopqrstu",
    "created_by": "usr_01ha1b2c3d4e5f6g7h8i9j0k",
    "editor_id": "usr_01hb2c3d4e5f6g7h8i9j0k1l",
    "parent_doc_id": "doc_01hxyz1a2b3c4d5e6f7g8h9j",
    "title": "Employee Onboarding Checklist",
    "version": "2.2",
    "department": "People Operations",
    "status": "draft",
    "published_at": null,
    "created_at": "2025-04-15T10:00:00.000Z",
    "updated_at": "2025-05-01T16:45:00.000Z",
    "nodes": []
  }
]

Get document counts

GET https://api.docinject.io/api/v1/documents/counts
Returns a count of your documents broken down by status. Use this to build dashboards or status summaries without fetching the full document list.

Example request

curl "https://api.docinject.io/api/v1/documents/counts" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

Returns 200 OK with an object containing counts for each status.
draft
number
required
Number of documents in draft status.
published
number
required
Number of published documents.
archived
number
required
Number of archived documents.
200
{
  "draft": 4,
  "published": 17,
  "archived": 3
}

Get a single document

GET https://api.docinject.io/api/v1/documents/{doc_id}
Returns a single document including its complete node tree — sections, steps, and sub-steps — sorted by order.

Path parameters

doc_id
string
required
The ID of the document to retrieve.

Example request

curl "https://api.docinject.io/api/v1/documents/doc_01hxyz1a2b3c4d5e6f7g8h9j" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

Returns 200 OK with a document object. The nodes field contains the full content tree — each node may have a children array with nested nodes of the next level.
nodes
object[]
Ordered array of top-level section nodes. Each section contains children (steps), and each step may contain children (sub-steps).
200
{
  "id": "doc_01hxyz1a2b3c4d5e6f7g8h9j",
  "organization_id": "org_01habcdefghijklmnopqrstu",
  "created_by": "usr_01ha1b2c3d4e5f6g7h8i9j0k",
  "editor_id": null,
  "parent_doc_id": null,
  "title": "Employee Onboarding Checklist",
  "version": "2.1",
  "department": "People Operations",
  "status": "published",
  "published_at": "2025-04-10T14:32:00.000Z",
  "created_at": "2025-03-01T09:00:00.000Z",
  "updated_at": "2025-04-10T14:32:00.000Z",
  "nodes": [
    {
      "id": "node_01ha1b2c3d4e5f6g",
      "document_id": "doc_01hxyz1a2b3c4d5e6f7g8h9j",
      "parent_id": null,
      "node_type": "section",
      "title": "Before Day One",
      "content": null,
      "order": 1,
      "created_by": "usr_01ha1b2c3d4e5f6g7h8i9j0k",
      "created_at": "2025-03-01T09:05:00.000Z",
      "updated_at": "2025-03-01T09:05:00.000Z",
      "children": [
        {
          "id": "node_01hb2c3d4e5f6g7h",
          "document_id": "doc_01hxyz1a2b3c4d5e6f7g8h9j",
          "parent_id": "node_01ha1b2c3d4e5f6g",
          "node_type": "step",
          "title": "Send welcome email",
          "content": null,
          "order": 1,
          "created_by": "usr_01ha1b2c3d4e5f6g7h8i9j0k",
          "created_at": "2025-03-01T09:06:00.000Z",
          "updated_at": "2025-03-01T09:06:00.000Z",
          "children": []
        }
      ]
    }
  ]
}
The API returns 404 Not Found if the document does not exist or belongs to a different organization than your API key.