Skip to main content
POST
/
contribute
Submit knowledge contribution
curl --request POST \
  --url https://api.horizon.new/v1/contribute \
  --header 'Content-Type: application/json' \
  --data '{
  "url": "<string>",
  "content": "<string>",
  "source": "<string>",
  "contributors": [
    "<string>"
  ],
  "expiresAt": "2023-11-07T05:31:56Z"
}'
{
  "submissionId": "sub_01hx9rj",
  "status": "pending_consensus",
  "requiredVotes": 2,
  "reviewers": [
    {
      "memberId": "<string>",
      "vote": "approved"
    }
  ],
  "statusUrl": "<string>"
}
Publish curated content to the Horizon knowledge base for a specific URL. Contributions enter a consensus workflow that requires multiple maintainers to approve changes before they appear in search or prompt contexts.

Request body

  • url — Required canonical URL the contribution describes.
  • content — Required Markdown string with the proposed copy or summary.
  • source — Optional citation or dataset name for audit trails.
  • contributors — Optional array of workspace member IDs who should review the submission; defaults to the maintainers group.
  • expiresAt — Optional ISO timestamp to automatically retire the contribution.

Sample request

curl https://api.horizon.new/v1/contribute \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://docs.horizon.new/essentials/navigation",
    "content": "### Key takeaways\\n- Scenes are node graphs...\\n- Use the visual editor for branching logic.",
    "source": "Internal workshops",
    "contributors": ["mem_123", "mem_456"]
  }'

Response

Returns 202 Accepted with a unique submissionId. The payload includes:
  • status — Starts as pending_consensus.
  • requiredVotes — Minimum number of approvals needed (defaults to 2 unless overridden).
  • reviewers — List of users who must review and their current vote.
  • statusUrl — Endpoint to poll (or embed in Slack) for live updates.

Consensus workflow

  1. Each reviewer receives a notification with the rendered Markdown diff.
  2. Reviewers record their vote in the console or through the contributions review API.
  3. When the threshold is met, the contribution transitions to accepted and becomes searchable.
  4. If any reviewer rejects, the submission moves to changes_requested; resubmit once updated.

Tips

  • Keep content concise; the service automatically chunks longer docs during ingestion.
  • Include expiresAt when posting time-sensitive announcements so the system retires them automatically.

x402 flow

Moderation bandwidth for contributions is paid through Coinbase’s x402 protocol. When extra quota is needed, Horizon returns a structured 402 response:
HTTP/1.1 402 Payment Required
Content-Type: application/json

{
  "x402Version": 1,
  "accepts": [
    {
      "scheme": "exact",
      "network": "base-sepolia",
      "maxAmountRequired": "120000",               // $0.12 in 6‑decimal USDC
      "resource": "POST /contribute",
      "description": "Horizon contribution review",
      "mimeType": "application/json",
      "payTo": "0xYourReceivingWallet",
      "maxTimeoutSeconds": 300,
      "asset": "0xYourUSDCContract",
      "extra": {
        "name": "USDC",
        "version": "1"
      }
    }
  ],
  "error": null
}
Work through the Coinbase flow:
  1. Forward the accepts object to your facilitator per Client & server responsibilities and call /verify + /settle.
  2. Replay POST /contribute with the facilitator’s Base64 payload inside the standard X-PAYMENT header:
    curl https://api.horizon.new/v1/contribute \
      -H "Content-Type: application/json" \
      -H "X-PAYMENT: eyJ4NDAyVmVyc2lvbiI6MSwic2NoZW1lIjoiZXhhY3QiLC4uLn0=" \
      -d '{ ...original body... }'
    
  3. Horizon validates the proof, enqueues the submission for consensus, and returns 202 Accepted. When settlement succeeds you receive an X-PAYMENT-RESPONSE header with the facilitator receipt.
If you are bootstrapping from scratch, the Quickstart for sellers covers facilitator configuration on Base and Solana.

Body

application/json
url
string<uri>
required
content
string
required

Markdown body.

source
string
contributors
string[]
expiresAt
string<date-time>

Response

Contribution queued for consensus review

submissionId
string
required
Example:

"sub_01hx9rj"

status
enum<string>
required
Available options:
pending_consensus,
changes_requested,
accepted
requiredVotes
integer
required
Required range: x >= 1
reviewers
object[]
required
statusUrl
string<uri>
required