> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hybridbox.io/llms.txt
> Use this file to discover all available pages before exploring further.

# 设置转发为活动

> 暂停或恢复客户转发规则。

<script src="/locale-bridge.js" />


## OpenAPI

````yaml /openapi.zh-cn.json PATCH /v1/public/accounts/{account_id}/forwarding/{forwarding_id}/active
openapi: 3.1.0
info:
  title: Code API (Public)
  version: 1.0.0
servers:
  - url: https://api.hybridbox.io
security: []
paths:
  /v1/public/accounts/{account_id}/forwarding/{forwarding_id}/active:
    patch:
      tags:
        - public-accounts
        - public-forwarding
      summary: 设置转发为活动
      description: 暂停或恢复客户转发规则。
      operationId: >-
        set_public_forwarding_active_v1_public_accounts__account_id__forwarding__forwarding_id__active_patch
      parameters:
        - in: path
          name: account_id
          required: true
          schema:
            format: uuid
            title: Account Id
            type: string
        - in: path
          name: forwarding_id
          required: true
          schema:
            format: uuid
            title: Forwarding Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ForwardingSetActiveRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForwardingDTO'
          description: ''
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: 验证错误
      security:
        - PublicBearerAuth: []
components:
  schemas:
    ForwardingSetActiveRequest:
      description: 暂停或恢复转发的请求。
      properties:
        active:
          description: 是否应激活转发
          title: 活动
          type: boolean
      required:
        - active
      title: ForwardingSetActiveRequest
      type: object
    ForwardingDTO:
      properties:
        active:
          description: 转发是否活跃
          title: 活动
          type: boolean
        created_at:
          description: 转发规则创建时间戳
          title: 创建时间
          type: string
        id:
          description: 转发规则 UUID
          format: uuid
          title: ID
          type: string
        scope_id:
          description: 转发范围的资源 UUID
          format: uuid
          title: 范围 Id
          type: string
        scope_type:
          description: 转发规则的资源范围类型
          enum:
            - account
            - workspace
            - domain
          title: 范围类型
          type: string
        target_email:
          description: 转发目标电子邮件地址
          title: 目标电子邮件
          type: string
        updated_at:
          description: 转发规则最后更新时间戳
          title: 更新时间
          type: string
        verification_expires_at:
          anyOf:
            - type: string
            - type: 'null'
          description: 验证到期时间戳
          title: 验证过期时间
        verification_required:
          description: 是否需要收件人验证
          title: 需要验证
          type: boolean
        verification_sent_at:
          anyOf:
            - type: string
            - type: 'null'
          description: 验证邮件发送时间戳
          title: 验证发送时间
        verification_state:
          description: 收件人验证状态
          enum:
            - internal
            - pending
            - verified
            - expired
          title: 验证状态
          type: string
        verification_verified_at:
          anyOf:
            - type: string
            - type: 'null'
          description: 验证完成时间戳
          title: 验证确认时间
      required:
        - id
        - target_email
        - scope_type
        - scope_id
        - active
        - verification_state
        - verification_required
        - created_at
        - updated_at
      title: ForwardingDTO
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: 详情
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: 位置
          type: array
        msg:
          title: 消息
          type: string
        type:
          title: 错误类型
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    PublicBearerAuth:
      bearerFormat: JWT or Hybridbox Service account token
      description: >-
        Public API bearer credential sent as `Authorization: Bearer <token>`.
        Use either an OAuth access token or a Hybridbox Service account token.
      scheme: bearer
      type: http

````