# Master passwords

Create, list, rename, and delete scoped master passwords. Master passwords are additional SMTP mailbox login passwords that can apply to every mailbox in an account, workspace, or domain scope. They are separate from Hybridbox user login passwords and are not used for encryption.

The examples use A2A code mode. MCP exposes the same code mode through its `execute` tool.

## Functions

### `credentials.add`

```text
credentials.add(account_id: str, name: str, domain?: str | null, generate?: bool, value?: str | null, workspace_id?: str | null) -> MasterPassword
```

Create master passwords.

| Property | Value | Property | Value |
| --- | --- | --- | --- |
| Requires permission | `credential.manage` | Auth required | `yes` |
| Execution mode | `sync` | Capability | `credential.manage` |
| Resource type | `account` | Resource ID field | `account_id` |
| Public API route | `POST /v1/public/accounts/{account_id}/credentials` |  |  |

  

### Arguments

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `account_id` | `str` | yes | Account UUID from the route path |
| `name` | `str` | yes | Master password display name |
| `domain` | `str \| null` | no | Domain UUID or domain name scope for the master password |
| `generate` | `bool` | no | Generate a master password secret instead of supplying one |
| `value` | `str \| null` | no | Master password secret value when not generated |
| `workspace_id` | `str \| null` | no | Workspace UUID scope for the master password |

  
  

### Returns

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `created_at` | `str` | yes | Master password creation timestamp |
| `id` | `str` | yes | Master password UUID |
| `name` | `str` | yes | Master password display name |
| `scope_id` | `str` | yes | Resource UUID for the master password scope |
| `scope_type` | `"account" \| "workspace" \| "domain"` | yes | Resource scope type where the master password applies |
| `updated_at` | `str` | yes | Master password last update timestamp |
| `generated_secret` | `str \| null` | no | One-time generated master password secret, when requested |

  
  

### A2A example

Request:

```json
{
  "request_id": "example",
  "session_id": "session_123",
  "code": "credentials.add(account_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", name=\"<string>\", domain=\"example.com\", generate=true, value=\"<string>\", workspace_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\")"
}
```

Response:

```json
{
  "request_id": "example",
  "status": "completed",
  "result": {
    "last_value": "<string>"
  },
  "responses": [
    {
      "index": 0,
      "function": "credentials.add",
      "status": "completed",
      "result": "<string>"
    }
  ],
  "complexity_score": 1
}
```

  
  

### MCP example

Request:

```json
{
  "jsonrpc": "2.0",
  "id": "example",
  "method": "tools/call",
  "params": {
    "name": "hybridbox_execute",
    "arguments": {
      "code": "credentials.add(account_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", name=\"<string>\", domain=\"example.com\", generate=true, value=\"<string>\", workspace_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\")"
    }
  }
}
```

Response:

```json
{
  "jsonrpc": "2.0",
  "id": "example",
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\n  \"request_id\": \"example\",\n  \"status\": \"completed\",\n  \"result\": {\n    \"last_value\": \"<string>\"\n  },\n  \"responses\": [\n    {\n      \"index\": 0,\n      \"function\": \"credentials.add\",\n      \"status\": \"completed\",\n      \"result\": \"<string>\"\n    }\n  ],\n  \"complexity_score\": 1\n}"
      }
    ],
    "isError": false
  }
}
```

  

### `credentials.delete`

```text
credentials.delete(account_id: str, credential_id: str) -> {}
```

Delete master passwords.

| Property | Value | Property | Value |
| --- | --- | --- | --- |
| Requires permission | `credential.manage` | Auth required | `yes` |
| Execution mode | `sync` | Capability | `credential.manage` |
| Resource type | `account` | Resource ID field | `account_id` |
| Public API route | `DELETE /v1/public/accounts/{account_id}/credentials/{credential_id}` |  |  |

  

### Arguments

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `account_id` | `str` | yes | Account UUID from the route path |
| `credential_id` | `str` | yes | Master password UUID from the route path |

  
  

### Returns

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `result` | `{}` | yes |  |

  
  

### A2A example

Request:

```json
{
  "request_id": "example",
  "session_id": "session_123",
  "code": "credentials.delete(account_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", credential_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\")"
}
```

Response:

```json
{
  "request_id": "example",
  "status": "completed",
  "result": {
    "last_value": {}
  },
  "responses": [
    {
      "index": 0,
      "function": "credentials.delete",
      "status": "completed",
      "result": {}
    }
  ],
  "complexity_score": 1
}
```

  
  

### MCP example

Request:

```json
{
  "jsonrpc": "2.0",
  "id": "example",
  "method": "tools/call",
  "params": {
    "name": "hybridbox_execute",
    "arguments": {
      "code": "credentials.delete(account_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", credential_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\")"
    }
  }
}
```

Response:

```json
{
  "jsonrpc": "2.0",
  "id": "example",
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\n  \"request_id\": \"example\",\n  \"status\": \"completed\",\n  \"result\": {\n    \"last_value\": {}\n  },\n  \"responses\": [\n    {\n      \"index\": 0,\n      \"function\": \"credentials.delete\",\n      \"status\": \"completed\",\n      \"result\": {}\n    }\n  ],\n  \"complexity_score\": 1\n}"
      }
    ],
    "isError": false
  }
}
```

  

