amend Documentation

Overview

amend is a human-in-the-loop layer for AI agents. Your agent submits content via a simple HTTP API, a human reviews it through a magic link (no login required), and the decision — along with any edits or comments — webhooks back to your agent.

It works with any agent that can make HTTP requests: Claude Code, Cursor, Codex, Amp, Gemini, or a custom script.

Quick start

Three steps to get a human decision on AI-generated content:

  1. POST your content to /api/upload. You get back an amend_url.
  2. Share the amend_url with the reviewer. They click it, read the content, leave comments, edit inline, and decide.
  3. Get the decision back via webhook — or poll GET /api/amend/[slug]/summary and paste it into your next prompt.

POST /api/upload

Submit content for review. Returns a slug and an amend URL to send to the reviewer.

POST https://amend.to/api/upload
Content-Type: application/json

{
  "title": "Q2 product update",
  "content": "We shipped three features this quarter...",
  "content_type": "long_form",
  "access": "comment_and_edit",
  "author_email": "agent@example.com",
  "reviewer_email": "human@example.com",
  "webhook_url": "https://your-app.com/webhook/amend"
}

Fields

FieldTypeDescription
titlestringTitle shown to the reviewer
contentstringMarkdown or plain text content
content_type"long_form"Content type (only long_form supported)
access"comment_and_edit" | "comment"Whether the reviewer can edit inline
author_emailstringEmail of the agent/author
reviewer_emailstringEmail shown on the review page
webhook_urlstring (optional)URL to POST the decision to when reviewer decides

Response

{
  "slug": "abc123",
  "amend_url": "https://amend.to/abc123"
}

GET /api/amend/[slug]/summary

Returns a markdown summary of the amend — status, final content, and all comments. Useful for polling or pasting directly into your next agent prompt.

GET https://amend.to/api/amend/[slug]/summary

Example response

# Amend Summary: Q2 product update

**Status:** approved
**Decided at:** 2026-07-01T10:23:00Z

## Final Content

We shipped three features this quarter...

## Comments

1. "Consider softening the tone in paragraph 2" (chars 45–89)

## Decision

Approved with minor edits applied inline.

Webhook payload

When the reviewer clicks Approve or Request Changes, a POST is sent to the webhook_url you provided at upload time.

POST https://your-app.com/webhook/amend
Content-Type: application/json

{
  "slug": "abc123",
  "status": "approved",
  "final_content": "We shipped three features this quarter...",
  "changes_requested": null,
  "comments": [
    {
      "body": "Consider softening the tone in paragraph 2",
      "anchor_text": "we dominated",
      "anchor_start": 45,
      "anchor_end": 57
    }
  ]
}

status is either "approved" or "changes_requested". When changes are requested, changes_requested contains the reviewer's note and final_content reflects any inline edits they made.

webhook_url is optional. If you omit it, poll GET /api/amend/[slug]/summary for the decision.

Access control

The access field controls what the reviewer can do:

  • comment_and_edit — the reviewer can leave inline comments and edit the content directly. Final edits are reflected in the webhook payload and summary.
  • comment — the reviewer can only leave comments. The content is read-only.

Anyone with the amend URL can access it — the link is the only access control. Share it only with the intended reviewer.