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

# Generate metadata for Crosschain Bridge application

> Creates metadata configuration for bridging assets between different blockchain networks.



## OpenAPI

````yaml /api-reference/openapi.json post /action/builders/crosschain-bridge
openapi: 3.0.0
info:
  title: Relayer
  description: >-
    Relayer API — Kit-based crypto infrastructure for OTC exchange, wallet
    signing, payouts, and widget actions.
  version: '1.0'
  contact: {}
servers:
  - url: https://testnet.relayer.fi/v1
    description: Sandbox (testnet wallets, no real fiat)
  - url: https://api.relayer.fi/v1
    description: Production (mainnet wallets, regulated fiat rails)
security:
  - api-key: []
tags:
  - name: 'Action: Builders'
    description: Transaction metadata builders
  - name: 'Action: Directory'
    description: Widget directory
  - name: 'Action: Execute'
  - name: 'Action: Tokens'
    description: Token lists per chain/protocol
  - name: Addresses
  - name: Agents
  - name: App
    description: Application endpoints
  - name: 'Payout: Accounts'
    description: Payment execution
  - name: 'Payout: Off-ramp'
  - name: 'Payout: On-ramp'
  - name: 'Payout: Orders'
  - name: 'Payout: Recipients'
    description: Beneficiary management
  - name: Signing - Passkeys
  - name: Signing - Recovery
  - name: Signing Approvals
    description: Transaction signing approvals
  - name: Signing Policies
    description: Signing policy management
  - name: Transactions
    description: Transaction signing and broadcasting
  - name: Wallets
    description: Wallet and address management
paths:
  /action/builders/crosschain-bridge:
    post:
      tags:
        - 'Action: Builders'
      summary: Generate metadata for Crosschain Bridge application
      description: >-
        Creates metadata configuration for bridging assets between different
        blockchain networks.
      operationId: WidgetMetadataController_generateCrosschainBridgeMetadata
      parameters: []
      requestBody:
        required: true
        description: Parameters for generating crosschain bridge metadata
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CrossChainAppDto'
            examples:
              Bridge from Avalanche to Arbitrum:
                value:
                  title: Bridge USDC
                  description: Bridge USDC from Avalanche to Arbitrum
                  icon: https://example.com/usdc-icon.png
                  url: https://example.com/bridge
                  sourceChainId: 43114
                  destinationChainId: 42161
                  address: '0xb00D916688FEE4aB6646994104E1441446947fc9'
                description: Bridge USDC from Avalanche (43114) to Arbitrum (42161)
              Bridge from Ethereum to Polygon:
                value:
                  title: Bridge ETH
                  description: Bridge ETH from Ethereum to Polygon
                  icon: https://example.com/eth-icon.png
                  url: https://example.com/bridge-eth
                  sourceChainId: 1
                  destinationChainId: 137
                  address: '0xb00D916688FEE4aB6646994104E1441446947fc9'
                description: Bridge ETH from Ethereum (1) to Polygon (137)
      responses:
        '200':
          description: Crosschain bridge metadata generated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  metadata:
                    type: object
                    description: Generated metadata for crosschain bridge operation
        '400':
          description: >-
            Bad Request - Invalid bridge parameters (e.g., invalid chain IDs,
            missing required fields)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseDto'
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseDto'
        '403':
          description: >-
            Forbidden - Insufficient permissions. Requires INTERNAL or
            INTEGRATOR scope (ADMIN scope also allowed)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseDto'
        '500':
          description: Internal Server Error - Failed to generate bridge metadata
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseDto'
      security:
        - api-key: []
      x-codeSamples:
        - lang: bash
          label: cURL
          source: >-
            curl -X POST
            https://api.relayer.fi/v1/action/builders/crosschain-bridge \
              -H "Authorization: ApiKey $RELAYER_API_KEY" \
              -H "Content-Type: application/json" \
              -d '{
                "fromChain": "base",
                "toChain":   "polygon",
                "token":     "USDC",
                "amount":    "100"
              }'
        - lang: TypeScript
          label: Node.js
          source: >-
            const response = await
            fetch("https://api.relayer.fi/v1/action/builders/crosschain-bridge",
            {
              method: "POST",
              headers: {
                Authorization: `ApiKey ${process.env.RELAYER_API_KEY}`,
                "Content-Type": "application/json",
              },
              body: JSON.stringify({
                fromChain: "base",
                toChain: "polygon",
                token: "USDC",
                amount: "100",
              }),
            });

            // Returns metadata for a cross-chain bridge widget.
components:
  schemas:
    CrossChainAppDto:
      type: object
      properties:
        title:
          type: string
          description: The title of the Application
        description:
          type: string
          description: The description of the Application
        icon:
          type: string
          description: The icon URL of the Application
        url:
          type: string
          description: The URL of the Application
        sourceChainId:
          type: number
          description: The source chain ID for the cross-chain transfer
        destinationChainId:
          type: number
          description: The destination chain ID for the cross-chain transfer
        address:
          type: string
          description: The recipient address for the cross-chain transfer
      required:
        - title
        - description
        - url
        - sourceChainId
        - destinationChainId
        - address
    ApiResponseDto:
      type: object
      properties:
        success:
          type: boolean
        message:
          type: string
        data:
          type: object
        statusCode:
          type: number
        timestamp:
          type: string
        path:
          type: string
        traceId:
          type: string
      required:
        - success
        - message
        - statusCode
        - timestamp
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: Authorization
      description: 'Use this format: `ApiKey <your_api_key>`'

````