# submit_multisigned - XRPL

> Example code for the submit_multisigned JSON RPC method. Complete guide to using submit_multisigned JSON-RPC in the GetBlock Web3 documentation.

This method applies a multi-signed transaction and sends it to the network.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| tx_json | object | Yes | Multi-signed transaction JSON |
| fail_hard | boolean | No | Fail if local error |

## Request Example

#### cURL

#### curl

```bash
curl --location --request POST 'https://shared.eu-central-1.getblock.io/<ACCESS_TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "submit_multisigned",
    "params": [{
        "tx_json": {
            "Account": "rN7n7otQDd6FczFgLdSqtcsAUxDkw6fzRH",
            "TransactionType": "Payment",
            "Destination": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
            "Amount": "1000000",
            "Fee": "30",
            "Signers": []
        }
    }],
    "id": "getblock.io"
}'
```

#### JavaScript (Axios)

#### submit_multisigned.js

```javascript
const axios = require('axios');

const url = 'https://shared.eu-central-1.getblock.io/<ACCESS_TOKEN>/';
const headers = {
    'Content-Type': 'application/json'
};

const payload = {
    jsonrpc: '2.0',
    method: 'submit_multisigned',
    params: [{
        tx_json: {
            Account: 'rN7n7otQDd6FczFgLdSqtcsAUxDkw6fzRH',
            TransactionType: 'Payment',
            Destination: 'ra5nK24KXen9AHvsdFTKHSANinZseWnPcX',
            Amount: '1000000',
            Fee: '30',
            Signers: []
        }
    }],
    id: 'getblock.io'
};

axios.post(url, payload, { headers })
    .then(response => console.log(response.data))
    .catch(error => console.error(error));
```

#### Python

#### submit_multisigned.py

```python
import requests

url = "https://shared.eu-central-1.getblock.io/<ACCESS_TOKEN>/"
headers = {
    "Content-Type": "application/json"
}

payload = {
    "jsonrpc": "2.0",
    "method": "submit_multisigned",
    "params": [{
        "tx_json": {
            "Account": "rN7n7otQDd6FczFgLdSqtcsAUxDkw6fzRH",
            "TransactionType": "Payment",
            "Destination": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
            "Amount": "1000000",
            "Fee": "30",
            "Signers": []
        }
    }],
    "id": "getblock.io"
}

response = requests.post(url, headers=headers, json=payload)
print(response.json())
```

#### Rust

#### submit_multisigned.rs

```rust
use reqwest::Client;
use serde_json::json;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = Client::new();
    
    let payload = json!({
        "jsonrpc": "2.0",
        "method": "submit_multisigned",
        "params": [{
            "tx_json": {
                "Account": "rN7n7otQDd6FczFgLdSqtcsAUxDkw6fzRH",
                "TransactionType": "Payment",
                "Signers": []
            }
        }],
        "id": "getblock.io"
    });

    let response = client
        .post("https://shared.eu-central-1.getblock.io/<ACCESS_TOKEN>/")
        .header("Content-Type", "application/json")
        .json(&payload)
        .send()
        .await?;

    let result: serde_json::Value = response.json().await?;
    println!("{:#?}", result);
    
    Ok(())
}
```

## Response Example

#### response.json

```json
{
    "result": {
        "engine_result": "tesSUCCESS",
        "engine_result_code": 0,
        "engine_result_message": "The transaction was applied.",
        "status": "success",
        "tx_json": {
            "Account": "rN7n7otQDd6FczFgLdSqtcsAUxDkw6fzRH",
            "TransactionType": "Payment"
        }
    }
}
```

## Response Parameters

| Field | Type | Description |
| --- | --- | --- |
| engine_result | string | Transaction result |
| engine_result_code | integer | Result code |
| tx_blob | string | Transaction hex |
| tx_json | object | Transaction JSON |
| signer | array | Signer list |

## Use Cases

* Multi-signature accounts
* Shared custody
* Organizational accounts

## Error Handling

| Error Code | Description |
| --- | --- |
| temINVALID | Invalid transaction |
| tefNOT_MULTI_SIGNING | Not multi-sig enabled |

## SDK Integration

#### xrpl.js

#### xrpl.js (example)

```javascript
const xrpl = require('xrpl');

// Multi-signing requires collecting signatures from multiple wallets
// See xrpl.js documentation for full multi-sign workflow
```

#### xrpl.py

#### xrpl-py (example)

```python
from xrpl.clients import JsonRpcClient
from xrpl.models.requests import SubmitMultisigned

client = JsonRpcClient("https://shared.eu-central-1.getblock.io/<ACCESS_TOKEN>")
# Collect signatures and submit
```
