{
  "info": {
    "_postman_id": "d93a5525-f002-4170-8c66-75ad09150e50",
    "name": "CaaS APIs",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "_exporter_id": "51391207",
    "_collection_link": "https://go.postman.co/collection/51391207-d93a5525-f002-4170-8c66-75ad09150e50?source=collection_link"
  },
  "item": [
    {
      "name": "Set Up Organization",
      "item": [
        {
          "name": "Create Short Lived Access Token",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "try {",
                  "    // Attempt to parse the JSON response body",
                  "    const response = pm.response.json();",
                  "    ",
                  "    // Log the entire response to the Postman Console for inspection",
                  "    console.log(\"Response JSON:\", response);",
                  "",
                  "    // Check if the access_token field exists in the response",
                  "    if (response && response.access_token) {",
                  "        // Set the environment variable",
                  "        pm.environment.set(\"shortAccessToken\", response.access_token);",
                  "        ",
                  "        // Log the value that was set",
                  "        console.log(\"shortAccessToken set to:\", pm.environment.get(\"shortAccessToken\"));",
                  "    } else {",
                  "        console.error(\"Access token not found in the response.\");",
                  "    }",
                  "} catch (e) {",
                  "    // If the response is not valid JSON, this block will run",
                  "    console.error(\"Could not parse response as JSON. Error:\", e);",
                  "    console.log(\"Raw Response Body:\", pm.response.text());",
                  "}"
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"email\": \"{{serviceUserEmail}}\",\n    \"password\": \"{{serviceUserPassword}}\",\n    \"otp\": \"{{otp}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{domain-url}}/api/v1/user/login",
              "host": ["{{domain-url}}"],
              "path": ["api", "v1", "user", "login"]
            }
          },
          "response": []
        },
        {
          "name": "Create Long Lived Access Token",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "try {",
                  "    // Attempt to parse the JSON response body",
                  "    const response = pm.response.json();",
                  "    ",
                  "    // Log the entire response to the Postman Console for inspection",
                  "    console.log(\"Response JSON:\", response);",
                  "",
                  "    // Check if the token field exists in the response",
                  "    if (response && response.token) {",
                  "        // Set the environment variable",
                  "        pm.environment.set(\"longAccessToken\", response.token);",
                  "        ",
                  "        // Log the value that was set",
                  "        console.log(\"longAccessToken set to:\", pm.environment.get(\"longAccessToken\"));",
                  "    } else {",
                  "        console.error(\"Access token not found in the response.\");",
                  "    }",
                  "} catch (e) {",
                  "    // If the response is not valid JSON, this block will run",
                  "    console.error(\"Could not parse response as JSON. Error:\", e);",
                  "    console.log(\"Raw Response Body:\", pm.response.text());",
                  "}"
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{shortAccessToken}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"scope\": [\n        \"pending_approval_update\", // Update pending approvals\n        \"profile\", // View your BitGo profile\n        \"settlement_network_read\", // Let's partners engage in allocations with clients\n        \"settlement_network_write\", // Let's partners engage in allocations with clients\n        \"trade_trade\", // Make trades\n        \"trade_view\", // View trades\n        \"wallet_approve_all\", // Approve transactions for all wallets\n        \"wallet_create\", // Create wallets\n        \"wallet_edit_all\", // Edit comments for all wallets\n        // \"wallet_edit_enterprise\", // Edit enterprise comments\n        \"wallet_freeze_all\", // Freeze all wallets\n        \"wallet_manage_all\", // Manage settings for all wallets (required to use webhooks)\n        // \"wallet_manage_enterprise\", // Manage enterprise settings\n        \"wallet_spend_all\", // Send transactions from a wallet\n        \"enterprise_view_all\",\n        \"enterprise_manage_all\",\n        // \"wallet_spend_enterprise\", // Spend enterprise transactions\n        \"wallet_view_all\" // View transactions for all wallets\n        // \"wallet_view_enterprise\" // View enterprise transactions\n    ],\n    \"duration\": {{accessTokenDuration}},\n    \"label\": \"{{accessTokenLabel}}\",\n    \"otp\": \"{{otp}}\"\n    // \"ipRestrict\": [\"127.0.0.0\"]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{domain-url}}/api/v2/user/accesstoken",
              "host": ["{{domain-url}}"],
              "path": ["api", "v2", "user", "accesstoken"]
            }
          },
          "response": []
        },
        {
          "name": "Add Admins to Enterprises",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{longAccessToken}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"permission\": \"admin\",\n  \"username\": \"testuser@bitgo.com\" //username of admin you want to add\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{domain-url}}/api/v2/enterprise/{{orgEnterpriseId}}/user",
              "host": ["{{domain-url}}"],
              "path": ["api", "v2", "enterprise", "{{orgEnterpriseId}}", "user"]
            }
          },
          "response": []
        },
        {
          "name": "Fetch Organization Details",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{longAccessToken}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{domain-url}}/api/v2/enterprise/{{orgEnterpriseId}}",
              "host": ["{{domain-url}}"],
              "path": ["api", "v2", "enterprise", "{{orgEnterpriseId}}"]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Set Up Child Enterprises",
      "item": [
        {
          "name": "Create an Enterprise for an Organization",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "try {",
                  "    const response = pm.response.json();",
                  "    console.log(\"Response JSON:\", response);",
                  "",
                  "    if (response && response.userId) {",
                  "        pm.environment.set(\"userId\", response.userId);",
                  "        console.log(\"userId set to:\", pm.environment.get(\"userId\"));",
                  "    } else {",
                  "        console.error(\"userId not found in the response.\");",
                  "    }",
                  "",
                  "    if (response && response.enterpriseId) {",
                  "        pm.environment.set(\"enterpriseId\", response.enterpriseId);",
                  "        console.log(\"enterpriseId set to:\", pm.environment.get(\"enterpriseId\"));",
                  "    } else {",
                  "        console.error(\"enterpriseId not found in the response.\");",
                  "    }",
                  "} catch (e) {",
                  "    console.error(\"Could not parse response as JSON. Error:\", e);",
                  "    console.log(\"Raw Response Body:\", pm.response.text());",
                  "}"
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{longAccessToken}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"email\": \"roychon401+40@bitgo.com\", // end user email\n    \"idempotencyKey\": \"7bca92d1-4e71-4b15-9c58-e628527a20c3\",\n    \"additionalAdmins\": [\"{{serviceUserId}}\"],\n    \"accountType\":\"individual\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{domain-url}}/api/v2/organization/{{organizationId}}/enterprise",
              "host": ["{{domain-url}}"],
              "path": ["api", "v2", "organization", "{{organizationId}}", "enterprise"]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Complete KYC Verification",
      "item": [
        {
          "name": "Submit Documents",
          "item": [
            {
              "name": "Add Documents",
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "exec": [
                      "try {",
                      "    const response = pm.response.json();",
                      "    console.log(\"Response JSON:\", response);",
                      "",
                      "    if (response && response.id) {",
                      "        pm.collectionVariables.set(\"documentId\", response.id);",
                      "        console.log(\"documentId set to:\", pm.collectionVariables.get(\"documentId\"));",
                      "    } else {",
                      "        console.error(\"id not found in the response.\");",
                      "    }",
                      "} catch (e) {",
                      "    console.error(\"Could not parse response as JSON. Error:\", e);",
                      "    console.log(\"Raw Response Body:\", pm.response.text());",
                      "}"
                    ],
                    "type": "text/javascript",
                    "packages": {},
                    "requests": {}
                  }
                }
              ],
              "request": {
                "auth": {
                  "type": "bearer",
                  "bearer": [
                    {
                      "key": "token",
                      "value": "{{longAccessToken}}",
                      "type": "string"
                    }
                  ]
                },
                "method": "POST",
                "header": [],
                "body": {
                  "mode": "formdata",
                  "formdata": [
                    {
                      "key": "frontPhoto",
                      "type": "file",
                      "uuid": "1698bc16-621c-4e38-b8e9-15e07ee394fe",
                      "value": null
                    },
                    {
                      "key": "backPhoto",
                      "type": "file",
                      "uuid": "d4dd4615-a78a-479d-a814-c40659a32a59",
                      "value": null
                    },
                    {
                      "key": "selectedIdClass",
                      "value": "",
                      "type": "text",
                      "uuid": "4022ae71-f662-4e99-bf51-c3d856bea148"
                    },
                    {
                      "key": "proofOfResidency",
                      "type": "file",
                      "uuid": "11e7eb17-335e-49a1-a5a4-1701daa85d43",
                      "value": null,
                      "disabled": true
                    }
                  ]
                },
                "url": {
                  "raw": "{{domain-url}}/api/evs/v1/identity/{{identityId}}/document",
                  "host": ["{{domain-url}}"],
                  "path": ["api", "evs", "v1", "identity", "{{identityId}}", "document"]
                }
              },
              "response": []
            },
            {
              "name": "Get Documents",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{domain-url}}/api/evs/v1/identity/document?identityId={{identityId}}&documentId={{documentId}}",
                  "host": ["{{domain-url}}"],
                  "path": ["api", "evs", "v1", "identity", "document"],
                  "query": [
                    {
                      "key": "identityId",
                      "value": "{{identityId}}"
                    },
                    {
                      "key": "documentId",
                      "value": "{{documentId}}"
                    }
                  ]
                }
              },
              "response": []
            },
            {
              "name": "Update Documents",
              "request": {
                "auth": {
                  "type": "bearer",
                  "bearer": [
                    {
                      "key": "token",
                      "value": "{{longAccessToken}}",
                      "type": "string"
                    }
                  ]
                },
                "method": "PUT",
                "header": [],
                "body": {
                  "mode": "formdata",
                  "formdata": [
                    {
                      "key": "selectedIdClass",
                      "value": "",
                      "type": "text",
                      "uuid": "a3502ce8-9ba0-45e6-8552-66d994237bdf"
                    },
                    {
                      "key": "frontPhoto",
                      "type": "file",
                      "uuid": "cac56362-0049-4642-be1b-7f8307032cd5",
                      "value": null
                    },
                    {
                      "key": "backPhoto",
                      "type": "file",
                      "uuid": "d0e7e687-3596-445a-aca5-560a865316d2",
                      "value": null
                    },
                    {
                      "key": "proofOfResidency",
                      "type": "file",
                      "uuid": "8d93b62c-21d3-4c53-abaa-bd32b684521f",
                      "value": null
                    }
                  ]
                },
                "url": {
                  "raw": "{{domain-url}}/api/evs/v1/identity/{{identityId}}/document/{{documentId}}",
                  "host": ["{{domain-url}}"],
                  "path": ["api", "evs", "v1", "identity", "{{identityId}}", "document", "{{documentId}}"]
                }
              },
              "response": []
            }
          ]
        },
        {
          "name": "Submit KYC Information",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "try {",
                  "    const response = pm.response.json();",
                  "    console.log(\"Response JSON:\", response);",
                  "",
                  "    if (response && response.id) {",
                  "        pm.collectionVariables.set(\"identityId\", response.id);",
                  "        console.log(\"identityId set to:\", pm.collectionVariables.get(\"identityId\"));",
                  "    } else {",
                  "        console.error(\"id not found in the response.\");",
                  "    }",
                  "} catch (e) {",
                  "    console.error(\"Could not parse response as JSON. Error:\", e);",
                  "    console.log(\"Raw Response Body:\", pm.response.text());",
                  "}"
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{longAccessToken}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"addressCity\": \"New York\",\n  \"addressPostalCode\": \"11209\",\n  \"addressStreet1\": \"878 Madison Dr.\",\n  \"addressSubdivision\": \"state\",\n  \"birthdate\": \"2001-01-25T14:15:22Z\",\n  \"country\": \"USA\",\n  \"countryOfCitizenship\": \"USA\",\n  \"countryOfResidence\": \"USA\",\n//   \"debugFailureReason\": \"string\",\n//   \"debugStatus\": \"string\",\n//   \"digitalAssetWalletAddress\": \"string\",\n  \"enterpriseId\": \"{{enterpriseId}}\",\n  \"govIdCountryOfIssuance\": \"USA\",\n  \"identificationNumber\": \"NLH46YYZS\",\n  \"nameFirst\": \"Roy\",\n  \"nameLast\": \"Chon\",\n  \"occupation\": \"Other - Default\",\n  \"organizationId\": \"{{organizationId}}\",\n  \"phoneNumber\": \"2124299220\",\n  \"politicallyExposedPerson\": false,\n  \"transactionType\": \"institutionalIndividual\",\n  \"userId\": \"{{userId}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{domain-url}}/api/evs/v1/identity",
              "host": ["{{domain-url}}"],
              "path": ["api", "evs", "v1", "identity"]
            }
          },
          "response": []
        },
        {
          "name": "Check KYC Status",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{longAccessToken}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{domain-url}}/api/evs/v1/identity?organizationId={{organizationId}}&enterpriseId={{enterpriseId}}&identityId={{identityId}}",
              "host": ["{{domain-url}}"],
              "path": ["api", "evs", "v1", "identity"],
              "query": [
                {
                  "key": "organizationId",
                  "value": "{{organizationId}}"
                },
                {
                  "key": "enterpriseId",
                  "value": "{{enterpriseId}}"
                },
                {
                  "key": "identityId",
                  "value": "{{identityId}}"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Sign Completed KYC",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{longAccessToken}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "[\n    {\n        \"contractSignerNameFull\": \"John Doe\",\n        \"contractSignedDate\": \"2025-09-04\",\n        \"contractSignedIPAddress\": \"123.123.123.123\",\n        \"contractVersion\": \"1\",\n        \"contractType\": \"csa\",\n        \"userAgreesToTerms\": true\n    },\n    {\n        \"contractSignerNameFull\": \"John Doe\",\n        \"contractSignedDate\": \"2025-09-04\",\n        \"contractSignedIPAddress\": \"123.123.123.123\",\n        \"contractVersion\": \"1\",\n        \"contractType\": \"mpa\",\n        \"userAgreesToTerms\": true\n    },\n    {\n        \"contractSignerNameFull\": \"John Doe\",\n        \"contractSignedDate\": \"2025-09-04\",\n        \"contractSignedIPAddress\": \"123.123.123.123\",\n        \"contractVersion\": \"1\",\n        \"contractType\": \"mic\",\n        \"userAgreesToTerms\": true\n    },\n    {\n        \"contractSignerNameFull\": \"John Doe\",\n        \"contractSignedDate\": \"2025-09-04\",\n        \"contractSignedIPAddress\": \"123.123.123.123\",\n        \"contractVersion\": \"1\",\n        \"contractType\": \"wvr\",\n        \"userAgreesToTerms\": true\n    }\n]",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{domain-url}}/api/evs/v1/identity/{{identityId}}/signatures",
              "host": ["{{domain-url}}"],
              "path": ["api", "evs", "v1", "identity", "{{identityId}}", "signatures"]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Complete KYB Verification",
      "item": [
        {
          "name": "Create Required Documents",
          "item": [
            {
              "name": "Generate Document Upload URL",
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "exec": [
                      "try {",
                      "    // Attempt to parse the JSON response body",
                      "    const response = pm.response.json();",
                      "    ",
                      "    console.log(\"Response JSON:\", response);",
                      "",
                      "    if (response && response.documentId && response.files) {",
                      "        // Set the environment variable",
                      "        pm.environment.set(\"currentKYBDocumentID\", response.documentId);",
                      "        pm.environment.set(\"currentFileUploadURL\", response.files[0].uploadUrl);",
                      "    } else {",
                      "        console.error(\"Error parsing response\");",
                      "    }",
                      "} catch (e) {",
                      "    // If the response is not valid JSON, this block will run",
                      "    console.error(\"Could not parse response as JSON. Error:\", e);",
                      "    console.log(\"Raw Response Body:\", pm.response.text());",
                      "}"
                    ],
                    "type": "text/javascript",
                    "packages": {},
                    "requests": {}
                  }
                }
              ],
              "request": {
                "auth": {
                  "type": "bearer",
                  "bearer": [
                    {
                      "key": "token",
                      "value": "{{longAccessToken}}",
                      "type": "string"
                    }
                  ]
                },
                "method": "POST",
                "header": [],
                "body": {
                  "mode": "raw",
                  "raw": "{\n    \"documentType\": \"w9\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{domain-url}}/api/document-service/v1/documents",
                  "host": ["{{domain-url}}"],
                  "path": ["api", "document-service", "v1", "documents"]
                }
              },
              "response": []
            },
            {
              "name": "Upload Document",
              "request": {
                "method": "POST",
                "header": [],
                "body": {
                  "mode": "formdata",
                  "formdata": [
                    {
                      "key": "file",
                      "type": "file",
                      "uuid": "e68c2449-0516-4d93-9591-78fb1b8dca95",
                      "value": null
                    }
                  ]
                },
                "url": {
                  "raw": "{{currentFileUploadURL}}",
                  "host": ["{{currentFileUploadURL}}"]
                }
              },
              "response": []
            },
            {
              "name": "Verify Document",
              "request": {
                "auth": {
                  "type": "bearer",
                  "bearer": [
                    {
                      "key": "token",
                      "value": "{{longAccessToken}}",
                      "type": "string"
                    }
                  ]
                },
                "method": "POST",
                "header": [],
                "url": {
                  "raw": "{{domain-url}}/api/document-service/v1/documents/{{currentKYBDocumentID}}/verify",
                  "host": ["{{domain-url}}"],
                  "path": ["api", "document-service", "v1", "documents", "{{currentKYBDocumentID}}", "verify"]
                }
              },
              "response": []
            }
          ]
        },
        {
          "name": "Create Enterprise and Primary User",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "try {",
                  "    const response = pm.response.json();",
                  "    console.log(\"Response JSON:\", response);",
                  "",
                  "    if (response && response.userId) {",
                  "        pm.environment.set(\"userId\", response.userId);",
                  "        console.log(\"userId set to:\", pm.environment.get(\"userId\"));",
                  "    } else {",
                  "        console.error(\"userId not found in the response.\");",
                  "    }",
                  "",
                  "    if (response && response.enterpriseId) {",
                  "        pm.environment.set(\"enterpriseId\", response.enterpriseId);",
                  "        console.log(\"enterpriseId set to:\", pm.environment.get(\"enterpriseId\"));",
                  "    } else {",
                  "        console.error(\"enterpriseId not found in the response.\");",
                  "    }",
                  "} catch (e) {",
                  "    console.error(\"Could not parse response as JSON. Error:\", e);",
                  "    console.log(\"Raw Response Body:\", pm.response.text());",
                  "}"
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{longAccessToken}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"email\": \"roychon401+41@bitgo.com\",\n  \"idempotencyKey\": \"f47a8b32-1e9d-4c55-a621-089247d5e6e3\",\n  \"additionalAdmins\": [\n    \"{{serviceUserId}}\"\n  ],\n  \"accountType\": \"entity\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{domain-url}}/api/v2/organization/{{organizationId}}/enterprise",
              "host": ["{{domain-url}}"],
              "path": ["api", "v2", "organization", "{{organizationId}}", "enterprise"]
            }
          },
          "response": []
        },
        {
          "name": "Create Users for Associated Persons",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "try {",
                  "    const response = pm.response.json();",
                  "    console.log(\"Response JSON:\", response);",
                  "",
                  "    if (response && response.userId) {",
                  "        pm.collectionVariables.set(\"associatedPersonUserId\", response.userId);",
                  "        console.log(\"associatedPersonUserId set to:\", pm.collectionVariables.get(\"associatedPersonUserId\"));",
                  "    } else {",
                  "        console.error(\"id not found in the response.\");",
                  "    }",
                  "} catch (e) {",
                  "    console.error(\"Could not parse response as JSON. Error:\", e);",
                  "    console.log(\"Raw Response Body:\", pm.response.text());",
                  "}"
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{longAccessToken}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"email\": \"roychon401@bitgo.com\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{domain-url}}/api/v2/organization/{{organizationId}}/enterprise/{{enterpriseId}}/user",
              "host": ["{{domain-url}}"],
              "path": ["api", "v2", "organization", "{{organizationId}}", "enterprise", "{{enterpriseId}}", "user"]
            }
          },
          "response": []
        },
        {
          "name": "Create Business Identity",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "try {",
                  "    const response = pm.response.json();",
                  "    console.log(\"Response JSON:\", response);",
                  "",
                  "    if (response && response.id) {",
                  "        pm.collectionVariables.set(\"businessIdentityId\", response.id);",
                  "        console.log(\"businessIdentityId set to:\", pm.collectionVariables.get(\"businessIdentityId\"));",
                  "    } else {",
                  "        console.error(\"id not found in the response.\");",
                  "    }",
                  "} catch (e) {",
                  "    console.error(\"Could not parse response as JSON. Error:\", e);",
                  "    console.log(\"Raw Response Body:\", pm.response.text());",
                  "}"
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{longAccessToken}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"type\": \"business\",\n    \"enterpriseId\": \"{{enterpriseId}}\",\n    \"organizationId\": \"{{organizationId}}\",\n    \"requestedProducts\": [\n        {\n            \"name\": \"Trade\",\n            \"bitgoOrg\": \"BitGo Trust\"\n        },\n        {\n            \"name\": \"Go Account\",\n            \"bitgoOrg\": \"BitGo Trust\"\n        }\n    ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{domain-url}}/api/identity-service/v1/identities",
              "host": ["{{domain-url}}"],
              "path": ["api", "identity-service", "v1", "identities"]
            }
          },
          "response": []
        },
        {
          "name": "Add Business Location",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{longAccessToken}}",
                  "type": "string"
                }
              ]
            },
            "method": "PATCH",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"business\": {\n    \"physicalBusinessAddress\": {\n      \"street1\": \"123 4th St\",\n      \"city\": \"San Francisco\",\n      \"subdivision\": \"CA\",\n      \"zip\": \"85255\",\n      \"country\": \"USA\"\n    },\n    \"businessName\": \"Test Business\"\n  }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{domain-url}}/api/identity-service/v1/identities/{{businessIdentityId}}",
              "host": ["{{domain-url}}"],
              "path": ["api", "identity-service", "v1", "identities", "{{businessIdentityId}}"]
            }
          },
          "response": []
        },
        {
          "name": "Update Legal Entity Structure",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{longAccessToken}}",
                  "type": "string"
                }
              ]
            },
            "method": "PATCH",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"business\": {\"legalEntityStructure\": \"corporationCAndS\"}\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{domain-url}}/api/identity-service/v1/identities/{{businessIdentityId}}",
              "host": ["{{domain-url}}"],
              "path": ["api", "identity-service", "v1", "identities", "{{businessIdentityId}}"]
            }
          },
          "response": []
        },
        {
          "name": "Create Individual Identities for Associated Persons",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "try {",
                  "    // Attempt to parse the JSON response body",
                  "    const response = pm.response.json();",
                  "    ",
                  "    console.log(\"Response JSON:\", response);",
                  "",
                  "    if (response && response.id) {",
                  "        // Set the environment variable",
                  "        pm.environment.set(\"associatedPersonIdentityId\", response.id);",
                  "    } else {",
                  "        console.error(\"Error parsing\");",
                  "    }",
                  "} catch (e) {",
                  "    // If the response is not valid JSON, this block will run",
                  "    console.error(\"Could not parse response as JSON. Error:\", e);",
                  "    console.log(\"Raw Response Body:\", pm.response.text());",
                  "}"
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{longAccessToken}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"type\": \"individual\",\n    \"userId\": \"{{userId}}\",\n    \"requestedProducts\": []\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{domain-url}}/api/identity-service/v1/identities",
              "host": ["{{domain-url}}"],
              "path": ["api", "identity-service", "v1", "identities"]
            }
          },
          "response": []
        },
        {
          "name": "Add Associated Persons to Business Identity",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{longAccessToken}}",
                  "type": "string"
                }
              ]
            },
            "method": "PATCH",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"associatedPeople\": [\n        {\n            \"role\": \"controlPerson\",\n            \"identityId\": \"{{associatedPersonIdentityId}}\"\n        }\n    ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{domain-url}}/api/identity-service/v1/identities/{{businessIdentityId}}",
              "host": ["{{domain-url}}"],
              "path": ["api", "identity-service", "v1", "identities", "{{businessIdentityId}}"]
            }
          },
          "response": []
        },
        {
          "name": "Update Individual Identities with Required Information",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{longAccessToken}}",
                  "type": "string"
                }
              ]
            },
            "method": "PATCH",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n        \"individual\": {\n            \"nameFirst\": \"Roy\",\n            \"nameLast\": \"Chon\",\n            \"birthdate\": {\n                \"month\": \"1\",\n                \"day\": \"1\",\n                \"year\": \"2000\"\n            },\n            \"identificationNumber\": \"12345678\",\n            \"phoneNumber\": {\n                \"countryCode\": \"1\",\n                \"phoneNumber\": \"5559876543\"\n            },\n            \"occupation\": \"Other\",\n            \"countryOfResidence\": \"USA\",\n            \"countryOfCitizenship\": \"USA\",\n            \"address\": {\n                \"street1\": \"123 4th st\",\n                \"city\": \"San Francisco\",\n                \"subdivision\": \"CA\",\n                \"zip\": \"94103\",\n                \"country\": \"USA\"\n            },\n            \"politicallyExposedPerson\": false\n        }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{domain-url}}/api/identity-service/v1/identities/{{associatedPersonIdentityId}}",
              "host": ["{{domain-url}}"],
              "path": ["api", "identity-service", "v1", "identities", "{{associatedPersonIdentityId}}"]
            }
          },
          "response": []
        },
        {
          "name": "Associate Documents with Identity",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{longAccessToken}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"documents\": [{\n        \"documentId\": \"{{currentKYBDocumentID}}\",\n        \"documentType\": \"w9\"\n    }]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{domain-url}}/api/identity-service/v1/identities/{{businessIdentityId}}/documents",
              "host": ["{{domain-url}}"],
              "path": ["api", "identity-service", "v1", "identities", "{{businessIdentityId}}", "documents"]
            }
          },
          "response": []
        },
        {
          "name": "Check KYB Status",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{longAccessToken}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{domain-url}}/api/identity-service/v1/identities/{{businessIdentityId}}",
              "host": ["{{domain-url}}"],
              "path": ["api", "identity-service", "v1", "identities", "{{businessIdentityId}}"]
            }
          },
          "response": []
        },
        {
          "name": "Finalize Business Identity",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{longAccessToken}}",
                  "type": "string"
                }
              ]
            },
            "method": "PATCH",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"finalizeSubmission\": true\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{domain-url}}/api/identity-service/v1/identities/{{businessIdentityId}}",
              "host": ["{{domain-url}}"],
              "path": ["api", "identity-service", "v1", "identities", "{{businessIdentityId}}"]
            }
          },
          "response": []
        },
        {
          "name": "Sign Contracts",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{longAccessToken}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"contractType\": \"master-agreement\",\n    \"signedDate\": \"2025-09-09T18:47:23\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{domain-url}}/api/v2/organization/{{organizationId}}/enterprise/{{enterpriseId}}/contract",
              "host": ["{{domain-url}}"],
              "path": ["api", "v2", "organization", "{{organizationId}}", "enterprise", "{{enterpriseId}}", "contract"]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Create Policy Rules",
      "item": [
        {
          "name": "Get Scope Id",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{longAccessToken}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{domain-url}}/api/policy/v1/enterprises/{{enterpriseId}}/scopes",
              "host": ["{{domain-url}}"],
              "path": ["api", "policy", "v1", "enterprises", "{{enterpriseId}}", "scopes"]
            }
          },
          "response": []
        },
        {
          "name": "Get Touchpoint Name",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{longAccessToken}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{domain-url}}/api/policy/v1/enterprises/{{enterpriseId}}/scopes/{{scopeId}}/touchpoints",
              "host": ["{{domain-url}}"],
              "path": ["api", "policy", "v1", "enterprises", "{{enterpriseId}}", "scopes", "{{scopeId}}", "touchpoints"]
            }
          },
          "response": []
        },
        {
          "name": "Create Policy Rule",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{longAccessToken}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"name\": \"Spending limit - require approval on withdrawals of more than 100 USD\",\n    \"adminOnly\": false,\n    \"clauses\": [\n        {\n            \"conditions\": [\n                {\n                    \"name\": \"transfer.amount\",\n                    \"parameters\": {\n                        \"operator\": \">\",\n                        \"amount\": \"100\",\n                        \"coin\": \"usd\"\n                    }\n                }\n            ],\n            \"actions\": [\n                {\n                    \"name\": \"approvals.customer.enterpriseUser\",\n                    \"parameters\": {\n                        \"userIds\": [\n                            \"{{userId}}\"\n                        ],\n                        \"minRequired\": \"1\",\n                        \"initiatorIsAllowedToApprove\": false\n                    }\n                }\n            ]\n        }\n    ],\n    \"filteringConditions\": [\n        {\n            \"name\": \"wallet.ids\",\n            \"parameters\": {\n                \"walletId\": [\"{{GoWalletId}}\"]\n            }\n        }\n    ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{domain-url}}/api/policy/v1/enterprises/{{enterpriseId}}/touchpoints/{{touchpointName}}/rules",
              "host": ["{{domain-url}}"],
              "path": [
                "api",
                "policy",
                "v1",
                "enterprises",
                "{{enterpriseId}}",
                "touchpoints",
                "{{touchpointName}}",
                "rules"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Get Pending Approval Id",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{longAccessToken}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{domain-url}}/api/v2/pendingApprovals",
              "host": ["{{domain-url}}"],
              "path": ["api", "v2", "pendingApprovals"]
            }
          },
          "response": []
        },
        {
          "name": "Approve Pending Approval",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{longAccessToken}}",
                  "type": "string"
                }
              ]
            },
            "method": "PUT",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"state\": \"approved\",\n    \"otp\": \"{{otp}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{domain-url}}/api/v2/pendingApprovals/{{approvalId}}",
              "host": ["{{domain-url}}"],
              "path": ["api", "v2", "pendingApprovals", "{{approvalId}}"]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Create Go Accounts",
      "item": [
        {
          "name": "Generate Go Wallet",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "const response = pm.response.json();",
                  "",
                  "if (response.wallet && response.wallet.id) {",
                  "    pm.environment.set(\"walletId\", response.wallet.id);",
                  "    console.log(\"walletId set to:\", response.wallet.id);",
                  "} else {",
                  "    console.error(\"wallet.id not found in response\");",
                  "}"
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{longAccessToken}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"label\": \"Roy+3-ofc-wallet\",\n  \"type\": \"trading\",\n  \"passphrase\": \"{{walletPassphrase}}\",\n  \"enterprise\": \"{{enterpriseId}}\",\n  \"passcodeEncryptionCode\": \"{{walletPassphrase}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{bitgoExpressUrl}}/api/v2/ofc/wallet/generate",
              "host": ["{{bitgoExpressUrl}}"],
              "path": ["api", "v2", "ofc", "wallet", "generate"]
            }
          },
          "response": []
        },
        {
          "name": "Create Receive Address",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{longAccessToken}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"onToken\": \"ofctsol\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{domain-url}}/api/v2/ofc/wallet/{{walletId}}/address",
              "host": ["{{domain-url}}"],
              "path": ["api", "v2", "ofc", "wallet", "{{walletId}}", "address"]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Fund Go Accounts",
      "item": [
        {
          "name": "ACH",
          "item": [
            {
              "name": "Get Transfer Limit",
              "protocolProfileBehavior": {
                "disableBodyPruning": true
              },
              "request": {
                "auth": {
                  "type": "bearer",
                  "bearer": [
                    {
                      "key": "token",
                      "value": "{{longAccessToken}}",
                      "type": "string"
                    }
                  ]
                },
                "method": "GET",
                "header": [],
                "body": {
                  "mode": "raw",
                  "raw": "",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{domain-url}}/api/tradfi/v1/enterprise-transfer-limits/{{enterpriseId}}/usd/ach-us/in",
                  "host": ["{{domain-url}}"],
                  "path": [
                    "api",
                    "tradfi",
                    "v1",
                    "enterprise-transfer-limits",
                    "{{enterpriseId}}",
                    "usd",
                    "ach-us",
                    "in"
                  ]
                }
              },
              "response": []
            },
            {
              "name": "Get ACH Agreement",
              "request": {
                "auth": {
                  "type": "bearer",
                  "bearer": [
                    {
                      "key": "token",
                      "value": "{{longAccessToken}}",
                      "type": "string"
                    }
                  ]
                },
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{domain-url}}/api/fiat/v1/transaction/ach-debit/agreement?amount=100&bankId={{bankAccountId}}",
                  "host": ["{{domain-url}}"],
                  "path": ["api", "fiat", "v1", "transaction", "ach-debit", "agreement"],
                  "query": [
                    {
                      "key": "amount",
                      "value": "100"
                    },
                    {
                      "key": "bankId",
                      "value": "{{bankAccountId}}"
                    }
                  ]
                }
              },
              "response": []
            },
            {
              "name": "Initiate ACH Deposit",
              "request": {
                "auth": {
                  "type": "bearer",
                  "bearer": [
                    {
                      "key": "token",
                      "value": "{{longAccessToken}}",
                      "type": "string"
                    }
                  ]
                },
                "method": "POST",
                "header": [],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"amount\": \"1000\",\n  \"checkboxAgreement\": true,\n  \"bankId\": \"{{bankAccountId}}\",\n  \"goAccountId\": \"{{walletId}}\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{domain-url}}/api/fiat/v1/transaction/ach-debit",
                  "host": ["{{domain-url}}"],
                  "path": ["api", "fiat", "v1", "transaction", "ach-debit"]
                }
              },
              "response": []
            }
          ]
        },
        {
          "name": "Wire",
          "item": [
            {
              "name": "Get Deposit Details",
              "request": {
                "auth": {
                  "type": "bearer",
                  "bearer": [
                    {
                      "key": "token",
                      "value": "{{longAccessToken}}",
                      "type": "string"
                    }
                  ]
                },
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{domain-url}}/api/v2/bankaccounts/deposit/info?goAccountId={{walletId}}&currency=tfiatusd",
                  "host": ["{{domain-url}}"],
                  "path": ["api", "v2", "bankaccounts", "deposit", "info"],
                  "query": [
                    {
                      "key": "goAccountId",
                      "value": "{{walletId}}"
                    },
                    {
                      "key": "currency",
                      "value": "tfiatusd"
                    }
                  ]
                }
              },
              "response": []
            },
            {
              "name": "Get id hash",
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "exec": [
                      "const response = pm.response.json();",
                      "",
                      "if (response.bankAccounts && response.bankAccounts.length > 0 && response.bankAccounts[0].idHash) {",
                      "    pm.environment.set(\"idHash\", response.bankAccounts[0].idHash);",
                      "    console.log(\"idHash set to:\", response.bankAccounts[0].idHash);",
                      "} else {",
                      "    console.error(\"idHash not found in response\");",
                      "}"
                    ],
                    "type": "text/javascript",
                    "packages": {},
                    "requests": {}
                  }
                }
              ],
              "request": {
                "auth": {
                  "type": "bearer",
                  "bearer": [
                    {
                      "key": "token",
                      "value": "{{longAccessToken}}",
                      "type": "string"
                    }
                  ]
                },
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{domain-url}}/api/v2/bankaccounts?enterpriseId={{enterpriseId}}",
                  "host": ["{{domain-url}}"],
                  "path": ["api", "v2", "bankaccounts"],
                  "query": [
                    {
                      "key": "enterpriseId",
                      "value": "{{enterpriseId}}"
                    }
                  ]
                }
              },
              "response": []
            },
            {
              "name": "Build Transaction",
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "exec": [
                      "const response = pm.response.json();",
                      "",
                      "if (response.payload) {",
                      "    pm.environment.set(\"transactionPayload\", response.payload);",
                      "    console.log(\"transactionPayload set to:\", response.payload);",
                      "} else {",
                      "    console.error(\"payload not found in response\");",
                      "}"
                    ],
                    "type": "text/javascript",
                    "packages": {},
                    "requests": {}
                  }
                }
              ],
              "request": {
                "auth": {
                  "type": "bearer",
                  "bearer": [
                    {
                      "key": "token",
                      "value": "{{longAccessToken}}",
                      "type": "string"
                    }
                  ]
                },
                "method": "POST",
                "header": [],
                "body": {
                  "mode": "raw",
                  "raw": "{\n    \"recipients\": [\n        {\n            \"amount\": \"1000\",\n            \"address\": \"{{idHash}}\"\n        }\n    ]\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{domain-url}}/api/v2/{{coin}}/wallet/{{walletId}}/tx/build",
                  "host": ["{{domain-url}}"],
                  "path": ["api", "v2", "{{coin}}", "wallet", "{{walletId}}", "tx", "build"]
                }
              },
              "response": []
            },
            {
              "name": "Authenticate Transaction",
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "exec": [
                      "const response = pm.response.json();",
                      "",
                      "if (response.signature) {",
                      "    pm.environment.set(\"transactionSignature\", response.signature);",
                      "    console.log(\"transactionSignature set to:\", response.signature);",
                      "} else {",
                      "    console.error(\"payload or signature not found in response\");",
                      "}"
                    ],
                    "type": "text/javascript",
                    "packages": {},
                    "requests": {}
                  }
                }
              ],
              "request": {
                "auth": {
                  "type": "bearer",
                  "bearer": [
                    {
                      "key": "token",
                      "value": "{{longAccessToken}}",
                      "type": "string"
                    }
                  ]
                },
                "method": "POST",
                "header": [],
                "body": {
                  "mode": "raw",
                  "raw": "{\n    \"walletId\": \"{{walletId}}\",\n   \"walletPassphrase\": \"{{walletPassphrase}}\",\n   \"payload\":\"{{transactionPayload}}\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{bitgoExpressUrl}}/api/v2/ofc/signPayload",
                  "host": ["{{bitgoExpressUrl}}"],
                  "path": ["api", "v2", "ofc", "signPayload"]
                }
              },
              "response": []
            },
            {
              "name": "Send Transaction",
              "request": {
                "auth": {
                  "type": "bearer",
                  "bearer": [
                    {
                      "key": "token",
                      "value": "{{longAccessToken}}",
                      "type": "string"
                    }
                  ]
                },
                "method": "POST",
                "header": [],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"recipients\": [\n    {\n      \"amount\": \"1000\",\n      \"address\": \"{{idHash}}\"\n    }\n  ],\n  \"halfSigned\": {\n    \"payload\": \"{{transactionPayload}}\",\n    \"signature\": \"{{transactionSignature}}\"\n  }\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{domain-url}}/api/v2/ofctusd/wallet/{{walletId}}/tx/send",
                  "host": ["{{domain-url}}"],
                  "path": ["api", "v2", "ofctusd", "wallet", "{{walletId}}", "tx", "send"]
                }
              },
              "response": []
            },
            {
              "name": "Unlock Session",
              "request": {
                "auth": {
                  "type": "bearer",
                  "bearer": [
                    {
                      "key": "token",
                      "value": "{{longAccessToken}}",
                      "type": "string"
                    }
                  ]
                },
                "method": "POST",
                "header": [],
                "body": {
                  "mode": "raw",
                  "raw": "{\n    \"duration\": 3600,\n    \"otp\": \"000000\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{domain-url}}/api/v2/user/unlock",
                  "host": ["{{domain-url}}"],
                  "path": ["api", "v2", "user", "unlock"]
                }
              },
              "response": []
            }
          ]
        },
        {
          "name": "Go Network",
          "item": [
            {
              "name": "Create Go Connection",
              "item": [
                {
                  "name": "List your enterprise",
                  "request": {
                    "auth": {
                      "type": "bearer",
                      "bearer": [
                        {
                          "key": "token",
                          "value": "{{longAccessToken}}",
                          "type": "string"
                        }
                      ]
                    },
                    "method": "POST",
                    "header": [
                      {
                        "key": "user-id",
                        "value": "{{userId}}",
                        "type": "text"
                      },
                      {
                        "key": "enterprise-id",
                        "value": "{{enterpriseId}}",
                        "type": "text"
                      }
                    ],
                    "url": {
                      "raw": "{{domain-url}}/api/address-book/v1/listing/global",
                      "host": ["{{domain-url}}"],
                      "path": ["api", "address-book", "v1", "listing", "global"]
                    }
                  },
                  "response": []
                },
                {
                  "name": "Create enterprise listing entry",
                  "request": {
                    "auth": {
                      "type": "bearer",
                      "bearer": [
                        {
                          "key": "token",
                          "value": "{{longAccessToken}}",
                          "type": "string"
                        }
                      ]
                    },
                    "method": "POST",
                    "header": [
                      {
                        "key": "enterprise-id",
                        "value": "{{enterpriseId}}",
                        "type": "text"
                      },
                      {
                        "key": "user-id",
                        "value": "{{userId}}",
                        "type": "text"
                      }
                    ],
                    "body": {
                      "mode": "raw",
                      "raw": "{\n    \"walletId\": \"{{walletId}}\",\n    \"public\": true\n}",
                      "options": {
                        "raw": {
                          "language": "json"
                        }
                      }
                    },
                    "url": {
                      "raw": "{{domain-url}}/api/address-book/v1/listing/entry/global",
                      "host": ["{{domain-url}}"],
                      "path": ["api", "address-book", "v1", "listing", "entry", "global"]
                    }
                  },
                  "response": []
                },
                {
                  "name": "Get Listing Entry ID",
                  "request": {
                    "auth": {
                      "type": "bearer",
                      "bearer": [
                        {
                          "key": "token",
                          "value": "{{longAccessToken}}",
                          "type": "string"
                        }
                      ]
                    },
                    "method": "GET",
                    "header": [
                      {
                        "key": "user-id",
                        "value": "{{userId}}",
                        "type": "text"
                      },
                      {
                        "key": "enterprise-id",
                        "value": "{{enterpriseId}}",
                        "type": "text"
                      }
                    ],
                    "url": {
                      "raw": "{{domain-url}}/api/address-book/v1/listing/global",
                      "host": ["{{domain-url}}"],
                      "path": ["api", "address-book", "v1", "listing", "global"]
                    }
                  },
                  "response": []
                },
                {
                  "name": "Create Counterparty Connection",
                  "request": {
                    "auth": {
                      "type": "bearer",
                      "bearer": [
                        {
                          "key": "token",
                          "value": "{{longAccessToken}}",
                          "type": "string"
                        }
                      ]
                    },
                    "method": "POST",
                    "header": [
                      {
                        "key": "user-id",
                        "value": "{{userId}}",
                        "type": "text"
                      },
                      {
                        "key": "enterprise-id",
                        "value": "{{enterpriseId}}",
                        "type": "text"
                      }
                    ],
                    "body": {
                      "mode": "raw",
                      "raw": "{\n    \"localListingName\": \"Roy-3-ofc-trading-wallet\",\n    \"listingEntryId\": \"\",\n    \"targetListingEntryId\": \"\"\n}",
                      "options": {
                        "raw": {
                          "language": "json"
                        }
                      }
                    },
                    "url": {
                      "raw": "{{domain-url}}/api/address-book/v1/connections",
                      "host": ["{{domain-url}}"],
                      "path": ["api", "address-book", "v1", "connections"]
                    }
                  },
                  "response": []
                }
              ]
            },
            {
              "name": "Create Settlement",
              "request": {
                "auth": {
                  "type": "bearer",
                  "bearer": [
                    {
                      "key": "token",
                      "value": "{{shortAccessToken}}",
                      "type": "string"
                    }
                  ]
                },
                "method": "POST",
                "header": [],
                "body": {
                  "mode": "raw",
                  "raw": "{\n    // \"counterpartyAccountId\": \"69651c330dda6696d9128410427933e6\",\n    \"addressBookConnectionId\": \"eafc174e-d1b9-4baf-ba78-275e6d699850\",\n    \"addressBookConnectionUpdatedAt\": \"2026-01-14T18:14:20.275Z\",\n    \"externalId\": \"ac97ad6d-03c9-4e08-ae25-92301e4a4755\",\n    \"assetTransfers\": [\n      {\n        \"currency\": \"ofctusd\",\n        \"quantity\": \"-10000\"\n      }\n    ],\n    \"checkForDuplicates\": true\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{domain-url}}/api/clearing/v1/enterprise/{{enterpriseId}}/account/{{walletId}}/settlement",
                  "host": ["{{domain-url}}"],
                  "path": [
                    "api",
                    "clearing",
                    "v1",
                    "enterprise",
                    "{{enterpriseId}}",
                    "account",
                    "{{walletId}}",
                    "settlement"
                  ]
                }
              },
              "response": []
            }
          ]
        },
        {
          "name": "Add Bank Account",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "const response = pm.response.json();",
                  "",
                  "if (response.id) {",
                  "    pm.environment.set(\"bankAccountId\", response.id);",
                  "    console.log(\"bankAccountId set to:\", response.id);",
                  "} else {",
                  "    console.error(\"id not found in response\");",
                  "}"
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{longAccessToken}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"type\": \"ach\",\n  \"routingNumber\": \"021000089\",\n  \"name\": \"Roy+2-Citi3-Operations\",\n  \"shortCountryCode\": \"US\",\n  \"accountNumber\": \"1122334455\",\n  \"enterpriseId\": \"{{enterpriseId}}\",\n  \"currency\": \"tfiatusd\",\n  \"ownerName\": \"Roy Chon\",\n  \"accountType\": \"checking\",\n  \"description\": \"Main Operating Account\",\n  \"intermediaryBankName\": \"Citibank, N.A.\",\n  \"ownerAddressLine1\": \"555 California Street\",\n  \"ownerAddressLine2\": \"Floor 12\",\n  \"ownerAddressCityLocality\": \"San Francisco\",\n  \"ownerAddressStateProvince\": \"CA\",\n  \"ownerAddressPostalCode\": \"94104\",\n  \"ownerAddressCountryCode\": \"US\",\n  \"bankAddressLine1\": \"388 Greenwich Street\",\n  \"bankAddressCityLocality\": \"New York\",\n  \"bankAddressStateProvince\": \"NY\",\n  \"bankAddressPostalCode\": \"10013\",\n  \"bankAddressCountryCode\": \"US\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{domain-url}}/api/v2/bankaccounts",
              "host": ["{{domain-url}}"],
              "path": ["api", "v2", "bankaccounts"]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Webhooks",
      "item": [
        {
          "name": "Organization Webhooks",
          "item": [
            {
              "name": "Create Organization Webhook",
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "exec": [
                      "const response = pm.response.json();",
                      "",
                      "if (response.id) {",
                      "    pm.environment.set(\"webhookId\", response.id);",
                      "    console.log(\"webhookId set to:\", response.id);",
                      "} else {",
                      "    console.error(\"id not found in response\");",
                      "}"
                    ],
                    "type": "text/javascript",
                    "packages": {},
                    "requests": {}
                  }
                }
              ],
              "request": {
                "auth": {
                  "type": "bearer",
                  "bearer": [
                    {
                      "key": "token",
                      "value": "{{longAccessToken}}",
                      "type": "string"
                    }
                  ]
                },
                "method": "POST",
                "header": [],
                "body": {
                  "mode": "raw",
                  "raw": "{\n    \"type\": \"bankAccount\",\n    \"url\": \"https://webhook.site/0893f25c-6882-43ad-bc47-2f6b11076586\",\n    \"label\": \"Add bank account for child go account\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{domain-url}}/api/v2/organization/{{organizationId}}/webhook",
                  "host": ["{{domain-url}}"],
                  "path": ["api", "v2", "organization", "{{organizationId}}", "webhook"]
                }
              },
              "response": []
            },
            {
              "name": "Create Webhook Secret",
              "request": {
                "auth": {
                  "type": "bearer",
                  "bearer": [
                    {
                      "key": "token",
                      "value": "{{longAccessToken}}",
                      "type": "string"
                    }
                  ]
                },
                "method": "POST",
                "header": [
                  {
                    "key": "user-id",
                    "value": "{{userId}}",
                    "type": "text",
                    "disabled": true
                  },
                  {
                    "key": "enterprise-id",
                    "value": "{{enterpriseId}}",
                    "type": "text",
                    "disabled": true
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n    \"organizationId\": \"{{organizationId}}\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{domain-url}}/api/v2/webhook/secret",
                  "host": ["{{domain-url}}"],
                  "path": ["api", "v2", "webhook", "secret"]
                }
              },
              "response": []
            },
            {
              "name": "Verify Webhook Notification",
              "request": {
                "auth": {
                  "type": "bearer",
                  "bearer": [
                    {
                      "key": "token",
                      "value": "{{longAccessToken}}",
                      "type": "string"
                    }
                  ]
                },
                "method": "POST",
                "header": [],
                "body": {
                  "mode": "raw",
                  "raw": "{\n    \"signature\": \"\",\n    \"notificationPayload\": \"\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{domain-url}}/api/v2/webhook/{{webhookId}}/verify",
                  "host": ["{{domain-url}}"],
                  "path": ["api", "v2", "webhook", "{{webhookId}}", "verify"]
                }
              },
              "response": []
            }
          ]
        },
        {
          "name": "Enterprise Webhooks",
          "item": [
            {
              "name": "Create Enterprise Webhook",
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "exec": [
                      "const response = pm.response.json();",
                      "",
                      "if (response.id) {",
                      "    pm.environment.set(\"webhookId\", response.id);",
                      "    console.log(\"webhookId set to:\", response.id);",
                      "} else {",
                      "    console.error(\"id not found in response\");",
                      "}"
                    ],
                    "type": "text/javascript",
                    "packages": {},
                    "requests": {}
                  }
                }
              ],
              "request": {
                "auth": {
                  "type": "bearer",
                  "bearer": [
                    {
                      "key": "token",
                      "value": "{{longAccessToken}}",
                      "type": "string"
                    }
                  ]
                },
                "method": "POST",
                "header": [
                  {
                    "key": "user-id",
                    "value": "{{userId}}",
                    "type": "text",
                    "disabled": true
                  },
                  {
                    "key": "enterprise-id",
                    "value": "{{enterpriseId}}",
                    "type": "text",
                    "disabled": true
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n    \"type\": \"accessToken\",\n    \"url\": \"https://webhook.site/f75b8993-2a1b-49df-8766-7d937f3e78c2\",\n    \"label\": \"Access Token Enterprise Webhook\"\n\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{domain-url}}/api/v2/enterprise/{{enterpriseId}}/webhooks",
                  "host": ["{{domain-url}}"],
                  "path": ["api", "v2", "enterprise", "{{enterpriseId}}", "webhooks"]
                }
              },
              "response": []
            },
            {
              "name": "Create Webhook Secret",
              "request": {
                "auth": {
                  "type": "bearer",
                  "bearer": [
                    {
                      "key": "token",
                      "value": "{{longAccessToken}}",
                      "type": "string"
                    }
                  ]
                },
                "method": "POST",
                "header": [
                  {
                    "key": "user-id",
                    "value": "{{userId}}",
                    "type": "text",
                    "disabled": true
                  },
                  {
                    "key": "enterprise-id",
                    "value": "{{enterpriseId}}",
                    "type": "text",
                    "disabled": true
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n    \"enterpriseId\": \"{{enterpriseId}}\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{domain-url}}/api/v2/webhook/secret",
                  "host": ["{{domain-url}}"],
                  "path": ["api", "v2", "webhook", "secret"]
                }
              },
              "response": []
            },
            {
              "name": "Verify Webhook Notification",
              "request": {
                "auth": {
                  "type": "bearer",
                  "bearer": [
                    {
                      "key": "token",
                      "value": "{{longAccessToken}}",
                      "type": "string"
                    }
                  ]
                },
                "method": "POST",
                "header": [],
                "body": {
                  "mode": "raw",
                  "raw": "{\n    \"signature\": \"\",\n    \"notificationPayload\": \"\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{domain-url}}/api/v2/webhook/{{webhookId}}/verify",
                  "host": ["{{domain-url}}"],
                  "path": ["api", "v2", "webhook", "{{webhookId}}", "verify"]
                }
              },
              "response": []
            }
          ]
        }
      ]
    }
  ],
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{accessToken}}",
        "type": "string"
      }
    ]
  },
  "event": [
    {
      "listen": "prerequest",
      "script": {
        "type": "text/javascript",
        "packages": {},
        "requests": {},
        "exec": [""]
      }
    },
    {
      "listen": "test",
      "script": {
        "type": "text/javascript",
        "packages": {},
        "requests": {},
        "exec": [""]
      }
    }
  ],
  "variable": [
    {
      "key": "businessIdentityId",
      "value": ""
    },
    {
      "key": "identityId",
      "value": ""
    },
    {
      "key": "associatedPersonUserId",
      "value": ""
    },
    {
      "key": "associatedPersonIdentityId",
      "value": "",
      "type": "default"
    },
    {
      "key": "walletPassphrase",
      "value": "",
      "type": "default"
    }
  ]
}
