> For the complete documentation index, see [llms.txt](https://dev.ada-anvil.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dev.ada-anvil.io/tournament-builder/submit.md).

# Submit

## Submitting Signed Transactions

**Endpoint**: `POST /tournaments/submit-tx`

**CRITICAL**: This endpoint is required to complete all Tournament operations. Each transaction-generating endpoint (tournament creation, registration, adding participants, settlement) returns an unsigned transaction that must be signed and submitted using this endpoint.

**Request Parameters**:

* `transaction` (string): Hex-encoded signed transaction
* `signatures` (string\[], optional): Array of additional signatures to add to the transaction

**Response**:

* `txHash` (string): Transaction hash of the successfully submitted transaction

{% hint style="warning" %}
Transactions must be properly signed before submission. Unsigned or improperly signed transactions will be rejected by the Cardano network.
{% endhint %}

**Technical Notes**:

* All tournament operations follow a two-step process:
  1. Generate an unsigned transaction using one of the endpoints
  2. Sign the transaction and submit it using this endpoint
* Multiple signatures can be combined in a single submission
* The transaction hash returned can be used to track the transaction on the blockchain

**Example (Node.js with fetch)**:

```javascript
async function submitTransaction(signedTransaction) {
  const apiUrl = 'https://preprod.api.ada-anvil.app/v2/services/tournaments/submit-tx';
  
  const requestData = {
    transaction: signedTransaction,
    // Optional additional signatures
    // signatures: ["signature1", "signature2"]
  };
  
  const response = await fetch(apiUrl, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    body: JSON.stringify(requestData),
  });
  
  const data = await response.json();
  console.log(`Transaction submitted successfully with hash: ${data.txHash}`);
  
  return data.txHash;
}
```

{% hint style="info" %}
For more details on transaction creation, signing, and the complete Anvil API transaction process, see the [Transaction Overview](/guides/transaction.md) documentation.
{% endhint %}
