# Initiate transaction

## Initiate transaction

<mark style="color:green;">`POST`</mark> `/api/v1/oauth2/send_tx`

#### Headers

| Name                                           | Type   | Description  |
| ---------------------------------------------- | ------ | ------------ |
| Access-Token<mark style="color:red;">\*</mark> | String | access token |

#### Request Body

| Name                                       | Type      | Description |
| ------------------------------------------ | --------- | ----------- |
| chainid<mark style="color:red;">\*</mark>  | String    | chainid     |
| domain<mark style="color:red;">\*</mark>   | String    | domain      |
| function<mark style="color:red;">\*</mark> | String    | function    |
| args<mark style="color:red;">\*</mark>     | String\[] |             |

{% tabs %}
{% tab title="200: OK function stateMutability= view" %}

```javascript
{
    "code": 200,
    "data": {
        "act": "SUCCESS",
        "args": [],
        "chainid": 599,
        "contract_address": "0xa0D214158643676DeBb42A2c44E361EB9E248B04",
        "data": "ok",
        "domain": "domain1",
        "eth_address": "0x14A30580CC7555FFDBE4A36E8B79582e85c4B332",
        "function": "functionName",
        "nonce": 0,
        "result": "result"
    },
    "message": "",
    "msg": "",
    "msgTitle": null
}
```

{% endtab %}

{% tab title="200: OK sign the request " %}

```javascript
{
    "code": 200,
    "data": {
        "act": "SIGN",
        "args": [],
        "chainid": 599,
        "contract_address": "0xa0D214158643676DeBb42A2c44E361EB9E248B04",
        "data": "ok",
        "domain": "domain1",
        "eth_address": "0x14A30580CC7555FFDBE4A36E8B79582e85c4B332",
        "function": "functionName",
        "nonce": 0,
        "result": "ok",
        "func_abi_sign": "xxxxxxxx",
        "wallet": "wallet name",
        "nonce": 0,
        "args": [],
        "gas": 0.00001,
        "gas_price": "10wei",
        "gas_price_num": 2,
        "fee": "0.000001ETH",
        "fee_num": 1
    },
    "message": "",
    "msg": "",
    "msgTitle": null
}
```

{% endtab %}
{% endtabs %}
