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.
-
Create a child enterprise and end user account. The service user automatically gets admin access to the new child enterprise. The
additionalAdminsfield is optional — omit it if the service user is the only admin needed. SetaccountTypetoindividualfor a person orentityfor a business. This determines whether KYC or KYB verification is required.Prerequisites: You must 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>"
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",
"isCaaS": "'"true"'"
}'
// 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',
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"
}