{
  "schema_version": "1.0",
  "name": "GreenSweep Pte. Ltd.",
  "legal_status": "GreenSweep Pte. Ltd. (Singapore), currently in formation as a Malta Purpose Foundation.",
  "description": "GreenSweep is an environmental project funding platform. Diaspora users vote for free, and outside funders direct money to projects in the home countries those voters identify. Agents may initiate donate / match / recurring intents on behalf of human users.",
  "url": "https://thegreensweep.org",
  "documentation": "https://thegreensweep.org/api/docs/agents",
  "openapi": "https://thegreensweep.org/api/openapi.json",
  "contact": {
    "email": "agents@thegreensweep.org"
  },
  "surfaces": {
    "schema_org_action": "https://thegreensweep.org#donate-action",
    "donate_intent": "https://thegreensweep.org/api/intents/donate",
    "match_intent": "https://thegreensweep.org/api/intents/match",
    "recurring_intent": "https://thegreensweep.org/api/intents/recurring",
    "transparency_csv": "https://thegreensweep.org/api/transparency.csv",
    "blog_feeds": {
      "rss": "https://thegreensweep.org/blog/rss.xml",
      "atom": "https://thegreensweep.org/blog/atom.xml",
      "json": "https://thegreensweep.org/blog/feed.json"
    }
  },
  "capabilities": {
    "donate": {
      "method": "POST",
      "url": "https://thegreensweep.org/api/intents/donate",
      "request_schema": {
        "amount": "number (positive)",
        "currency": "ISO 4217 3-letter code",
        "project": "optional project slug",
        "donor_ref": "optional opaque agent-side reference"
      },
      "supported_amounts": [
        10,
        25,
        50,
        100,
        250,
        500,
        1000
      ],
      "supported_currencies": [
        "USD",
        "EUR",
        "GBP",
        "AUD",
        "CAD",
        "SGD",
        "HKD",
        "AED",
        "SAR",
        "QAR",
        "KWD",
        "BHD",
        "INR",
        "PHP",
        "BDT",
        "NPR"
      ],
      "completion": {
        "method": "redirect",
        "flow": "Stripe Checkout (or partner) — agent hands off to the URL in `next.url`"
      },
      "region_gates": {
        "refused": [
          "PH",
          "IN"
        ],
        "reason": "Donate flow refuses these markets until a local entity (PH foundation, FCRA-registered IN beneficiary) is in place. Voting and signup are unaffected globally."
      }
    },
    "match": {
      "method": "POST",
      "url": "https://thegreensweep.org/api/intents/match",
      "notes": "Donation matching: agent specifies a base amount + match multiplier; platform records the matched-pair intent and redirects to checkout."
    },
    "recurring": {
      "method": "POST",
      "url": "https://thegreensweep.org/api/intents/recurring",
      "notes": "Recurring donations: agent specifies amount + cadence (monthly / quarterly / yearly)."
    }
  },
  "auth": {
    "header": "X-Agent-Signature",
    "scheme": "sha256",
    "enforced": false,
    "identity_header": "X-Agent-Id",
    "market_header": "X-Agent-Market",
    "hint": "Agents SHOULD send X-Agent-Id (URN of the agent vendor) and X-Agent-Market (ISO 3166 country) so we can audit and route intents correctly."
  },
  "rate_limits": {
    "window_seconds": 60,
    "max_requests_per_ip": 5,
    "max_requests_per_agent_id": 20,
    "enforced": true,
    "enforced_since": "2026-04-29",
    "response_on_exceed": {
      "status": 429,
      "body": {
        "error": "rate_limited",
        "scope": "ip|agent-id",
        "retry_after_seconds": 60
      },
      "retry_after_header": "Retry-After (seconds)"
    },
    "notes": "Per-IP and per-agent-id buckets run in parallel; either threshold returns 429. Agents SHOULD send X-Agent-Id so they get the higher per-agent-id bucket; without it they share an anon-fingerprint bucket keyed on UA + IP."
  },
  "idempotency": {
    "header": "Idempotency-Key",
    "required": true,
    "required_since": "2026-04-29",
    "max_length": 64,
    "pattern": "^[A-Za-z0-9_\\-:.]{1,64}$",
    "ttl_seconds": 86400,
    "replay_marker_header": "Idempotency-Replayed",
    "conflict_status": 409,
    "missing_status": 400,
    "hint": "Generate a fresh key per logical intent (UUIDv4 or similar). Re-send the same key + same body to safely retry; you'll get the cached response with `Idempotency-Replayed: true`. Re-send the same key + different body to detect a logic error; you'll get a 409."
  },
  "safety_semantics": {
    "intent_is_draft": true,
    "intent_requires_human_confirmation": true,
    "payment_charged_on_intent": false,
    "payment_charged_on_redirect_completion": true,
    "donor_visibility_in_completion_flow": "The donor sees the full amount, currency, project, and recurring cadence (if any) on the Stripe Checkout page before authorising the charge.",
    "cancellation_policy": "Recurring subscriptions are cancellable only by the registered donor by emailing donate@thegreensweep.org. The in-product donor portal at /account/donations is not yet shipped; agents SHOULD NOT direct donors to that path and SHOULD NOT advertise cancellation as part of the agent flow.",
    "retry_safety": "All intent endpoints are idempotent given a stable Idempotency-Key. Network retries are safe.",
    "pii_disclosure": "Agents send no donor PII to these endpoints. The donor_ref field is opaque to the platform — keep PII out of it."
  },
  "b2b_audience_pages": {
    "hub": "https://thegreensweep.org/for-business",
    "corporate_csr": "https://thegreensweep.org/for-corporate-csr",
    "foundations": "https://thegreensweep.org/for-foundations",
    "regulators": "https://thegreensweep.org/for-regulators",
    "organisations": "https://thegreensweep.org/for-organisations",
    "contact_endpoint": "https://thegreensweep.org/api/prospect-contacts",
    "contact_method": "POST",
    "contact_classes": [
      "csr",
      "fo",
      "regulator",
      "fdw"
    ]
  },
  "legal": {
    "privacy": "https://thegreensweep.org/privacy",
    "terms": "https://thegreensweep.org/terms",
    "ai_disclosure": "https://thegreensweep.org/privacy#ai-disclosure"
  },
  "discovery": {
    "sitemap": "https://thegreensweep.org/sitemap.xml",
    "llms_txt": "https://thegreensweep.org/llms.txt",
    "llms_full_txt": "https://thegreensweep.org/llms-full.txt",
    "llms_txt_locales": {
      "tl": "https://thegreensweep.org/tl/llms.txt",
      "ceb": "https://thegreensweep.org/ceb/llms.txt",
      "ilo": "https://thegreensweep.org/ilo/llms.txt",
      "hil": "https://thegreensweep.org/hil/llms.txt",
      "de": "https://thegreensweep.org/de/llms.txt",
      "es": "https://thegreensweep.org/es/llms.txt",
      "fr": "https://thegreensweep.org/fr/llms.txt",
      "pt": "https://thegreensweep.org/pt/llms.txt",
      "hi": "https://thegreensweep.org/hi/llms.txt",
      "ar": "https://thegreensweep.org/ar/llms.txt",
      "id": "https://thegreensweep.org/id/llms.txt",
      "vi": "https://thegreensweep.org/vi/llms.txt",
      "zh-TW": "https://thegreensweep.org/zh-TW/llms.txt"
    }
  }
}