### `credentials.list`

```text
credentials.list(account_id: str, page?: int, page_size?: int) -> Page[MasterPassword]
```

List master passwords.

| Property | Value | Property | Value |
| --- | --- | --- | --- |
| Requires permission | `credential.view` | Auth required | `yes` |
| Execution mode | `sync` | Capability | `credential.view` |
| Resource type | `account` | Resource ID field | `account_id` |
| Public API route | `GET /v1/public/accounts/{account_id}/credentials` |  |  |

  

### Arguments

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `account_id` | `str` | yes | Account UUID from the route path |
| `page` | `int` | no | One-based master password page number |
| `page_size` | `int` | no | Maximum master passwords per page |

  
  

### Returns

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `items` | `[{"created_at": str, "id": str, "name": str, "scope_id": str, "scope_type": "account" \| "workspace" \| "domain", "updated_at": str}]` | yes | Master passwords on this page |
| `page` | `int` | yes | Current one-based page number |
| `page_size` | `int` | yes | Maximum items per page |
| `total` | `int` | yes | Total matching master passwords |

  
  

### A2A example

Request:

```json
{
  "request_id": "example",
  "session_id": "session_123",
  "code": "credentials.list(account_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", page=123, page_size=123)"
}
```

Response:

```json
{
  "request_id": "example",
  "status": "completed",
  "result": {
    "last_value": "<string>"
  },
  "responses": [
    {
      "index": 0,
      "function": "credentials.list",
      "status": "completed",
      "result": "<string>"
    }
  ],
  "complexity_score": 1
}
```

  
  

### MCP example

Request:

```json
{
  "jsonrpc": "2.0",
  "id": "example",
  "method": "tools/call",
  "params": {
    "name": "hybridbox_execute",
    "arguments": {
      "code": "credentials.list(account_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", page=123, page_size=123)"
    }
  }
}
```

Response:

```json
{
  "jsonrpc": "2.0",
  "id": "example",
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\n  \"request_id\": \"example\",\n  \"status\": \"completed\",\n  \"result\": {\n    \"last_value\": \"<string>\"\n  },\n  \"responses\": [\n    {\n      \"index\": 0,\n      \"function\": \"credentials.list\",\n      \"status\": \"completed\",\n      \"result\": \"<string>\"\n    }\n  ],\n  \"complexity_score\": 1\n}"
      }
    ],
    "isError": false
  }
}
```

  

### `credentials.update`

```text
credentials.update(account_id: str, credential_id: str, name: str) -> MasterPassword
```

Update master passwords.

| Property | Value | Property | Value |
| --- | --- | --- | --- |
| Requires permission | `credential.manage` | Auth required | `yes` |
| Execution mode | `sync` | Capability | `credential.manage` |
| Resource type | `account` | Resource ID field | `account_id` |
| Public API route | `PATCH /v1/public/accounts/{account_id}/credentials/{credential_id}` |  |  |

  

### Arguments

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `account_id` | `str` | yes | Account UUID from the route path |
| `credential_id` | `str` | yes | Master password UUID from the route path |
| `name` | `str` | yes | Master password display name |

  
  

### Returns

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `created_at` | `str` | yes | Master password creation timestamp |
| `id` | `str` | yes | Master password UUID |
| `name` | `str` | yes | Master password display name |
| `scope_id` | `str` | yes | Resource UUID for the master password scope |
| `scope_type` | `"account" \| "workspace" \| "domain"` | yes | Resource scope type where the master password applies |
| `updated_at` | `str` | yes | Master password last update timestamp |

  
  

### A2A example

Request:

```json
{
  "request_id": "example",
  "session_id": "session_123",
  "code": "credentials.update(account_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", credential_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", name=\"<string>\")"
}
```

Response:

```json
{
  "request_id": "example",
  "status": "completed",
  "result": {
    "last_value": "<string>"
  },
  "responses": [
    {
      "index": 0,
      "function": "credentials.update",
      "status": "completed",
      "result": "<string>"
    }
  ],
  "complexity_score": 1
}
```

  
  

### MCP example

Request:

```json
{
  "jsonrpc": "2.0",
  "id": "example",
  "method": "tools/call",
  "params": {
    "name": "hybridbox_execute",
    "arguments": {
      "code": "credentials.update(account_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", credential_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", name=\"<string>\")"
    }
  }
}
```

Response:

```json
{
  "jsonrpc": "2.0",
  "id": "example",
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\n  \"request_id\": \"example\",\n  \"status\": \"completed\",\n  \"result\": {\n    \"last_value\": \"<string>\"\n  },\n  \"responses\": [\n    {\n      \"index\": 0,\n      \"function\": \"credentials.update\",\n      \"status\": \"completed\",\n      \"result\": \"<string>\"\n    }\n  ],\n  \"complexity_score\": 1\n}"
      }
    ],
    "isError": false
  }
}
```
