Переадресация
Управлять правилами и адресами переадресации. В примерах используется режим кода A2A. MCP предоставляет тот же режим кода через инструментexecute.
Функции
forwarding.activate
forwarding.activate(account_id: str, forwarding_id: str, active: bool) -> ForwardingRule
forwarding.activate.
| Свойство | Значение | Свойство | Значение |
|---|---|---|---|
| Требуемое разрешение | forwarding.manage | Требуется аутентификация | да |
| Режим выполнения | sync | Возможность | forwarding.manage |
| Тип ресурса | account | Поле ID ресурса | account_id |
| Публичный маршрут API | PATCH /v1/public/accounts/{account_id}/forwarding/{forwarding_id}/active |
Аргументы
Аргументы
| Имя | Тип | Обязательный |
|---|---|---|
account_id | str | да |
forwarding_id | str | да |
active | bool | да |
Возвращает
Возвращает
| Поле | Тип | Обязательный |
|---|---|---|
active | bool | да |
created_at | str | да |
id | str | да |
scope_id | str | да |
scope_type | "account" | "workspace" | "domain" | да |
target_email | str | да |
updated_at | str | да |
verification_required | bool | да |
verification_state | "internal" | "pending" | "verified" | "expired" | да |
verification_expires_at | str | null | нет |
verification_sent_at | str | null | нет |
verification_verified_at | str | null | нет |
Пример A2A
Пример A2A
Запрос:Ответ:
{
"request_id": "example",
"session_id": "session_123",
"code": "forwarding.activate(account_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", forwarding_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", active=true)"
}
{
"request_id": "example",
"status": "completed",
"result": {
"last_value": true
},
"responses": [
{
"index": 0,
"function": "forwarding.activate",
"status": "completed",
"result": true
}
],
"complexity_score": 1
}
Пример MCP
Пример MCP
Запрос:Ответ:
{
"jsonrpc": "2.0",
"id": "example",
"method": "tools/call",
"params": {
"name": "hybridbox_execute",
"arguments": {
"code": "forwarding.activate(account_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", forwarding_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", active=true)"
}
}
}
{
"jsonrpc": "2.0",
"id": "example",
"result": {
"content": [
{
"type": "text",
"text": "{\n \"request_id\": \"example\",\n \"status\": \"completed\",\n \"result\": {\n \"last_value\": true\n },\n \"responses\": [\n {\n \"index\": 0,\n \"function\": \"forwarding.activate\",\n \"status\": \"completed\",\n \"result\": true\n }\n ],\n \"complexity_score\": 1\n}"
}
],
"isError": false
}
}
forwarding.add
forwarding.add(account_id: str, target_email: str, domain?: str | null, workspace_id?: str | null) -> ForwardingRule
forwarding.add.
| Свойство | Значение | Свойство | Значение |
|---|---|---|---|
| Требуемое разрешение | forwarding.manage | Требуется аутентификация | да |
| Режим выполнения | sync | Возможность | forwarding.manage |
| Тип ресурса | account | Поле ID ресурса | account_id |
| Публичный маршрут API | POST /v1/public/accounts/{account_id}/forwarding |
Аргументы
Аргументы
| Имя | Тип | Обязательный |
|---|---|---|
account_id | str | да |
target_email | str | да |
domain | str | null | нет |
workspace_id | str | null | нет |
Возвращает
Возвращает
| Поле | Тип | Обязательный |
|---|---|---|
active | bool | да |
created_at | str | да |
id | str | да |
scope_id | str | да |
scope_type | "account" | "workspace" | "domain" | да |
target_email | str | да |
updated_at | str | да |
verification_required | bool | да |
verification_state | "internal" | "pending" | "verified" | "expired" | да |
verification_expires_at | str | null | нет |
verification_sent_at | str | null | нет |
verification_verified_at | str | null | нет |
Пример A2A
Пример A2A
Запрос:Ответ:
{
"request_id": "example",
"session_id": "session_123",
"code": "forwarding.add(account_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", target_email=\"user@example.com\", domain=\"example.com\", workspace_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\")"
}
{
"request_id": "example",
"status": "completed",
"result": {
"last_value": true
},
"responses": [
{
"index": 0,
"function": "forwarding.add",
"status": "completed",
"result": true
}
],
"complexity_score": 1
}
Пример MCP
Пример MCP
Запрос:Ответ:
{
"jsonrpc": "2.0",
"id": "example",
"method": "tools/call",
"params": {
"name": "hybridbox_execute",
"arguments": {
"code": "forwarding.add(account_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", target_email=\"user@example.com\", domain=\"example.com\", workspace_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\")"
}
}
}
{
"jsonrpc": "2.0",
"id": "example",
"result": {
"content": [
{
"type": "text",
"text": "{\n \"request_id\": \"example\",\n \"status\": \"completed\",\n \"result\": {\n \"last_value\": true\n },\n \"responses\": [\n {\n \"index\": 0,\n \"function\": \"forwarding.add\",\n \"status\": \"completed\",\n \"result\": true\n }\n ],\n \"complexity_score\": 1\n}"
}
],
"isError": false
}
}
forwarding.delete
forwarding.delete(account_id: str, forwarding_id: str) -> {}
forwarding.delete.
| Свойство | Значение | Свойство | Значение |
|---|---|---|---|
| Требуемое разрешение | forwarding.manage | Требуется аутентификация | да |
| Режим выполнения | sync | Возможность | forwarding.manage |
| Тип ресурса | account | Поле ID ресурса | account_id |
| Публичный маршрут API | DELETE /v1/public/accounts/{account_id}/forwarding/{forwarding_id} |
Аргументы
Аргументы
| Имя | Тип | Обязательный |
|---|---|---|
account_id | str | да |
forwarding_id | str | да |
Возвращает
Возвращает
| Поле | Тип | Обязательный |
|---|---|---|
result | {} | да |
Пример A2A
Пример A2A
Запрос:Ответ:
{
"request_id": "example",
"session_id": "session_123",
"code": "forwarding.delete(account_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", forwarding_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\")"
}
{
"request_id": "example",
"status": "completed",
"result": {
"last_value": {}
},
"responses": [
{
"index": 0,
"function": "forwarding.delete",
"status": "completed",
"result": {}
}
],
"complexity_score": 1
}
Пример MCP
Пример MCP
Запрос:Ответ:
{
"jsonrpc": "2.0",
"id": "example",
"method": "tools/call",
"params": {
"name": "hybridbox_execute",
"arguments": {
"code": "forwarding.delete(account_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", forwarding_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\")"
}
}
}
{
"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\": \"forwarding.delete\",\n \"status\": \"completed\",\n \"result\": {}\n }\n ],\n \"complexity_score\": 1\n}"
}
],
"isError": false
}
}
forwarding.list
forwarding.list(account_id: str, page?: int, page_size?: int) -> Page[ForwardingRule]
forwarding.list.
| Свойство | Значение | Свойство | Значение |
|---|---|---|---|
| Требуемое разрешение | forwarding.view | Требуется аутентификация | да |
| Режим выполнения | sync | Возможность | forwarding.view |
| Тип ресурса | account | Поле ID ресурса | account_id |
| Публичный маршрут API | GET /v1/public/accounts/{account_id}/forwarding |
Аргументы
Аргументы
| Имя | Тип | Обязательный |
|---|---|---|
account_id | str | да |
page | int | нет |
page_size | int | нет |
Возвращает
Возвращает
| Поле | Тип | Обязательный |
|---|---|---|
items | [{"active": bool, "created_at": str, "id": str, "scope_id": str, "scope_type": "account" | "workspace" | "domain", "target_email": str, "updated_at": str, "verification_required": bool, "verification_state": "internal" | "pending" | "verified" | "expired", "verification_expires_at"?: str | null, "verification_sent_at"?: str | null, "verification_verified_at"?: str | null}] | да |
page | int | да |
page_size | int | да |
total | int | да |
Пример A2A
Пример A2A
Запрос:Ответ:
{
"request_id": "example",
"session_id": "session_123",
"code": "forwarding.list(account_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", page=123, page_size=123)"
}
{
"request_id": "example",
"status": "completed",
"result": {
"last_value": true
},
"responses": [
{
"index": 0,
"function": "forwarding.list",
"status": "completed",
"result": true
}
],
"complexity_score": 1
}
Пример MCP
Пример MCP
Запрос:Ответ:
{
"jsonrpc": "2.0",
"id": "example",
"method": "tools/call",
"params": {
"name": "hybridbox_execute",
"arguments": {
"code": "forwarding.list(account_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", page=123, page_size=123)"
}
}
}
{
"jsonrpc": "2.0",
"id": "example",
"result": {
"content": [
{
"type": "text",
"text": "{\n \"request_id\": \"example\",\n \"status\": \"completed\",\n \"result\": {\n \"last_value\": true\n },\n \"responses\": [\n {\n \"index\": 0,\n \"function\": \"forwarding.list\",\n \"status\": \"completed\",\n \"result\": true\n }\n ],\n \"complexity_score\": 1\n}"
}
],
"isError": false
}
}
forwarding.update
forwarding.update(account_id: str, forwarding_id: str, target_email: str) -> ForwardingRule
forwarding.update.
| Свойство | Значение | Свойство | Значение |
|---|---|---|---|
| Требуемое разрешение | forwarding.manage | Требуется аутентификация | да |
| Режим выполнения | sync | Возможность | forwarding.manage |
| Тип ресурса | account | Поле ID ресурса | account_id |
| Публичный маршрут API | PATCH /v1/public/accounts/{account_id}/forwarding/{forwarding_id} |
Аргументы
Аргументы
| Имя | Тип | Обязательный |
|---|---|---|
account_id | str | да |
forwarding_id | str | да |
target_email | str | да |
Возвращает
Возвращает
| Поле | Тип | Обязательный |
|---|---|---|
active | bool | да |
created_at | str | да |
id | str | да |
scope_id | str | да |
scope_type | "account" | "workspace" | "domain" | да |
target_email | str | да |
updated_at | str | да |
verification_required | bool | да |
verification_state | "internal" | "pending" | "verified" | "expired" | да |
verification_expires_at | str | null | нет |
verification_sent_at | str | null | нет |
verification_verified_at | str | null | нет |
Пример A2A
Пример A2A
Запрос:Ответ:
{
"request_id": "example",
"session_id": "session_123",
"code": "forwarding.update(account_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", forwarding_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", target_email=\"user@example.com\")"
}
{
"request_id": "example",
"status": "completed",
"result": {
"last_value": true
},
"responses": [
{
"index": 0,
"function": "forwarding.update",
"status": "completed",
"result": true
}
],
"complexity_score": 1
}
Пример MCP
Пример MCP
Запрос:Ответ:
{
"jsonrpc": "2.0",
"id": "example",
"method": "tools/call",
"params": {
"name": "hybridbox_execute",
"arguments": {
"code": "forwarding.update(account_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", forwarding_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", target_email=\"user@example.com\")"
}
}
}
{
"jsonrpc": "2.0",
"id": "example",
"result": {
"content": [
{
"type": "text",
"text": "{\n \"request_id\": \"example\",\n \"status\": \"completed\",\n \"result\": {\n \"last_value\": true\n },\n \"responses\": [\n {\n \"index\": 0,\n \"function\": \"forwarding.update\",\n \"status\": \"completed\",\n \"result\": true\n }\n ],\n \"complexity_score\": 1\n}"
}
],
"isError": false
}
}
forwarding.verification.confirm
forwarding.verification.confirm(account_id: str, forwarding_id: str, code: str) -> ForwardingRule
forwarding.verification.confirm.
| Свойство | Значение | Свойство | Значение |
|---|---|---|---|
| Требуемое разрешение | forwarding.manage | Требуется аутентификация | да |
| Режим выполнения | sync | Возможность | forwarding.manage |
| Тип ресурса | account | Поле ID ресурса | account_id |
| Публичный маршрут API | POST /v1/public/accounts/{account_id}/forwarding/{forwarding_id}/verification/confirm |
Аргументы
Аргументы
| Имя | Тип | Обязательный |
|---|---|---|
account_id | str | да |
forwarding_id | str | да |
code | str | да |
Возвращает
Возвращает
| Поле | Тип | Обязательный |
|---|---|---|
verified | bool | да |
forwarding_id | str | null | нет |
Пример A2A
Пример A2A
Запрос:Ответ:
{
"request_id": "example",
"session_id": "session_123",
"code": "forwarding.verification.confirm(account_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", forwarding_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", code=\"<string>\")"
}
{
"request_id": "example",
"status": "completed",
"result": {
"last_value": true
},
"responses": [
{
"index": 0,
"function": "forwarding.verification.confirm",
"status": "completed",
"result": true
}
],
"complexity_score": 1
}
Пример MCP
Пример MCP
Запрос:Ответ:
{
"jsonrpc": "2.0",
"id": "example",
"method": "tools/call",
"params": {
"name": "hybridbox_execute",
"arguments": {
"code": "forwarding.verification.confirm(account_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", forwarding_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", code=\"<string>\")"
}
}
}
{
"jsonrpc": "2.0",
"id": "example",
"result": {
"content": [
{
"type": "text",
"text": "{\n \"request_id\": \"example\",\n \"status\": \"completed\",\n \"result\": {\n \"last_value\": true\n },\n \"responses\": [\n {\n \"index\": 0,\n \"function\": \"forwarding.verification.confirm\",\n \"status\": \"completed\",\n \"result\": true\n }\n ],\n \"complexity_score\": 1\n}"
}
],
"isError": false
}
}
forwarding.verification.send
forwarding.verification.send(account_id: str, forwarding_id: str) -> ForwardingRule
forwarding.verification.send.
| Свойство | Значение | Свойство | Значение |
|---|---|---|---|
| Требуемое разрешение | forwarding.manage | Требуется аутентификация | да |
| Режим выполнения | sync | Возможность | forwarding.manage |
| Тип ресурса | account | Поле ID ресурса | account_id |
| Публичный маршрут API | POST /v1/public/accounts/{account_id}/forwarding/{forwarding_id}/verification/send |
Аргументы
Аргументы
| Имя | Тип | Обязательный |
|---|---|---|
account_id | str | да |
forwarding_id | str | да |
Возвращает
Возвращает
| Поле | Тип | Обязательный |
|---|---|---|
cooldown_seconds | int | да |
sent | bool | да |
expires_at | str | null | нет |
Пример A2A
Пример A2A
Запрос:Ответ:
{
"request_id": "example",
"session_id": "session_123",
"code": "forwarding.verification.send(account_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", forwarding_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\")"
}
{
"request_id": "example",
"status": "completed",
"result": {
"last_value": 123
},
"responses": [
{
"index": 0,
"function": "forwarding.verification.send",
"status": "completed",
"result": 123
}
],
"complexity_score": 1
}
Пример MCP
Пример MCP
Запрос:Ответ:
{
"jsonrpc": "2.0",
"id": "example",
"method": "tools/call",
"params": {
"name": "hybridbox_execute",
"arguments": {
"code": "forwarding.verification.send(account_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", forwarding_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\")"
}
}
}
{
"jsonrpc": "2.0",
"id": "example",
"result": {
"content": [
{
"type": "text",
"text": "{\n \"request_id\": \"example\",\n \"status\": \"completed\",\n \"result\": {\n \"last_value\": 123\n },\n \"responses\": [\n {\n \"index\": 0,\n \"function\": \"forwarding.verification.send\",\n \"status\": \"completed\",\n \"result\": 123\n }\n ],\n \"complexity_score\": 1\n}"
}
],
"isError": false
}
}