# Agent routes: mint, pause, resume, retire

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

> The Agent Verbs mint, pause, resume, retire as api.sb routes, with inputs, result, refusals and an example.

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

### Agent.mint
Mint creates an Agent in a Customer’s Tenant from an Agent Product the Customer bought. [Verb page](/business/nouns/agent/mint?interface=api).

```text
POST /{namespace}/agents/mint
```

Body, as JSON: the inputs. Emits [`Agent.minted`](/business/events/Agent.minted).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `tenant` | [Tenant](/business/nouns/tenant) | Yes | The Customer’s Tenant. |
| `product` | [Product](/business/nouns/product) | Yes | The Agent Product. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `agent` | [Agent](/business/nouns/agent) | Yes | The Customer’s own Agent. |

**Refuses when**

| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| The operation is part of an Offer the caller has not accepted or paid for. | [`payment-required`](/code/api/errors/payment-required) | Accept the Offer named in the response, then retry the call. | [Offer.accept](/business/nouns/offer/accept) |
| 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/agents/mint \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"tenant":"ten_Bu63f0he26","product":"prod_MJmgS5dysq"}'
```

```json
{
  "api": "https://api.sb/leaseline.app",
  "agent": {
    "$id": "https://api.sb/leaseline.app/agents/agent_02y6sojE6k",
    "$type": "Agent",
    "instructions": "Example instructions",
    "model": "Example model",
    "status": "standby"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Agent.mint",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}
```

### Agent.pause
Pause stops one Agent, every Agent on a Team, or every customer-facing Agent from starting new Actions in a Startup. [Verb page](/business/nouns/agent/pause?interface=api).

```text
POST /{namespace}/agents/pause
```

Body, as JSON: the inputs. Emits [`Agent.paused`](/business/events/Agent.paused).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `agents` | list of [Agent](/business/nouns/agent) | No | The Agents to pause. Name one of `agents`, `team` or `customerFacing`. |
| `team` | [Team](/business/nouns/team) | No | Pause every Agent seated on this Team. |
| `customerFacing` | `boolean` | No | True pauses every Agent seated in a Role that answers a customer Channel. |
| `reason` | `text` | Yes | Why the Agents stop, shown to every watcher. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `agents` | list of [Agent](/business/nouns/agent) | Yes | Every Agent it paused; each emits its own `Agent.paused`. |

**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/agents/pause \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"agents":["agent_tCzKDMorKn"],"reason":"Example reason"}'
```

```json
{
  "api": "https://api.sb/leaseline.app",
  "agents": [
    {
      "$id": "https://api.sb/leaseline.app/agents/agent_tCzKDMorKn",
      "$type": "Agent",
      "instructions": "Write as the property manager’s assistant. Never promise a rent the manager has not set.",
      "model": "claude-opus-5-5",
      "status": "seated"
    }
  ],
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Agent.pause",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}
```

### Agent.resume
Resume restarts a paused Agent in every seat it holds, with its Memory, Mandates and Limits unchanged. [Verb page](/business/nouns/agent/resume?interface=api).

```text
POST /{namespace}/agents/{agent}/resume
```

Path: `agent`. Emits [`Agent.resumed`](/business/events/Agent.resumed).

**Inputs**

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

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `agent` | [Agent](/business/nouns/agent) | Yes | The working Agent. |

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

```json
{
  "api": "https://api.sb/leaseline.app",
  "agent": {
    "$id": "https://api.sb/leaseline.app/agents/agent_tCzKDMorKn",
    "$type": "Agent",
    "instructions": "Write as the property manager’s assistant. Never promise a rent the manager has not set.",
    "model": "claude-opus-5-5",
    "status": "seated"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Agent.resume",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}
```

### Agent.retire
Retire removes an Agent from every seat in a Startup for good and keeps its Actions, Memory and Mailbox history on the record. [Verb page](/business/nouns/agent/retire?interface=api).

```text
POST /{namespace}/agents/{agent}/retire
```

Path: `agent`. Body, as JSON: the other inputs. Emits [`Agent.retired`](/business/events/Agent.retired).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `agent` | [Agent](/business/nouns/agent) | Yes | The Agent to retire. |
| `reason` | `text` | Yes | Why it leaves. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `agent` | [Agent](/business/nouns/agent) | Yes | The retired Agent. |

**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/agents/agent_tCzKDMorKn/retire \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"reason":"Example reason"}'
```

```json
{
  "api": "https://api.sb/leaseline.app",
  "agent": {
    "$id": "https://api.sb/leaseline.app/agents/agent_tCzKDMorKn",
    "$type": "Agent",
    "instructions": "Write as the property manager’s assistant. Never promise a rent the manager has not set.",
    "model": "claude-opus-5-5",
    "status": "retired"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Agent.retire",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}
```