---
title: /approveMpcRequestForSwagger
slug: approvempcrequestforswagger
createdAt: 2024-01-09T12:30:00.566Z
---

{
  "id": "dL0SS9ZGENCmwHG5G_zdl",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "http://1.1.1.1/approveMpcRequestForSwagger",
    "servers": [
      {
        "url": "http://1.1.1.1/approveMpcRequestForSwagger"
      }
    ],
    "name": "",
    "description": "<ul>\n<li>return - regular response if succeed else error</li>\n</ul>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [
        {
          "kind": "required",
          "name": "request_id",
          "type": "string",
          "example": "9e2626a39663f285fdfae2fc0b329baf",
          "description": "<p>id of send transaction request (get by using getBulletins)</p>",
          "default": "9e2626a39663f285fdfae2fc0b329baf"
        },
        {
          "kind": "required",
          "name": "request_creator_id",
          "type": "string",
          "example": "9e2626a39663f285fdfae2fc0b329baf",
          "description": "id of the send transaction creator",
          "default": "9e2626a39663f285fdfae2fc0b329baf"
        },
        {
          "kind": "optional",
          "name": "request_creator_name",
          "type": "string",
          "example": "Matthew",
          "description": "<p>id of the send transaction creator --DEPRECATED--</p>",
          "default": "Matthew"
        },
        {
          "kind": "optional",
          "name": "request_type",
          "type": "integer",
          "example": 0,
          "description": "<p>int 0 mean TRANSACTION_REQUEST</p>",
          "default": 0
        },
        {
          "kind": "required",
          "name": "coin_type",
          "type": "string",
          "example": "BTC",
          "description": "coin type used in this operation",
          "default": "BTC"
        },
        {
          "kind": "required",
          "name": "account_id",
          "type": "integer",
          "example": 1,
          "description": "the account used in this operation",
          "default": 1
        },
        {
          "kind": "required",
          "name": "outputs",
          "type": "array",
          "example": "[\"100000000\",\"36t2WWRbzuw8Ft5o8GXBUzCc3ZEF84eMjm\"]",
          "description": "list [{\"Amount\":\"596\",\"Destination\":\"3AXdTF1GxHVugRzrndCPSAQEBd2BqBhMde\"}], List in all coins: [(destination_address:str,amount_to_transfer:int)] \nin XRP it is optional to add destination tag [(destination_address:str, amount_to_transfer:int, destination_tag:int)]\nin XLM it is optional to add Memo [(destination_address:str, amount_to_transfer:int, StellarMemo:class)]\n",
          "default": [
            "100000000",
            "36t2WWRbzuw8Ft5o8GXBUzCc3ZEF84eMjm"
          ],
          "schema": [],
          "itemType": "array",
          "customType": "array[]"
        },
        {
          "kind": "required",
          "name": "tx_access_token",
          "type": "string",
          "example": "a8c2b4da17998863be8c6270e65be24dec8e79eaea616a54a89184ec43379021",
          "description": "<p>transaction request access token (get by using getBulletins)</p>",
          "default": "a8c2b4da17998863be8c6270e65be24dec8e79eaea616a54a89184ec43379021"
        },
        {
          "kind": "required",
          "name": "approvers_list",
          "type": "array",
          "example": "[\"3\",\"alice@gk8.io\"]",
          "description": ":[{\"Action\":0,\"User\":\"87654321\"},{\"Action\":0,\"User\":\"david@gk8.io\"}]",
          "default": [
            "3",
            "alice@gk8.io"
          ],
          "schema": [],
          "itemType": "string",
          "customType": "string[]"
        },
        {
          "kind": "required",
          "name": "specific_from_address",
          "type": "string",
          "example": "3Qnv1fyqhSaptkxJrC9ruNfpSCB1Srmkg3",
          "description": "<p>string : \"3AXdTF1GxHVugRzrndCPSAQEBd2BqBhMde\"</p>",
          "default": "3Qnv1fyqhSaptkxJrC9ruNfpSCB1Srmkg3"
        },
        {
          "kind": "optional",
          "name": "max_priority_fee",
          "type": "integer",
          "example": 1000000,
          "description": "<p>the fee we want to transfer - integer or object with values of gas limit, max priority fee, max</p>\n<ul>\n<li>storage (Backward Compatible)</li>\n</ul>",
          "default": 1000000
        },
        {
          "kind": "optional",
          "name": "gas_limit",
          "type": "integer",
          "example": 21000,
          "description": "the gas limit we want to set     \n",
          "default": 21000
        },
        {
          "kind": "optional",
          "name": "storage_limit",
          "type": "integer",
          "example": 257,
          "description": "<p>the max storage for the transaction. Only relevant for XTZ.\n257 for non existing address in blockchain and 0 for existing address, to be on the safe side you may always use 257</p>",
          "default": 257
        },
        {
          "kind": "optional",
          "name": "is_eth1_to_eth2_conversion",
          "type": "boolean",
          "example": "false",
          "description": "whether the transaction type is sendConvertEth1ToEth2Transaction",
          "default": "false"
        },
        {
          "kind": "optional",
          "name": "data_to_sign_and_data_for_contract_and_bytes_to_sign_and_fee",
          "type": "object",
          "example": "",
          "description": "dictionary containing parameters such as DataToSign, BytesToSign and DataForContract  (Not all required)",
          "default": "{\n  \"please_insert_your_object_data_inside_the_requestBody\": \"your_object_here\"\n} \n",
          "schema": []
        }
      ],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "customType": "approveMpcRequestForSwaggerRequest",
          "schema": [
            {
              "name": "data_to_sign",
              "kind": "optional",
              "type": "string",
              "example": "0x67c1410ba1863095768ffe50b286360a744ff66d893379b027b8339f58ca525d",
              "default": "0x67c1410ba1863095768ffe50b286360a744ff66d893379b027b8339f58ca525d"
            },
            {
              "name": "bytes_to_sign",
              "kind": "optional",
              "type": "string",
              "example": "233c83369d1afc58bfca8a62bf227ed264b07810bfd3075113d4c5a587a4f859",
              "default": "233c83369d1afc58bfca8a62bf227ed264b07810bfd3075113d4c5a587a4f859"
            },
            {
              "name": "data_for_contract",
              "kind": "optional",
              "type": "string",
              "example": "MyFunction",
              "default": "MyFunction"
            }
          ],
          "modelRef": "#/components/schemas/approveMpcRequestForSwaggerRequest",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "success",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "customType": "approveMpcRequestForSwaggerResponse",
            "schema": [
              {
                "name": "FunctionData",
                "kind": "optional",
                "type": "object",
                "example": "",
                "schema": [
                  {
                    "name": "Status",
                    "kind": "optional",
                    "type": "string",
                    "description": "status of approveCold request",
                    "example": "success",
                    "default": "success"
                  }
                ]
              },
              {
                "name": "Meta",
                "kind": "optional",
                "type": "object",
                "modelRef": "#/components/schemas/MetaResponse",
                "customType": "MetaResponse",
                "schema": [
                  {
                    "name": "AccessToken",
                    "kind": "optional",
                    "type": "string",
                    "description": "The new access token generated after this operation",
                    "example": "a3e816b5bc04302d99da94705ec2309a4a63fe10d6aed3c5f6fc9e7ff27c6be6",
                    "default": "a3e816b5bc04302d99da94705ec2309a4a63fe10d6aed3c5f6fc9e7ff27c6be6"
                  },
                  {
                    "name": "Destination",
                    "kind": "optional",
                    "type": "string",
                    "description": "Id of the server",
                    "example": "042c671aeb148d9b2bb4918399c4c925f3764248c5ab2d5194ab0f32664132834692699a75e7fafb5af35f183b7d8a68bdc3b3e6ebfaff8ab555b9a3caf8090622",
                    "default": "042c671aeb148d9b2bb4918399c4c925f3764248c5ab2d5194ab0f32664132834692699a75e7fafb5af35f183b7d8a68bdc3b3e6ebfaff8ab555b9a3caf8090622"
                  },
                  {
                    "name": "Source",
                    "kind": "optional",
                    "type": "string",
                    "description": "User public key",
                    "example": "df4b76a23067a9d782d09a7372ed526ec713cf6d771fac4dbdb9610f7af36d570a157eed76986b8e85afde12888d10d10bef461399e490f3d7e4db44cde1b6e355",
                    "default": "df4b76a23067a9d782d09a7372ed526ec713cf6d771fac4dbdb9610f7af36d570a157eed76986b8e85afde12888d10d10bef461399e490f3d7e4db44cde1b6e355"
                  },
                  {
                    "name": "Time",
                    "kind": "optional",
                    "type": "string",
                    "description": "UTC Time of execution",
                    "example": "2021-02-14 09:58:52.320",
                    "default": "2021-02-14 09:58:52.320"
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/approveMpcRequestForSwaggerResponse",
            "isExpanded": true
          }
        ]
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "example-0-curl",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url 'http://1.1.1.1/approveMpcRequestForSwagger?request_id=9e2626a39663f285fdfae2fc0b329baf&request_creator_id=9e2626a39663f285fdfae2fc0b329baf&request_creator_name=Matthew&request_type=integer&coin_type=BTC&account_id=1&outputs=100000000%2C36t2WWRbzuw8Ft5o8GXBUzCc3ZEF84eMjm&tx_access_token=a8c2b4da17998863be8c6270e65be24dec8e79eaea616a54a89184ec43379021&approvers_list=3%2Calice%40gk8.io&specific_from_address=3Qnv1fyqhSaptkxJrC9ruNfpSCB1Srmkg3&max_priority_fee=1000000&gas_limit=21000&storage_limit=257&is_eth1_to_eth2_conversion=false&data_to_sign_and_data_for_contract_and_bytes_to_sign_and_fee=%22{%5Cn%20%20%5C%22please_insert_your_object_data_inside_the_requestBody%5C%22%3A%20%5C%22your_object_here%5C%22%5Cn}%20%5Cn%22' \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"data_to_sign\": \"0x67c1410ba1863095768ffe50b286360a744ff66d893379b027b8339f58ca525d\",\n     \"bytes_to_sign\": \"233c83369d1afc58bfca8a62bf227ed264b07810bfd3075113d4c5a587a4f859\",\n     \"data_for_contract\": \"MyFunction\"\n     }'"
        },
        {
          "id": "example-1-javascript",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"data_to_sign\": \"0x67c1410ba1863095768ffe50b286360a744ff66d893379b027b8339f58ca525d\",\n   \"bytes_to_sign\": \"233c83369d1afc58bfca8a62bf227ed264b07810bfd3075113d4c5a587a4f859\",\n   \"data_for_contract\": \"MyFunction\"\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"http://1.1.1.1/approveMpcRequestForSwagger?request_id=9e2626a39663f285fdfae2fc0b329baf&request_creator_id=9e2626a39663f285fdfae2fc0b329baf&request_creator_name=Matthew&request_type=integer&coin_type=BTC&account_id=1&outputs=100000000,36t2WWRbzuw8Ft5o8GXBUzCc3ZEF84eMjm&tx_access_token=a8c2b4da17998863be8c6270e65be24dec8e79eaea616a54a89184ec43379021&approvers_list=3,alice@gk8.io&specific_from_address=3Qnv1fyqhSaptkxJrC9ruNfpSCB1Srmkg3&max_priority_fee=1000000&gas_limit=21000&storage_limit=257&is_eth1_to_eth2_conversion=false&data_to_sign_and_data_for_contract_and_bytes_to_sign_and_fee=\\\"{\\\\n  \\\\\\\"please_insert_your_object_data_inside_the_requestBody\\\\\\\": \\\\\\\"your_object_here\\\\\\\"\\\\n} \\\\n\\\"\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "example-2-ruby",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"http://1.1.1.1/approveMpcRequestForSwagger?request_id=9e2626a39663f285fdfae2fc0b329baf&request_creator_id=9e2626a39663f285fdfae2fc0b329baf&request_creator_name=Matthew&request_type=integer&coin_type=BTC&account_id=1&outputs=100000000,36t2WWRbzuw8Ft5o8GXBUzCc3ZEF84eMjm&tx_access_token=a8c2b4da17998863be8c6270e65be24dec8e79eaea616a54a89184ec43379021&approvers_list=3,alice@gk8.io&specific_from_address=3Qnv1fyqhSaptkxJrC9ruNfpSCB1Srmkg3&max_priority_fee=1000000&gas_limit=21000&storage_limit=257&is_eth1_to_eth2_conversion=false&data_to_sign_and_data_for_contract_and_bytes_to_sign_and_fee=\\\"{\\n  \\\\\"please_insert_your_object_data_inside_the_requestBody\\\\\": \\\\\"your_object_here\\\\\"\\n} \\n\\\"\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"data_to_sign\": \"0x67c1410ba1863095768ffe50b286360a744ff66d893379b027b8339f58ca525d\",\n   \"bytes_to_sign\": \"233c83369d1afc58bfca8a62bf227ed264b07810bfd3075113d4c5a587a4f859\",\n   \"data_for_contract\": \"MyFunction\"\n})\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "example-3-python",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"http://1.1.1.1/approveMpcRequestForSwagger?request_id=9e2626a39663f285fdfae2fc0b329baf&request_creator_id=9e2626a39663f285fdfae2fc0b329baf&request_creator_name=Matthew&request_type=integer&coin_type=BTC&account_id=1&outputs=100000000,36t2WWRbzuw8Ft5o8GXBUzCc3ZEF84eMjm&tx_access_token=a8c2b4da17998863be8c6270e65be24dec8e79eaea616a54a89184ec43379021&approvers_list=3,alice@gk8.io&specific_from_address=3Qnv1fyqhSaptkxJrC9ruNfpSCB1Srmkg3&max_priority_fee=1000000&gas_limit=21000&storage_limit=257&is_eth1_to_eth2_conversion=false&data_to_sign_and_data_for_contract_and_bytes_to_sign_and_fee=\\\"{\\\\n  \\\\\\\"please_insert_your_object_data_inside_the_requestBody\\\\\\\": \\\\\\\"your_object_here\\\\\\\"\\\\n} \\\\n\\\"\"\n\npayload = json.dumps({\n   \"data_to_sign\": \"0x67c1410ba1863095768ffe50b286360a744ff66d893379b027b8339f58ca525d\",\n   \"bytes_to_sign\": \"233c83369d1afc58bfca8a62bf227ed264b07810bfd3075113d4c5a587a4f859\",\n   \"data_for_contract\": \"MyFunction\"\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "example-0-curl"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// success\n{\n  \"FunctionData\": {\n    \"Status\": \"success\"\n  },\n  \"Meta\": {\n    \"AccessToken\": \"a3e816b5bc04302d99da94705ec2309a4a63fe10d6aed3c5f6fc9e7ff27c6be6\",\n    \"Destination\": \"042c671aeb148d9b2bb4918399c4c925f3764248c5ab2d5194ab0f32664132834692699a75e7fafb5af35f183b7d8a68bdc3b3e6ebfaff8ab555b9a3caf8090622\",\n    \"Source\": \"df4b76a23067a9d782d09a7372ed526ec713cf6d771fac4dbdb9610f7af36d570a157eed76986b8e85afde12888d10d10bef461399e490f3d7e4db44cde1b6e355\",\n    \"Time\": \"2021-02-14 09:58:52.320\"\n  }\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "id": "5lhsFJtefaeZyDEsLgFT_",
      "type": "bulleted-list",
      "children": [
        {
          "id": "IPoOGrafvhLMWs_WC1EBF",
          "type": "list-item",
          "children": [
            {
              "id": "cITqvMnWGtGY-QW72cEDs",
              "type": "list-item-child",
              "children": [
                {
                  "text": "return - regular response if succeed else error",
                  "id": "XEm3wJRdVmqhpECa1V2o8"
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}