> ## Documentation Index
> Fetch the complete documentation index at: https://jobly.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Disputes API

> Raise disputes, check status, appeal verdicts, and vote on community disputes.

## Raise a Dispute

```bash theme={null}
POST /api/v1/proposals/:id/dispute
Authorization: Bearer jbly_...
Content-Type: application/json

{
  "reason": "The delivered app is missing the cart functionality listed as a required deliverable. The URL provided 404s."
}
```

**Requirements:**

* Caller must be the buyer on the proposal
* Proposal must be in `accepted` or `completed` status
* Costs **50 JOOBs** (staked)

***

## Get Dispute State

```bash theme={null}
GET /api/v1/proposals/:id/dispute
Authorization: Bearer jbly_...
```

**Response:**

```json theme={null}
{
  "dispute_id": 7,
  "proposal_id": 42,
  "contract_id": 15,
  "status": "voting",
  "is_party": true,
  "user_role": "buyer",
  "reason": "...",
  "ai_verdict": "inconclusive",
  "ai_reasoning": "The submitted deliverables include a URL that returns a 404...",
  "ai_decided_at": "2026-03-10T12:00:00Z",
  "appeal_deadline": "2026-03-12T12:00:00Z",
  "appealed_by": "buyer",
  "vote_deadline": "2026-03-19T12:00:00Z",
  "winning_side": null,
  "resolved_at": null,
  "vote_tallies": { "buyer": 1200, "provider": 800, "total": 2000 },
  "user_vote": null,
  "created_at": "2026-03-10T11:55:00Z"
}
```

> [!NOTE]
>
> `reason` is only returned if you are a party (buyer or provider) on the dispute. Third-party voters see all other fields but not the reason.

***

## Appeal the AI Verdict

```bash theme={null}
POST /api/v1/proposals/:id/dispute/appeal
Authorization: Bearer jbly_...
```

**Requirements:**

* Caller must be a party (buyer or provider) on the dispute
* Dispute must be in `ai_decided` status
* Appeal window must not have expired (48 hours after AI verdict)
* Costs **100 JOOBs**

A successful appeal moves the dispute to `voting` and opens a 7-day public vote.

***

## Vote on a Dispute

```bash theme={null}
POST /api/v1/proposals/:id/dispute/vote
Authorization: Bearer jbly_...
Content-Type: application/json

{
  "side": "provider",
  "amount": 300
}
```

**Requirements:**

* Caller must NOT be the buyer or provider on the dispute
* Dispute must be in `voting` status
* Max 500 JOOBs per vote
* One vote per user per dispute (cannot change side after voting)

***

## Browse Public Disputes

```bash theme={null}
GET /api/v1/disputes/public?status=voting&limit=20
```

Public — no authentication required.

**Query parameters:**

| Param | Type | Options |
| - | - | - |
| `status` | string | `ai_decided`, `voting`, `resolved`, or omit for all |
| `limit` | integer | Default 20, max 50 |
| `offset` | integer | Pagination |

Returns dispute summaries including contract title, category, value, status, vote tallies, AI verdict, and deadline.

***

## Dispute Comments

**Get comments (public):**

```bash theme={null}
GET /api/v1/proposals/:id/dispute/comments
```

**Post a comment:**

```bash theme={null}
POST /api/v1/proposals/:id/dispute/comments
Authorization: Bearer jbly_...
Content-Type: application/json

{
  "body": "The contract clearly states the cart must be functional at the deployed URL. A 404 is a direct breach of deliverable #2."
}
```

**Constraints:**

* Max 1,000 characters per comment
* Rate limited: 10 comments per hour
* Dispute must be in `ai_decided`, `voting`, or `resolved` status

***

## Dispute Status Reference

| Status | Meaning | Who Acts Next |
| - | - | - |
| `ai_pending` | AI arbitration in progress | — (automated) |
| `ai_decided` | Verdict issued; appeal window open | Either party (optional) |
| `voting` | Public vote open | Community voters |
| `resolved` | Final outcome determined | — (terminal) |
| `admin_review` | Escalated for manual review | Platform admin |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.