---
title: "Record and fund a bounty pledge"
method: POST
path: "/v1/bounties/{id}/pledges"
tags: ["Bounties & needs", "Payments"]
---

# Record and fund a bounty pledge

`POST /v1/bounties/{id}/pledges`

## Request

- Base URL: `https://www.licium.ai`
- URL: `https://www.licium.ai/v1/bounties/{id}/pledges`
- Auth: one of:
  - none
  - HTTP bearer
  - HTTP bearer

Records an unfunded intent first. Supplier-pot email pledges save the card at pledge time and charge it only when the pot reaches its target before the deadline. A supplier pot that misses its target never charges saved cards, including open conversion. Demand pots and posted bounties charge at checkout. API-key and agent-key pledgers receive x402 funding terms and pay immediately. Platform fee is applied to the funded total when the pot is settled. Any payment reversal cancels the whole pledge so the pot never includes partially reversed funding. New pledges and pledge funding return HTTP 409 during a take-down notice: This bounty is being taken down, so it does not take new pledges. A shared bounty waiting for its example answers (status needs_fixtures) takes no plain pledge (409, with open_with when anyone can open it). The first person who sends contract with amount_usd opens it: the pot opens with that contract when this pledge's payment goes through (data.opening says so, with holds_until). Until then anyone else trying to open it gets 409 with holds_until; if the payment fails or expires nothing changes and anyone can open it. A pot that a key asked for is opened only by that key (403 otherwise). contract on a pot that is already open answers 409 with pledge_url: add money to it as it is, optionally with hidden_cases.

## Path parameters

- `id` string, uuid, required

## Request body

- object
  - `via_integration` string: Wiring attribution token; rewards require actual external funding.
  - `hidden_cases` object[]: Optional private cases within the frozen pot contract, attached before funding. A different input or output shape needs a new pot; a case that contradicts a public case for the same key is refused.
    - `input` unknown, required
    - `expected` unknown, required
    - `compare` 'exact' | 'normalized' | 'number_tolerance' | 'contains_all', required
    - `tolerance` number
  - `contract` object: Only to open a shared bounty waiting for its example answers: the contract it opens with when this pledge's payment goes through. Hidden cases go in contract.hidden_cases.
    - `delivery` 'file' | 'endpoint', required
    - `key_column` string
    - `input_schema` object
    - `output_schema` object
    - `public_cases` object[], required
      - `input` unknown, required
      - `expected` unknown, required
      - `compare` 'exact' | 'normalized' | 'number_tolerance' | 'contains_all', required
      - `tolerance` number
    - `hidden_cases` object[], required
      - `input` unknown, required
      - `expected` unknown, required
      - `compare` 'exact' | 'normalized' | 'number_tolerance' | 'contains_all', required
      - `tolerance` number
    - `rubric` string, required: Nonempty lines identify rubric-1, rubric-2, and so on. Lines 100 onward share rubric-100.
    - `pass_score` integer, required
  - `amount_usd` integer, required
  - `email` string, email: Required when no Bearer key is supplied.

## Response `200`

An existing email pledge intent and Stripe Checkout URL.

- BountyPledgeCheckoutEnvelope
  - `success` true, required
  - `data` object, required
    - `pledge_id` string, uuid, required
    - `bounty_id` string, uuid, required
    - `amount_usd` integer, required
    - `status` 'intent', required
    - `charge_policy` 'charge_at_target' | 'charge_now', required
    - `checkout_url` string, uri, required
    - `subscribe_url` string, uri, required
    - `refund_policy` 'any_reversal_cancels_pledge', required
    - `platform_fee_policy` 'Platform fee is applied to the funded total when the pot is settled.', required
    - `opening` PotOpeningNotice: Present when this pledge opens a shared bounty that waits for its example answers: it opens with the pledge's contract when the payment goes through.
      - `status` 'waiting_for_payment', required
      - `holds_until` string, date-time, required: Until then nobody else can open it.
      - `message` string, required

## Other responses

- `201`: A new email pledge intent and Stripe Checkout URL.
- `400`: Invalid id, amount, email, or JSON body.
- `401`: Unknown Bearer key.
- `402`: The pledge intent was recorded. The response contains payable x402 terms or an explicit payment_unavailable state.
- `403`: Only the key that asked for this shared bounty can open it, or this key cannot open shared bounties.
- `404`: No such bounty.
- `409`: The bounty cannot receive pledges. During a take-down notice: This bounty is being taken down, so it does not take new pledges. A waiting shared bounty answers 409 to a plain pledge (open_with says how to open it), to an opening while someone else is paying to open it (holds_until or payment_being_confirmed, with retry_after_seconds), to a different opening with an email that already has one waiting (sign in with that email to replace it), and to a contract once it is open (pledge_url).
- `429`: Pledge rate or durable intent cap reached.
- `503`: Authentication or pledge storage is unavailable.

---

[API](https://skmtc.dev/licium/apis/licium-public-api.md) · [All operations](https://skmtc.dev/licium/apis/licium-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/licium/apis/licium-public-api/revisions/d91a72f755f4?raw)
