Ferndesk

Article revisions

Diff two revisions

Returns a unified Markdown line diff between this revision and another (by version number or revision ID via against). Requires the content:read scope.

Required scope: content:read

GET /articles/{id}/revisions/{revisionId}/diff

Diff two revisions

curl --request GET \
  --url 'https://api.ferndesk.com/v1/articles/{ID}/revisions/{REVISIONID}/diff' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "articleId": "<string>",
  "from": {
    "revisionId": "<string>",
    "version": 1
  },
  "to": {
    "revisionId": "<string>",
    "version": 1
  },
  "changed": true,
  "diff": "<string>",
  "addedLines": 1,
  "removedLines": 1,
  "truncated": true
}

Diff

Authorizations

  • Authorization string required header

    All requests require a Bearer token in the Authorization header. API keys are prefixed with fdsk_ and should be kept secret. You can generate and manage keys from the Developer settings page.

    Keys can be restricted to any subset of these scopes (each endpoint lists the scope it requires via x-required-scopes):

    • content:read: Read and search help center articles, collections, sections, and translations
    • content:write: Create and edit article drafts, users, tasks; move articles and collections
    • content:publish: Publish, unpublish, restore, and trash content (make changes live)
    • analytics:read: Read help center reporting, analytics, and article feedback
    • conversations:read: Read AI assistant conversations and transcripts
    • webhooks:manage: Create and manage outbound webhook subscriptions

    Granting content:write or content:publish implies content:read. Keys minted before scoping have null scopes = full access (legacy mode).

Path Parameters

  • id string required

    Ferndesk article ID (art_...). Example: art_01JXY9AZK4KV

  • revisionId string required

    Revision ID. Example: rev_01JXY9AZK4KV

Query Parameters

  • against string required

    Version number or revision ID to diff this revision against. Example: 3

Response

application/json
  • articleId string

    Ferndesk article ID (art_...).

  • from object
    + Show Child Attributes
    • revisionId string
    • version integer
  • to object
    + Show Child Attributes
    • revisionId string
    • version integer
  • changed boolean
  • diff string

    Unified-style Markdown line diff.

  • addedLines integer
  • removedLines integer
  • truncated boolean