# Dispute routes: accept, answer, appeal, decide

URL: /code/api/dispute/verbs · Id: `page:code/api/dispute/verbs`

> The Dispute Verbs accept, answer, appeal, decide as api.sb routes, with inputs, result, refusals and an example.

Reference for [Dispute](/business/nouns/dispute), one group of [Dispute routes](/code/api/dispute).

### Dispute.accept
Accept concedes an open Dispute without contest, so the buyer keeps the held amount and the Dispute closes. [Verb page](/business/nouns/dispute/accept?interface=api).

```text
POST /{namespace}/disputes/{dispute}/accept
```

Path: `dispute`. Body, as JSON: the other inputs. Emits [`Dispute.accepted`](/business/events/Dispute.accepted).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `dispute` | [Dispute](/business/nouns/dispute) | Yes | The open Dispute. |
| `reason` | `text` | Yes | Why contesting is not worth it, such as a fraud chargeback with no delivery Evidence. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `dispute` | [Dispute](/business/nouns/dispute) | Yes | The closed Dispute, decided for the buyer. |

**Refuses when**

| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| The key is valid, but its scopes do not allow this operation. | [`forbidden`](/code/api/errors/forbidden) | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |

**Example**

```bash
curl -X POST https://api.sb/leaseline.app/disputes/dp_gywlshZJ7A/accept \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"reason":"Example reason"}'
```

```json
{
  "api": "https://api.sb/leaseline.app",
  "dispute": {
    "$id": "https://api.sb/leaseline.app/disputes/dp_gywlshZJ7A",
    "$type": "Dispute",
    "kind": "chargeback",
    "status": "open",
    "held": {
      "amount": 29,
      "currency": "USD"
    },
    "reason": "Example reason"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Dispute.accept",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}
```

### Dispute.answer
Answer submits the seller’s Evidence on an open Dispute before its deadline: the contract, the delivered work, and its verdicts. [Verb page](/business/nouns/dispute/answer?interface=api).

```text
POST /{namespace}/disputes/{dispute}/answer
```

Path: `dispute`. Body, as JSON: the other inputs. Emits [`Dispute.answered`](/business/events/Dispute.answered).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `dispute` | [Dispute](/business/nouns/dispute) | Yes | The open Dispute. |
| `evidence` | list of [Evidence](/business/nouns/evidence) | Yes | The records that show the promise was kept. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `dispute` | [Dispute](/business/nouns/dispute) | Yes | The answered Dispute. |

**Refuses when**

| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| The key is valid, but its scopes do not allow this operation. | [`forbidden`](/code/api/errors/forbidden) | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |

**Example**

```bash
curl -X POST https://api.sb/leaseline.app/disputes/dp_gywlshZJ7A/answer \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"evidence":["evidence_6xsa6iYImd"]}'
```

```json
{
  "api": "https://api.sb/leaseline.app",
  "dispute": {
    "$id": "https://api.sb/leaseline.app/disputes/dp_gywlshZJ7A",
    "$type": "Dispute",
    "kind": "chargeback",
    "status": "answered",
    "held": {
      "amount": 29,
      "currency": "USD"
    },
    "reason": "Example reason"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Dispute.answer",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}
```

### Dispute.appeal
Appeal asks for one review of a decided Dispute by a Worker who took no part in the first decision. [Verb page](/business/nouns/dispute/appeal?interface=api).

```text
POST /{namespace}/disputes/{dispute}/appeal
```

Path: `dispute`. Body, as JSON: the other inputs. Emits [`Dispute.appealed`](/business/events/Dispute.appealed).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `dispute` | [Dispute](/business/nouns/dispute) | Yes | The decided Dispute. |
| `reason` | `text` | Yes | What the first decision got wrong. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `dispute` | [Dispute](/business/nouns/dispute) | Yes | The appealed Dispute. |

**Refuses when**

| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| The key is valid, but its scopes do not allow this operation. | [`forbidden`](/code/api/errors/forbidden) | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |

**Example**

```bash
curl -X POST https://api.sb/leaseline.app/disputes/dp_gywlshZJ7A/appeal \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"reason":"Example reason"}'
```

```json
{
  "api": "https://api.sb/leaseline.app",
  "dispute": {
    "$id": "https://api.sb/leaseline.app/disputes/dp_gywlshZJ7A",
    "$type": "Dispute",
    "kind": "chargeback",
    "status": "appealed",
    "held": {
      "amount": 29,
      "currency": "USD"
    },
    "reason": "Example reason"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Dispute.appeal",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}
```

### Dispute.decide
Decide rules on an answered Dispute for the buyer, the seller, or a split, and releases or returns the held amount. [Verb page](/business/nouns/dispute/decide?interface=api).

```text
POST /{namespace}/disputes/{dispute}/decide
```

Path: `dispute`. Body, as JSON: the other inputs. Emits [`Dispute.decided`](/business/events/Dispute.decided).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `dispute` | [Dispute](/business/nouns/dispute) | Yes | The answered Dispute. |
| `decision` | `string` | Yes | One of `buyer`, `seller`, or `split`. |
| `reason` | `text` | Yes | Why, citing the Evidence and the contract term it turns on. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `dispute` | [Dispute](/business/nouns/dispute) | Yes | The decided Dispute. |

**Refuses when**

| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| The key is valid, but its scopes do not allow this operation. | [`forbidden`](/code/api/errors/forbidden) | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |

**Example**

```bash
curl -X POST https://api.sb/leaseline.app/disputes/dp_gywlshZJ7A/decide \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"decision":"buyer","reason":"Example reason"}'
```

```json
{
  "api": "https://api.sb/leaseline.app",
  "dispute": {
    "$id": "https://api.sb/leaseline.app/disputes/dp_gywlshZJ7A",
    "$type": "Dispute",
    "kind": "chargeback",
    "status": "decided",
    "held": {
      "amount": 29,
      "currency": "USD"
    },
    "reason": "Example reason"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Dispute.decide",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}
```