# Hypothesis routes: drop, test

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

> The Hypothesis Verbs drop, test as api.sb routes, with inputs, result, refusals and an example.

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

### Hypothesis.drop
Drop retires a Hypothesis from active work and keeps it, with its Evidence, on record. [Verb page](/business/nouns/hypothesis/drop?interface=api).

```text
POST /{namespace}/hypotheses/{hypothesis}/drop
```

Path: `hypothesis`. Body, as JSON: the other inputs. Emits [`Hypothesis.dropped`](/business/events/Hypothesis.dropped).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `hypothesis` | [Hypothesis](/business/nouns/hypothesis) | Yes | The Hypothesis to retire. |
| `reason` | `text` | Yes | Why it is dropped. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `hypothesis` | [Hypothesis](/business/nouns/hypothesis) | Yes | The dropped Hypothesis. |

**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. |
| The record is not in a state that allows this Verb, so the call is refused. | [`refused`](/code/api/errors/refused) | Read the record, run the Verb that moves it to an allowed state, then retry. | None. |

**Example**

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

```json
{
  "api": "https://api.sb/leaseline.app",
  "hypothesis": {
    "$id": "https://api.sb/leaseline.app/hypotheses/hypothesis_Z1gjx1kbtc",
    "$type": "Hypothesis",
    "statement": "Tracks lease renewals for small property managers.",
    "kind": "founding",
    "verdict": "Open",
    "version": 1
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Hypothesis.drop",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}
```

### Hypothesis.test
Test binds a Hypothesis to the Experiment that decides it and moves the Hypothesis to testing. [Verb page](/business/nouns/hypothesis/test?interface=api).

```text
POST /{namespace}/hypotheses/{hypothesis}/test
```

Path: `hypothesis`. Body, as JSON: the other inputs. Emits [`Hypothesis.tested`](/business/events/Hypothesis.tested).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `hypothesis` | [Hypothesis](/business/nouns/hypothesis) | Yes | The Hypothesis to test. |
| `experiment` | [Experiment](/business/nouns/experiment) | Yes | The Experiment that decides it. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `hypothesis` | [Hypothesis](/business/nouns/hypothesis) | Yes | The Hypothesis, now testing. |

**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. |
| The record is not in a state that allows this Verb, so the call is refused. | [`refused`](/code/api/errors/refused) | Read the record, run the Verb that moves it to an allowed state, then retry. | None. |

**Example**

```bash
curl -X POST https://api.sb/leaseline.app/hypotheses/hypothesis_Z1gjx1kbtc/test \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"experiment":"experiment_IyIJJPngKt"}'
```

```json
{
  "api": "https://api.sb/leaseline.app",
  "hypothesis": {
    "$id": "https://api.sb/leaseline.app/hypotheses/hypothesis_Z1gjx1kbtc",
    "$type": "Hypothesis",
    "statement": "Tracks lease renewals for small property managers.",
    "kind": "founding",
    "verdict": "Open",
    "version": 1
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Hypothesis.test",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}
```