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

# Forward direct email signal

> Internal endpoint on `email-worker`. Accepts a JSON body
containing the email `text` or `body`, parses it for a trade
signal, and forwards to `trade-worker`. Use this for
programmatic email-to-signal pipelines that bypass the
Mailgun webhook.




## OpenAPI

````yaml /docs/openapi-minimal.yaml post /email-signal
openapi: 3.0.3
info:
  title: Hoox API
  description: |
    REST API for the Hoox algorithmic trading platform.

    Ingest trade signals, check system health, and manage DeFi wallet
    operations on the Cloudflare edge. All requests are handled by the
    Hoox gateway worker (`workers/hoox`) running at the network edge.
  version: 1.0.0
  contact:
    name: Hoox Support
    email: support@hoox.sh
servers:
  - url: https://api.hoox.sh
    description: Production API
  - url: https://staging.hoox.sh
    description: Staging environment
security: []
paths:
  /email-signal:
    post:
      tags:
        - Email
      summary: Forward direct email signal
      description: |
        Internal endpoint on `email-worker`. Accepts a JSON body
        containing the email `text` or `body`, parses it for a trade
        signal, and forwards to `trade-worker`. Use this for
        programmatic email-to-signal pipelines that bypass the
        Mailgun webhook.
      operationId: emailSignal
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                subject:
                  type: string
                  example: BTC Long entry
                text:
                  type: string
                  example: 'exchange: binance, action: buy, symbol: BTCUSDT, qty: 0.002'
                body:
                  type: string
                  description: Alias for `text`
      responses:
        '200':
          description: Signal forwarded to trade-worker
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  requestId:
                    type: string
                    format: uuid
                    example: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d
        '400':
          description: No valid signal found in payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Internal authentication missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: |
            Failed to forward signal to `trade-worker` (service binding
            unavailable, invalid configuration, or upstream error).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        requestId:
          type: string
          format: uuid
          description: Request trace identifier
          example: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d
        error:
          type: string
          description: Human-readable error description
          example: Invalid JSON payload structure.

````