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

# Submit a transaction

> Submit the signed payload for an action transaction, or record the hash of one you already broadcast.

There is one submit route in the Borrow API and no separate submit-hash route. Send exactly one body field:

| Body | Use when | Result |
| - | - | - |
| `{ "signedPayload": "..." }` | yield.xyz broadcasts the signed transaction. Up to 1 MB. | `status` `BROADCASTED` with `transactionHash` and `link` |
| `{ "transactionHash": "0x..." }` | You already broadcast it. Must be `0x` plus 64 hex characters. | `status` `BROADCASTED`; the hash is recorded, not checked on chain at submit time |

Sending both, or neither, returns `400`. These are not the Earn field names `signedTransaction` and `hash`.

A transaction can be submitted once, and only from `CREATED`. Any later call returns `400` `Transaction <id> is not ready for submission. Status: <status>`, including after a failed broadcast. Submit an action's transactions in the order returned, then poll [Get an action](/api-reference/borrow/actions/get-action) for `CONFIRMED` and the action's final status. The success response is always `BROADCASTED`; it does not mean confirmed.

| Status | Cause |
| - | - |
| 400 | Both or neither body field; invalid hash format; transaction is not `CREATED` |
| 404 | Unknown `transactionId`, or the transaction belongs to another project |
| 503 | Broadcast of `signedPayload` failed; the transaction is marked `FAILED` |


## OpenAPI

````yaml openapi-borrow.json POST /v1/transactions/{transactionId}/submit
openapi: 3.0.0
info:
  title: 'Yield API: Borrow'
  description: API Documentation
  version: '1.0'
  contact: {}
servers:
  - url: https://borrow.yield.xyz
    description: Production
security: []
tags:
  - name: Discovery
    description: Browse and discover lending markets, integrations, and supported networks
  - name: Positions
    description: User-specific supply and borrow positions
  - name: Actions
    description: >-
      Execute actions (supply, borrow, repay, withdraw) and manage multi-step
      flows
  - name: Transactions
    description: Submit signed transactions and track status
externalDocs:
  description: For more information
  url: https://docs.yield.xyz
paths:
  /v1/transactions/{transactionId}/submit:
    post:
      tags:
        - Transactions
        - Transactions
      summary: Submit signed transaction
      description: >-
        Submit a signed transaction. Provide signedPayload to have us broadcast
        it to the blockchain, or transactionHash if already submitted by the
        client.
      operationId: TransactionsController_submitTransaction_v1
      parameters:
        - name: transactionId
          required: true
          in: path
          description: Transaction ID from action response (UUID)
          schema:
            example: 550e8400-e29b-41d4-a716-446655440000
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitTransactionDto'
      responses:
        '200':
          description: Transaction submitted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitTransactionResponseDto'
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Invalid API key
                  error:
                    type: string
                    example: Unauthorized
                  statusCode:
                    type: number
                    example: 401
        '404':
          description: Transaction not found
        '429':
          description: Rate limit exceeded
          headers:
            x-ratelimit-limit:
              description: Request limit per window
              schema:
                type: string
            x-ratelimit-remaining:
              description: Remaining requests (will be 0)
              schema:
                type: string
            x-ratelimit-reset:
              description: Unix timestamp when window resets
              schema:
                type: string
            retry-after:
              description: Seconds to wait before retrying
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Rate limit exceeded
                  error:
                    type: string
                    example: Too Many Requests
                  statusCode:
                    type: number
                    example: 429
                  retryAfter:
                    type: number
                    example: 30
      security:
        - ApiKey: []
components:
  schemas:
    SubmitTransactionDto:
      type: object
      properties:
        signedPayload:
          type: string
          description: >-
            Signed transaction payload. Required if transactionHash is not
            provided.
          example: 0x1234567890abcdef...
        transactionHash:
          type: string
          description: >-
            Transaction hash if already submitted. Required if signedPayload is
            not provided.
          example: 0xabcdef1234567890...
    SubmitTransactionResponseDto:
      type: object
      properties:
        transactionHash:
          type: string
          description: Transaction hash (if available)
          example: 0x1234567890abcdef...
        link:
          type: string
          description: Link to view transaction on block explorer
          example: https://etherscan.io/tx/0x...
        status:
          type: string
          description: Transaction status after submission
          enum:
            - NOT_FOUND
            - CREATED
            - BLOCKED
            - WAITING_FOR_SIGNATURE
            - SIGNED
            - BROADCASTED
            - PENDING
            - CONFIRMED
            - FAILED
            - SKIPPED
          example: BROADCASTED
        error:
          type: string
          description: Error message if submission failed
        details:
          type: object
          description: Additional details
      required:
        - link
        - status
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.