> ## 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.

# Create Forwarding

> Create a forwarding rule under the path account.

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


## OpenAPI

````yaml /openapi.en.json POST /v1/public/accounts/{account_id}/forwarding
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:
    post:
      tags:
        - public-accounts
        - public-forwarding
      summary: Create Forwarding
      description: Create a forwarding rule under the path account.
      operationId: create_public_forwarding_v1_public_accounts__account_id__forwarding_post
      parameters:
        - in: path
          name: account_id
          required: true
          schema:
            format: uuid
            title: Account Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountForwardingCreateRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForwardingDTO'
          description: ''
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - PublicBearerAuth: []
components:
  schemas:
    AccountForwardingCreateRequest:
      additionalProperties: false
      description: Request to create a forwarding rule under an account path scope.
      properties:
        domain:
          anyOf:
            - type: string
            - type: 'null'
          description: Domain UUID or domain name scope for the forwarding rule
          title: Domain
        target_email:
          description: Forwarding destination email address
          format: email
          title: Target Email
          type: string
        workspace_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          description: Workspace UUID scope for the forwarding rule
          title: Workspace Id
      required:
        - target_email
      title: AccountForwardingCreateRequest
      type: object
    ForwardingDTO:
      properties:
        active:
          description: Whether forwarding is active
          title: Active
          type: boolean
        created_at:
          description: Forwarding rule creation timestamp
          title: Created At
          type: string
        id:
          description: Forwarding rule UUID
          format: uuid
          title: Id
          type: string
        scope_id:
          description: Resource UUID for the forwarding scope
          format: uuid
          title: Scope Id
          type: string
        scope_type:
          description: Resource scope type for the forwarding rule
          enum:
            - account
            - workspace
            - domain
          title: Scope Type
          type: string
        target_email:
          description: Forwarding destination email address
          title: Target Email
          type: string
        updated_at:
          description: Forwarding rule last update timestamp
          title: Updated At
          type: string
        verification_expires_at:
          anyOf:
            - type: string
            - type: 'null'
          description: Verification expiry timestamp
          title: Verification Expires At
        verification_required:
          description: Whether recipient verification is required
          title: Verification Required
          type: boolean
        verification_sent_at:
          anyOf:
            - type: string
            - type: 'null'
          description: Verification email sent timestamp
          title: Verification Sent At
        verification_state:
          description: Recipient verification state
          enum:
            - internal
            - pending
            - verified
            - expired
          title: Verification State
          type: string
        verification_verified_at:
          anyOf:
            - type: string
            - type: 'null'
          description: Verification completion timestamp
          title: Verification Verified At
      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: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          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

````