Docs

Editor integrations

Google Docs and WordPress - same gate, no AI in checks.

01 · Draft

Human or LLM

Paste, PR, webhook, or CLI. The gate does not care who wrote it.

Editor integrations

Dokeo exposes the same deterministic gate at stable endpoints that any editor plugin can call. Same input, same verdict, ~5ms - no AI in the checks.

Authentication

Send your Dokeo API key as the X-API-Key header. The user's tenant is resolved from the key. Generate one in account / API keys.

Google Docs add-on

POST the doc body to /api/v1/editor/docs/scan. The add-on renders Pass/Flag/Fail + inline highlights in the sidebar.

curl
curl -X POST https://dokeo-api.fly.dev/api/v1/editor/docs/scan \
  -H "X-API-Key: $DOKEO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "document_id": "abc123",
    "revision_id": "rev_42",
    "title": "How Dokeo keeps content citable",
    "body_text": "<p>The article body...</p>",
    "content_type": "blog",
    "strictness": "balanced",
    "return_inline": true
  }'
Response includes verdict, scores (overall / SEO / AEO / GEO), per-check statuses, and inline_issues with sentence offsets the sidebar can highlight.
Manifest snippet (appsscript.json)
{
  "oauthScopes": [
    "https://www.googleapis.com/auth/documents.readonly",
    "https://www.googleapis.com/auth/script.external_request"
  ],
  "addOns": {
    "common": {
      "homepageTrigger": {
        "runFunction": "onHomepage"
      }
    },
    "docs": {
      "onOpenTrigger": {
        "runFunction": "onOpen"
      }
    }
  }
}

WordPress plugin

POST to /api/v1/editor/wordpress/scan. Pass block_publish_on_fail: true to block publish when the gate fails.

PHP (publish filter)
add_filter('pre_post_update', function($post_id, $data) {
    $api_key = get_option('dokeo_api_key');
    $resp = wp_remote_post('https://dokeo-api.fly.dev/api/v1/editor/wordpress/scan', [
        'headers' => ['X-API-Key' => $api_key, 'Content-Type' => 'application/json'],
        'body' => json_encode([
            'post_id' => $post_id,
            'post_title' => $data['post_title'],
            'post_content' => $data['post_content'],
            'block_publish_on_fail' => true,
        ]),
        'timeout' => 15,
    ]);
    if (is_wp_error($resp)) return $post_id;
    if (wp_remote_retrieve_response_code($resp) === 422) {
        wp_die('Dokeo gate returned FAIL. Fix flagged issues before publishing.', 'Dokeo');
    }
    return $post_id;
}, 10, 2);

Plan limits

Editor scans draw from the interactive allowance (they're invoked by a person using an editor, not by CI). On Free tier: 100 / mo. On Growth and above: abundant - see pricing.

What's next

  • Two-way sync (deferred - out of scope for the gate product)
  • Notion integration (next editor after Docs + WordPress)
  • Custom rules in the sidebar (your org's brand voice, required sections)