Crypto-as-a-Service: Set Up Child Enterprises
Create child enterprises and user accounts within your organization for Crypto-as-a-Service. See the Guide.
-
You create a child enterprise and end user account within your parent organization, and add the service user to the child enterprise. You must be an organization admin to perform this operation. Specify
accountTypeas eitherindividualorentitydepending on whether your end user is an individual person or a business, which determines whether KYC or KYB verification is required.Prerequisites: You must set up your organization first and be an organization admin.
// 1. Set Up Child Enterprise
export ORGANIZATION_ID="<YOUR_ORGANIZATION_ID>"
export ORG_ADMIN_TOKEN="<ORG_ADMIN_ACCESS_TOKEN>"
export EMAIL="<YOUR_USER'S_EMAIL>"
export IDEMPOTENCY_KEY="<UNIQUE_IDENTIFIER_PER_REQUEST>"
export ORG_SERVICE_USER="<SERVICE_USER_ID>"
curl -X POST \
"https://app.bitgo-test.com/api/v2/organization/$ORGANIZATION_ID/enterprise" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ORG_ADMIN_TOKEN" \
-d '{
"email": "'"$EMAIL"'",
"idempotencyKey": "'"$IDEMPOTENCY_KEY"'",
"accountType": "individual",
"additionalAdmins": [],
// 1. Set Up Child Enterprise
import superagent from 'superagent';
import { v4 as uuidv4 } from 'uuid';
const ACCESS_TOKEN = '<ORG_ADMIN_ACCESS_TOKEN>';
const organizationId = '<YOUR_ORGANIZATION_ID>';
const apiUrl = `https://app.bitgo-test.com/api/v2/organization/${organizationId}/enterprise/`
const params = {
email: 'johnsmith@bitgo.com',
idempotencyKey: uuidv4(),
accountType: 'individual',
additionalAdmins: [],
isCaaS: 'true'
};
response = await superagent
.post(apiUrl)
.set('Authorization', `Bearer ${ACCESS_TOKEN}`)
.set('Accept', 'application/json')
.send(params);
Response
// 1. Set Up Child Enterprise Response
{
"enterpriseId": "59cd72485007a239fb00282ed480da1f",
"userId": "59cd72485007a239fb00282ed480da1f"
}