INK / BY CODE+INK

For your developer

Installing and configuring INK

The one page for the person who adds the plugin to the Payload config. Package, options, environment, and what each option changes in the admin.

Updated 14 October 2026

The plugin is @codeandink/payload-ink on npm, MIT-licensed. It needs Payload 3.40 or later and React 18 or 19. Pin an exact version; it is a prerelease and caret ranges resolve oddly against prerelease tags.

The full install guide with a checklist lives in the package README and in INSTALL.md in the repository. This page is the short version with the options explained in terms of what users will see.

Install

pnpm add @codeandink/payload-ink@<exact version>

Then register the plugin and regenerate the import map, which is how Payload finds INK's admin components:

pnpm payload generate:importmap

Environment

INK_API_KEY=         # from the tenant record CODE+INK creates for the site
INK_CRON_SECRET=     # openssl rand -hex 32 — give the same value to CODE+INK

Do not set a service URL override in production. The plugin defaults to the hosted service, and a leftover localhost override from development silently breaks every INK request.

The plugin block

import { inkPlugin } from '@codeandink/payload-ink'

plugins: [
  inkPlugin({
    apiKey: process.env.INK_API_KEY ?? '',
    auditTargets: [
      { collection: 'pages' },
      { collection: 'posts', pathPrefix: '/news' },
      { collection: 'events', pathPrefix: '/whats-on', metaTitleField: 'seo.title', metaDescriptionField: 'seo.description' },
    ],
    cronSecret: process.env.INK_CRON_SECRET,
    superAdminEmails: ['someone@agency.example'],
    gaAccessEmail: 'analytics@agency.example',
    hideDefaultCollectionsWidget: true,
  }),
]
OptionWhat it doesWhat the user sees
apiKeyAuthenticates the site to the INK service.Nothing when right. Every tab errors when wrong.
auditTargetsWhich collections INK audits and grades. One entry per collection.Those collections get the grade column; their pages appear in audits, search matching and site-search matching.
auditTargets[].pathPrefixWhere the frontend serves the collection when it isn't /{slug}.Without it, traffic and search data won't match the collection's pages, and the audits raise a caveat naming the collection.
auditTargets[].metaTitleField, metaDescriptionFieldDotted paths when the SEO fields aren't meta.title and meta.description.Audits and Apply honour them. The list-view grade column does not yet, and grades those pages as if the fields were missing.
cronSecretLets the INK service trigger the Sunday audits and the digest.Scheduled audits appear with trigger "Scheduled". Without it, audits only run on click and the digest only sends by hand.
superAdminEmailsWho may preview and send the digest by hand. Empty means any admin.Everyone else sees the Digest tab read-only with these addresses listed.
gaAccessEmailThe agency Google identity the service reads GA4 under when the client hasn't connected their own account.Shown in the wizard's Google step and on the connection card. Unset means the wizard offers only the Connect button.
hideDefaultCollectionsWidgetRemoves Payload's collection-tile grid from the dashboard.An INK-first dashboard: Enquiries, then the Intelligence panel, then a small INK status tile.
siteSearchForce the Site Search tab on or off. Unset auto-detects from GA4.true shows the tab with guidance while there's no data; false hides it.
maxAuditsPerDayDefault 3.The daily limit on each audit button.
maxAiProposalsPerAuditDefault 5.Proposal cards per SEO run.

Endpoints the plugin adds

All under /api/ink/. Every one requires a logged-in admin user except the two the scheduler calls (run-audit, run-freshness-audit, send-digest), which also accept Authorization: Bearer <cronSecret>, and the two Google OAuth hops, which are authorised by a one-time nonce minted by a logged-in start.

The scheduler

With cronSecret set and the same value on the tenant record, the INK service calls send-digest every morning (the plugin applies the cadence) and both audit endpoints on Sunday nights. The tenant record also needs the site's deployed admin base URL. CODE+INK sets those two.

Collections added

ink-onboarding-profile, ink-audits, ink-insights, ink-actions, grouped under "INK — Intelligence". All four are admin-only for every operation. The audited collections gain one virtual field, inkGrade, added to their default list columns.

After deploying

Log in, complete the wizard, run an SEO audit, open the Google Search tab and pick the property. If the tenant has cronSecret configured, confirm with CODE+INK that the first Sunday run shows as Scheduled in the Audits collection.