• Explainer
  • Marketing
  • 5 min read

Publishing AI Content Into Next.js Safely

Two paths, both reviewable and revertible: a pull request, or a signed endpoint you host.

Author
ftes.ai Editorial
ftes.ai Team

The short answer

There are two safe ways to publish AI-written articles into a Next.js site: as pull requests into the repository that a person reviews and merges, or through a signed endpoint provided by a small package the site owner installs. Both keep the approval with a human and make every publish attributable and reversible.

The role this piece is aboutContent & SEO Engineer Digital FTE ยท Inbound Marketing

Key takeaways

  • A pull request is the safest publish for developer-led teams: reviewable, attributable, revertible.
  • A signed endpoint suits sites where content should not require a code review to ship.
  • Both paths keep a human approval on every publish.
  • The endpoint path verifies its own install and detects cached 404s so a bad publish is caught.
  • Neither path requires giving an AI merge rights or admin access.

Why does the publish path matter?

The publish path matters because it decides who can put content on your site, how a mistake is caught, and how it is reversed. An AI that writes well but publishes through a route nobody reviews is a liability regardless of the writing.

For Next.js sites there is no built-in content management system, so the choice is between treating articles as code and treating them as data delivered to an endpoint. Both can be made safe; they suit different teams.

Topicworth-it verdictBrieffan-out plannedDraftfrom the Brand BrainFact gateunsourced claims blockedApprovala named personPublishyour routeMeasuresampled, datedNOTHING GOES LIVE WITHOUT A NAMED PERSON ยท EVERY STAGE IN THE AUDIT TRAIL
Figure 1Both publish paths sit at the same stage: after the fact gate and a named approval, never before.

Path one: how do pull requests work?

In the pull request path, the Content & SEO Engineer FTE drafts each article as MDX in a branch and opens a pull request with the content, metadata, and structured data. A team member reviews the diff and merges, and the existing build publishes it.

The FTE needs permission to open pull requests and nothing more. It does not need merge rights, and it should not have them by default. The merge is the approval, made by a named person, and a revert commit undoes a mistake.

Path two: how does the signed endpoint work?

In the endpoint path, the site owner installs a small package that adds a receiving route to their Next.js site. When a manager approves an article in the workspace, the Search Visibility FTE sends it to that route with a signature the site verifies before writing anything.

The package is installed from its public repository, and its exported types are the whole contract, so a mismatch between what is sent and what is expected fails visibly rather than losing data silently. The approval still happens in the workspace; the endpoint only receives what a person has already approved.

  • Pull request path: content as code, merge is the approval, revert is the undo
  • Endpoint path: signed delivery to a route you host, approval in the workspace
  • Both: no merge rights or admin access for the AI, a named approver per publish

How is a bad publish caught?

Both paths are designed so a bad publish is caught rather than hidden. In the pull request path, review happens before anything ships. In the endpoint path, the package verifies its own installation and checks for cached 404 responses, so an article that appears to publish but does not actually resolve is reported as a failure rather than a success.

That last detail matters because the quiet failure is the dangerous one. A publish that silently produced nothing would otherwise show up weeks later as a page that never ranked, with no one sure why.

Which path should you choose?

Choose the pull request path when your team already reviews changes in the repository and wants content held to the same standard. It fits developer-led companies where the marketing site and the product share a codebase.

Choose the endpoint path when content should ship without a code review, or when the people approving articles are not the people who merge code. It keeps the approval with the content owner and the delivery with a route the engineering team controls. Either way the AI never holds the keys to production.

What does the audit trail record for a published article?

For an article published through either path, the audit trail records the whole chain. The topic proposal with its worth-it verdict. The draft versions with their sources. The fact-gate results, including any claims that were blocked and how the revision resolved them. The approval in the workspace with the approver's name, the date, and any edits or send-backs with reasons. The publish event: for the pull request path, the repository, the branch, and the pull request reference, with the merge recorded in the repository's own history; for the endpoint path, the destination, the confirmation the customer's site returned, and any cached-not-found detection afterwards.

It also records the tokens consumed at each stage from the immutable ledger. A content lead asked why a page says what it says, an engineer asked how it reached the site, and a compliance reviewer asked who approved a claim can each read the answer from the record. The two paths differ in mechanism and are identical in this respect: nothing goes live on its own, and every step from topic to live page leaves a trace the customer owns.

Frequently asked questions

How does AI content get onto a Next.js site safely?

Either as pull requests a person reviews and merges, or through a signed endpoint added by a small package you install. Both keep a human approval on every publish.

Does the AI need merge rights?

No. In the pull request path it only opens pull requests. In the endpoint path it sends already-approved content to a route you host.

How is a mistake reversed?

In the pull request path, with a revert commit. In the endpoint path, by unpublishing through your own site, since the content lives there.

What if a publish silently fails?

The endpoint package verifies its install and detects cached 404s, so a publish that did not actually resolve is reported as a failure rather than a success.

Which path suits my team?

Pull requests if you already review changes in the repo. The endpoint if content should ship without a code review or the approvers are not the people who merge.

  • Next.js
  • Publishing
  • Engineering
  • Content
  • Integration
Further reading

Keep going.

Related guides on hiring and managing Digital FTEs.

Ready to hire your first Digital FTE?

Pick a role, connect the tools it needs, and review its first proposals this week.