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.

Each event DocInject dispatches includes a standard envelope with event_type, organization_id, org_slug, and occurred_at at the top level. The fields documented here describe the data object inside that envelope. For the full envelope shape, see the webhooks overview.

Document events

Fires when a new document is created in your organization (as a draft, before any publishing).Data payload
document_id
string
UUID of the newly created document.
title
string
Title of the document at creation time.
created_by_email
string
Email address of the team member who created the document.
{
  "event_type": "document.created",
  "organization_id": "a1b2c3d4-0000-0000-0000-111122223333",
  "org_slug": "acme-ops",
  "occurred_at": "2024-03-10T09:14:00Z",
  "data": {
    "document_id": "doc-uuid-0001",
    "title": "Onboarding Checklist",
    "created_by_email": "alex@acme.example"
  }
}
Fires the first time a document transitions from draft to published status.Data payload
document_id
string
UUID of the published document.
title
string
Document title.
version
string
Version label at the time of publication (for example, "1.0" or "v2").
department
string | null
Department the document belongs to, or null if unassigned.
published_at
string
ISO 8601 timestamp when the document was published.
published_by_email
string
Email address of the team member who published the document.
sections
array
Structured content of the document. Each section contains steps, and each step may contain sub-steps.
{
  "event_type": "document.published",
  "organization_id": "a1b2c3d4-0000-0000-0000-111122223333",
  "org_slug": "acme-ops",
  "occurred_at": "2024-03-10T11:00:00Z",
  "data": {
    "document_id": "doc-uuid-0001",
    "title": "Onboarding Checklist",
    "version": "1.0",
    "department": "People Ops",
    "published_at": "2024-03-10T11:00:00Z",
    "published_by_email": "alex@acme.example",
    "sections": [
      {
        "title": "Getting started",
        "content": "Complete these steps before your first day.",
        "images": [],
        "steps": [
          {
            "title": "Set up your laptop",
            "content": "Follow the IT setup guide linked in your welcome email.",
            "images": ["https://cdn.docinject.io/img/setup-guide.png"],
            "substeps": [
              {
                "title": "Install required software",
                "content": "Run the bootstrap script from the IT setup repository.",
                "images": []
              }
            ]
          }
        ]
      }
    ]
  }
}
Fires when a document that has already been published is revised and republished. Contains the same structured payload as document.published plus a reference to the previous version.Data payloadAll fields from document.published are present, plus:
previous_version_id
string
UUID of the document record representing the prior published version.
{
  "event_type": "document.revised",
  "organization_id": "a1b2c3d4-0000-0000-0000-111122223333",
  "org_slug": "acme-ops",
  "occurred_at": "2024-06-01T14:22:00Z",
  "data": {
    "document_id": "doc-uuid-0001",
    "title": "Onboarding Checklist",
    "version": "2.0",
    "department": "People Ops",
    "published_at": "2024-06-01T14:22:00Z",
    "published_by_email": "jordan@acme.example",
    "previous_version_id": "doc-uuid-0001-v1",
    "sections": [
      {
        "title": "Getting started",
        "content": "Complete these steps before your first day.",
        "images": [],
        "steps": []
      }
    ]
  }
}
Fires when a document is archived and removed from the active library.Data payload
document_id
string
UUID of the archived document.
title
string
Title of the document at the time it was archived.
archived_by_email
string
Email address of the team member who archived the document.
{
  "event_type": "document.archived",
  "organization_id": "a1b2c3d4-0000-0000-0000-111122223333",
  "org_slug": "acme-ops",
  "occurred_at": "2024-07-20T08:45:00Z",
  "data": {
    "document_id": "doc-uuid-0099",
    "title": "Legacy Expense Process",
    "archived_by_email": "morgan@acme.example"
  }
}
Fires when an editor is assigned to a document.Data payload
document_id
string
UUID of the document.
title
string
Title of the document.
editor_id
string
UUID of the user who was assigned as editor.
{
  "event_type": "document.assigned",
  "organization_id": "a1b2c3d4-0000-0000-0000-111122223333",
  "org_slug": "acme-ops",
  "occurred_at": "2024-04-05T10:00:00Z",
  "data": {
    "document_id": "doc-uuid-0042",
    "title": "Q2 Compliance Review",
    "editor_id": "user-uuid-0007"
  }
}

Member events

Fires when an admin sends an invitation to a new team member.Data payload
email
string
Email address the invitation was sent to.
invited_by
string
UUID of the admin who sent the invitation.
{
  "event_type": "member.invited",
  "organization_id": "a1b2c3d4-0000-0000-0000-111122223333",
  "org_slug": "acme-ops",
  "occurred_at": "2024-05-12T16:30:00Z",
  "data": {
    "email": "newperson@acme.example",
    "invited_by": "user-uuid-0001"
  }
}
Fires when an invited user accepts their invitation and joins the organization.Data payload
user_id
string
UUID of the user who joined.
email
string
Email address of the new member.
{
  "event_type": "member.joined",
  "organization_id": "a1b2c3d4-0000-0000-0000-111122223333",
  "org_slug": "acme-ops",
  "occurred_at": "2024-05-13T09:05:00Z",
  "data": {
    "user_id": "user-uuid-0055",
    "email": "newperson@acme.example"
  }
}
Fires when an admin promotes a member to admin or demotes an admin to member.Data payload
user_id
string
UUID of the member whose role changed.
new_role
string
The role the member now holds. Either "admin" or "member".
changed_by
string
UUID of the admin who made the change.
{
  "event_type": "member.role_changed",
  "organization_id": "a1b2c3d4-0000-0000-0000-111122223333",
  "org_slug": "acme-ops",
  "occurred_at": "2024-08-02T13:17:00Z",
  "data": {
    "user_id": "user-uuid-0055",
    "new_role": "admin",
    "changed_by": "user-uuid-0001"
  }
}