# Period routes: close, lock, recognize

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

> The Period Verbs close, lock, recognize as api.sb routes, with inputs, result, refusals and an example.

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

### Period.close
Close ends a month’s books once every Entry in the Period is reconciled, and makes its statements final. [Verb page](/business/nouns/period/close?interface=api).

```text
POST /{namespace}/periods/{period}/close
```

Path: `period`. Emits [`Period.closed`](/business/events/Period.closed).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `period` | [Period](/business/nouns/period) | Yes | The open Period. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `period` | [Period](/business/nouns/period) | Yes | The closed Period. |

**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/periods/period_VEVuYACTsH/close \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
```

```json
{
  "api": "https://api.sb/leaseline.app",
  "period": {
    "$id": "https://api.sb/leaseline.app/periods/period_VEVuYACTsH",
    "$type": "Period",
    "month": "2026-10-22",
    "status": "Closed"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Period.close",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}
```

### Period.lock
Lock seals a closed Period, so any later correction posts to the next open Period. [Verb page](/business/nouns/period/lock?interface=api).

```text
POST /{namespace}/periods/{period}/lock
```

Path: `period`. Emits [`Period.locked`](/business/events/Period.locked).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `period` | [Period](/business/nouns/period) | Yes | The closed Period. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `period` | [Period](/business/nouns/period) | Yes | The locked Period. |

**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/periods/period_VEVuYACTsH/lock \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
```

```json
{
  "api": "https://api.sb/leaseline.app",
  "period": {
    "$id": "https://api.sb/leaseline.app/periods/period_VEVuYACTsH",
    "$type": "Period",
    "month": "2026-10-22",
    "status": "Locked"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Period.lock",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}
```

### Period.recognize
Recognize moves the revenue a Period earned out of deferred revenue, by the Startup’s revenue-recognition Policy. [Verb page](/business/nouns/period/recognize?interface=api).

```text
POST /{namespace}/periods/{period}/recognize
```

Path: `period`. Emits [`Period.recognized`](/business/events/Period.recognized).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `period` | [Period](/business/nouns/period) | Yes | The open Period to recognize. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `entries` | list of [Entry](/business/nouns/entry) | Yes | The recognition Entries it posted. |
| `period` | [Period](/business/nouns/period) | Yes | The Period whose revenue was recognized. |

**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/periods/period_VEVuYACTsH/recognize \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
```

```json
{
  "api": "https://api.sb/leaseline.app",
  "entries": [
    {
      "$id": "https://api.sb/leaseline.app/entries/entry_syZbJCW683",
      "$type": "Entry",
      "account": "cash",
      "amount": {
        "amount": 29,
        "currency": "USD"
      },
      "direction": "debit",
      "startup": "startup_l3hr1EnUGY"
    }
  ],
  "period": {
    "$id": "https://api.sb/leaseline.app/periods/period_VEVuYACTsH",
    "$type": "Period",
    "month": "2026-10-22",
    "status": "Open"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Period.recognize",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}
```