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

# Broadcast

> Co-sign and broadcast a raw Stacks sponsored transaction hex. The target network (mainnet or testnet) is determined automatically from the transaction's version byte (`0x00` = mainnet, `0x80` = testnet) — no `network` field is needed or accepted. `feeToken` is also not required here; the relayer introspects the transaction arguments to identify the fee token for USER_PAYS transactions.



## OpenAPI

````yaml POST /broadcast
openapi: 3.1.0
info:
  title: VelumX Relayer API
  description: >-
    Infrastructure-grade gasless transaction sponsorship for the Stacks
    ecosystem.
  version: 1.0.0
  license:
    name: MIT
servers:
  - url: https://api.velumx.xyz/api/v1
    description: Production Relayer
security:
  - ApiKeyAuth: []
paths:
  /broadcast:
    post:
      summary: Broadcast Sponsored Transaction
      description: >-
        Co-sign and broadcast a raw Stacks sponsored transaction hex. The target
        network (mainnet or testnet) is determined automatically from the
        transaction's version byte (`0x00` = mainnet, `0x80` = testnet) — no
        `network` field is needed or accepted. `feeToken` is also not required
        here; the relayer introspects the transaction arguments to identify the
        fee token for USER_PAYS transactions.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - txHex
              properties:
                txHex:
                  type: string
                  description: >-
                    Signed sponsored transaction hex (from `stx_signTransaction`
                    with `broadcast: false`). The transaction version byte
                    determines the target network automatically.
                feeAmount:
                  type: string
                  description: >-
                    Fee in token micro-units. Required for USER_PAYS — must
                    match the fee-amount arg encoded in the transaction. Omit
                    for DEVELOPER_SPONSORS.
                userId:
                  type: string
                  description: >-
                    Optional user identifier for per-user spend tracking and
                    limits.
      responses:
        '200':
          description: Broadcast result
          content:
            application/json:
              schema:
                type: object
                properties:
                  txid:
                    type: string
                    description: Stacks transaction ID
                  status:
                    type: string
                    description: Always `sponsored` on success
        '400':
          description: Missing txHex, invalid transaction, or non-sponsored AuthType
        '401':
          description: Unauthorized — invalid or missing API key
        '429':
          description: Rate limit exceeded
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````