> For the complete documentation index, see [llms.txt](https://docs.venn.build/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.venn.build/venn-network/getting-started/safe-guard/transaction-validation-api.md).

# Transaction Validation API

The Venn Guard Transaction Validation API enables automatic transaction validation through Venn’s decentralized security network. It accepts standard user transactions and returns a JSON that is ready for upload to any Safe UI.

## API

{% hint style="success" %}
**v1.0.4 \[STABLE]**
{% endhint %}

### Request

<table data-header-hidden><thead><tr><th width="162.15625"></th><th></th></tr></thead><tbody><tr><td>URL</td><td><pre><code>https://safe-operator1-signer.venn.build/batch/sign
</code></pre></td></tr><tr><td>METHOD</td><td><pre><code>POST
</code></pre></td></tr></tbody></table>

**Body**

```typescript
{
    chainId: number,
    safeAddress: string,
    transactions: [
      {
        to: string
        value: string
        data: string
      }
    ]
}
```

### Response

If all of the transactions passed validation, the API will respond with a new Safe Transaction Batch that can be uploaded into any Safe UI.

If one or more of the transactions fail validation, the API will respond with an error.

{% hint style="info" %}
In both cases, the `STATUS` of the response is `200 OK`
{% endhint %}

#### Success

```typescript
{
    requestId: string,
    data: {
        version: string,
        chainId: string,
        createdAt: number,
        meta: {
            name: string,
            description: string,
            txBuilderVersion: string,
            createdFromSafeAddress: string,
            createdFromOwnerAddress: string,
            checksum: string
        },

        transactions: [
            // Venn Signature Transaction
            {
                to: string,
                value: string,
                data: string
            },


            // Original User Transactions
            {
                to: string,
                value: string,
                data: string
            }
        ]
    },
    status: string
}
```

#### Error

```typescript
{
    requestId: string,
    isError: boolean,
    message: string,
    status: string
}
```

## Code Example

```typescript
import axios from "axios";

// Your Safe Address
const SAFE_ADDRESS = "0x..." 

// 1st transaction in the batch
const userTransaction1 = {
    to: "0x...",
    value: "0",
    data: "0x...",
    safeAddress: SAFE_ADDRESS,
};

// 2nd transaction in the batch
const userTransaction2 = {
    to: "0x...",
    value: "0",
    data: "0x...",
    safeAddress: SAFE_ADDRESS,
};

// Validating and signing the transactions with Venn
const response = await axios.post(
    "https://operator1-signer.venn.build/batch/sign",
    {
       transactions [userTransaction1, userTransaction2],
       safeAddress: SAFE_ADDRESS
    }
);

console.log(response.data):
// Transaction Batch JSON
// {
//    ...
//    transactions: [
//       <Venn's Approving Signature Tx>,
//       <User Tx 1>,
//       <User Tx 2>,
//    ]
// }


```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.venn.build/venn-network/getting-started/safe-guard/transaction-validation-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
