Skip to content

API

A small REST surface for creating cases and generating packs from your own systems. Available on the Pro and Scale plans. Create a key in Settings → API keys; it is shown once. This public API never submits a dispute. The separately authenticated Stripe submission workflow is available only in the reviewed case UI; live mode remains disabled unless the server gate and exact user-and-account allowlist permit it.

Authentication

Send the key as a bearer token. Keys are stored only as a SHA-256 hash, so a lost key must be revoked and replaced rather than recovered.

curl https://rebuti.com/api/v1/cases \
  -H "Authorization: Bearer dp_live_00000000000000000000000000000000000000000"

Endpoints

GET/api/v1/casescases:read

List every case on the account behind the key.

Response

{
  "object": "list",
  "data": [
    {
      "id": "8f0c…",
      "title": "Order SO-24118 — product not received",
      "processor": "stripe",
      "data_mode": "live",
      "status": "collecting",
      "reason_code": "product_not_received",
      "external_dispute_id": "du_1LqW8x…",
      "amount_minor": 18900,
      "currency": "USD",
      "due_by": "2026-09-16T23:59:59.000Z",
      "created_at": "2026-09-08T09:12:44.000Z"
    }
  ]
}
POST/api/v1/casescases:write

Open a case. Product type drives which evidence the checklist asks for.

Request

{
  "title": "Order SO-24118 — product not received",
  "processor": "stripe",
  "productType": "physical",
  "reasonCode": "product_not_received",
  "externalDisputeId": "du_1LqW8x…",
  "amountMinor": 18900,
  "currency": "USD",
  "dueBy": "2026-09-16T23:59:59.000Z"
}

Response

{ "id": "8f0c…", "object": "case", "status": "collecting" }
POST/api/v1/cases/{id}/packpacks:read

Generate the next pack version for a case. Draws on the plan allowance, then on credits.

Response

{
  "object": "pack",
  "id": "b21f…",
  "version": 2,
  "pages": 7,
  "bytes": 41233,
  "evidence_count": 14,
  "missing_count": 1,
  "checksum_sha256": "9c1a…",
  "download": {
    "pdf": "https://rebuti.com/api/v1/packs/b21f…?format=pdf",
    "zip": "https://rebuti.com/api/v1/packs/b21f…?format=zip"
  }
}
GET/api/v1/packs/{id}?format=pdf|zippacks:read

Download a generated pack. The ZIP carries the PDF, the original attachments, manifest.json and stripe_evidence.json.

Response

Binary body with Content-Type application/pdf or application/zip.

Errors

Every failure returns { "error": { "code", "message" } } with the status below.

StatusCodeMeaning
401unauthorizedMissing or unrecognised key, or the key was revoked.
403forbiddenThe key does not carry the scope this endpoint needs.
400invalid_requestThe payload failed validation. `detail.issues` names the fields.
402quota_exceededThe plan allowance is spent and there are no pack credits left.
404not_foundNo such case or pack on this account.
409conflictA case already exists for that dispute id.
429rate_limited60 requests/minute per key; 10/minute for pack generation.
503not_configuredThe integration this endpoint needs is not configured in this environment.

What the API will not do

There is no endpoint that submits evidence to a payment processor. That is deliberate: a processor accepts evidence for a dispute once, and an automated caller should not be able to spend that on your behalf.