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
Which documents to return. owned returns documents you created. shared returns documents where you are assigned as editor. Accepted values: owned, shared
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.
Unique identifier for the document.
ID of the organization that owns this document.
User ID of the document owner.
User ID of the assigned editor, if any.
ID of the previous published version this document was revised from. Present only on revision drafts.
Version label, for example 1.0 or Q2-2025.
Department or team this document belongs to.
Current lifecycle status: draft, published, or archived.
ISO 8601 timestamp of when the document was last published. null for drafts.
ISO 8601 timestamp of when the document was created.
ISO 8601 timestamp of the last update.
Full node tree. This field is always an empty array on list responses — fetch a single document to get the complete tree.
[
{
"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.
Number of documents in draft status.
Number of published documents.
Number of archived documents.
{
"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
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.
Ordered array of top-level section nodes. Each section contains children (steps), and each step may contain children (sub-steps). ID of the parent document.
ID of the parent node. null for top-level sections.
Type of node: section, step, or sub_step.
Rich text content stored as structured JSON. null if no content has been added.
Sort position among siblings. Nodes are returned pre-sorted by this value.
User ID of the member who created this node.
ISO 8601 creation timestamp.
ISO 8601 last-updated timestamp.
Nested child nodes, sorted by order. Empty array if there are no children.
{
"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.