# Watch routes: pause, replay, resume, rotate

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

> The Watch Verbs pause, replay, resume, rotate as api.sb routes, with inputs, result, refusals and an example.

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

### Watch.pause
Pause stops a Watch delivering while its Events keep queuing; the platform pauses a Watch whose deliveries fail for three days. [Verb page](/business/nouns/watch/pause?interface=api).

```text
POST /{namespace}/watches/{watch}/pause
```

Path: `watch`. Body, as JSON: the other inputs. Emits [`Watch.paused`](/business/events/Watch.paused).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `watch` | [Watch](/business/nouns/watch) | Yes | The Watch to pause. |
| `reason` | `text` | No | Why deliveries stop. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `watch` | [Watch](/business/nouns/watch) | Yes | The paused Watch. |

**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/watches/watch_9o4vCuR17L/pause \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
```

```json
{
  "api": "https://api.sb/leaseline.app",
  "watch": {
    "$id": "https://api.sb/leaseline.app/watches/watch_9o4vCuR17L",
    "$type": "Watch",
    "selector": "Example selector",
    "url": "https://leaseline.app"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Watch.pause",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}
```

### Watch.replay
Replay redelivers a Watch’s Events from a chosen point, signed as they were the first time. [Verb page](/business/nouns/watch/replay?interface=api).

```text
POST /{namespace}/watches/{watch}/replay
```

Path: `watch`. Body, as JSON: the other inputs. Emits [`Watch.replayed`](/business/events/Watch.replayed).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `watch` | [Watch](/business/nouns/watch) | Yes | The Watch to replay. |
| `from` | `datetime` | Yes | Where the replay starts. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `watch` | [Watch](/business/nouns/watch) | Yes | The Watch, replaying. |

**Refuses when**

| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| The input does not match the schema of the operation. | [`invalid-input`](/code/api/errors/invalid-input) | Read the schema of the operation, then send every required field with the right type. | None. |
| 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/watches/watch_9o4vCuR17L/replay \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"from":"2026-10-22T12:00:00Z"}'
```

```json
{
  "api": "https://api.sb/leaseline.app",
  "watch": {
    "$id": "https://api.sb/leaseline.app/watches/watch_9o4vCuR17L",
    "$type": "Watch",
    "selector": "Example selector",
    "url": "https://leaseline.app"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Watch.replay",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}
```

### Watch.resume
Resume restarts a paused Watch and delivers the Events it held, oldest first. [Verb page](/business/nouns/watch/resume?interface=api).

```text
POST /{namespace}/watches/{watch}/resume
```

Path: `watch`. Emits [`Watch.resumed`](/business/events/Watch.resumed).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `watch` | [Watch](/business/nouns/watch) | Yes | The paused Watch. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `watch` | [Watch](/business/nouns/watch) | Yes | The Watch, delivering again. |

**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/watches/watch_9o4vCuR17L/resume \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
```

```json
{
  "api": "https://api.sb/leaseline.app",
  "watch": {
    "$id": "https://api.sb/leaseline.app/watches/watch_9o4vCuR17L",
    "$type": "Watch",
    "selector": "Example selector",
    "url": "https://leaseline.app"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Watch.resume",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}
```

### Watch.rotate
Rotate issues a new signing secret for a Watch and signs with both secrets until the old one expires. [Verb page](/business/nouns/watch/rotate?interface=api).

```text
POST /{namespace}/watches/{watch}/rotate
```

Path: `watch`. Body, as JSON: the other inputs. Emits [`Watch.rotated`](/business/events/Watch.rotated).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `watch` | [Watch](/business/nouns/watch) | Yes | The Watch whose secret changes. |
| `overlap` | `string` | No | How long the old secret keeps signing, as an ISO 8601 duration; defaults to `PT24H`. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `watch` | [Watch](/business/nouns/watch) | Yes | The Watch, signing with both secrets. |
| `secret` | `string` | Yes | The new signing secret, shown once. |

**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/watches/watch_9o4vCuR17L/rotate \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
```

```json
{
  "api": "https://api.sb/leaseline.app",
  "watch": {
    "$id": "https://api.sb/leaseline.app/watches/watch_9o4vCuR17L",
    "$type": "Watch",
    "selector": "Example selector",
    "url": "https://leaseline.app"
  },
  "secret": "Example secret",
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Watch.rotate",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}
```