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

# Format raw alert webhook events (deprecated)

> **Deprecated.** Use the alert webhooks endpoints instead.

Formats a raw webhook request body for wallet events, which may include
one or many transactions at once.




## OpenAPI

````yaml /openapi/custodian-api.yaml post /custodians/me/alerts/format
openapi: 3.1.0
info:
  title: Portal Custodian API
  version: '3.0'
  description: >
    The Portal Custodian API provides endpoints for managing clients, building
    transactions,

    retrieving wallet data, managing delegations, alert webhooks, and gas
    sponsorship.

    All endpoints require authentication via a Portal API Key (also known as a
    Custodian API Key)

    passed as a Bearer token.


    ## Base URL

    `https://api.portalhq.io/api/v3`


    ## Authentication

    Include your Portal API Key as a Bearer token in the `Authorization` header
    of every request.


    ## Chain ID Format

    Chain parameters use either friendly names (e.g. `ethereum`, `solana`) or
    CAIP-2 format

    (e.g. `eip155:1`, `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp`). When using
    CAIP-2 format

    in URLs, ensure the colon is URI-encoded (`%3A`).
servers:
  - url: https://api.portalhq.io/api/v3
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Clients
    description: Create and manage Portal clients
  - name: Transactions
    description: Build and evaluate blockchain transactions
  - name: Wallet Metadata
    description: Retrieve wallet balances and NFTs
  - name: Wallet Shares
    description: Manage backup shares and wallet ejection
  - name: Delegations
    description: Manage token delegations and delegated transfers
  - name: Session Keys
    description: Build and send EIP-7702 session key user operations
  - name: Alert Webhooks
    description: Manage alert webhooks, external addresses, and replay failed events
  - name: Gas Sponsorship
    description: View and manage gas sponsorship across chains
paths:
  /custodians/me/alerts/format:
    post:
      tags:
        - Alert Webhooks
      summary: Format raw alert webhook events (deprecated)
      description: |
        **Deprecated.** Use the alert webhooks endpoints instead.

        Formats a raw webhook request body for wallet events, which may include
        one or many transactions at once.
      operationId: formatAlerts
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FormatAlertRequest'
            example:
              chain: eip155
              rawAlert: '{"..."}'
      responses:
        '200':
          description: Alerts formatted successfully
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/FormattedAlertResponse'
              example:
                - chainName: sepolia
                  chainId: eip155:11155111
                  from: '0xf428e1f82f18de15ef2861a4bdde42e755998ece'
                  to: '0xdfd8302f44727a6348f702ff7b594f127de3a902'
                  amount: '0.001'
                  tokenSymbol: USDC
                  assetType: NON_NATIVE_TOKEN
                  direction: OUTBOUND
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - invalid or missing authentication token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      deprecated: true
components:
  schemas:
    FormatAlertRequest:
      type: object
      required:
        - chain
        - rawAlert
      properties:
        chain:
          type: string
          description: The chain the raw webhook event is from (e.g. "eip155").
        rawAlert:
          type: string
          description: The stringified raw webhook event.
    FormattedAlertResponse:
      type: object
      properties:
        chainName:
          type: string
        chainId:
          type: string
        from:
          type: string
        to:
          type: string
        amount:
          type: string
        tokenSymbol:
          type: string
        assetType:
          type: string
        direction:
          type: string
        metadata:
          type: object
          properties:
            confirmed:
              type: boolean
            rawAmount:
              type: string
            tokenDecimals:
              type: string
            tokenAddress:
              type: string
            tokenName:
              type: string
            sentAt:
              type: string
              format: date-time
            transactionHash:
              type: string
            blockNumber:
              type: string
            fee:
              type: object
              properties:
                amount:
                  type: string
                decimals:
                  type: integer
                rawAmount:
                  type: string
                tokenSymbol:
                  type: string
            nftTokenId:
              type: string
              nullable: true
            triggeredBy:
              type: string
            userOperationHash:
              type: string
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Error message describing what went wrong
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |
        Portal API Key (Custodian API Key). Pass as a Bearer token in the
        Authorization header.

````