Supported versions:
Unsupported versions:
In this step, you create an Apigee organization.
To create a new organization and provision it:
Note: If you have an Apigee evaluation account, the organization you create will expire after 60 days. At that time, the organization will be deleted.If this occurs, you may encounter the following error: "Project <project> doesn't have an Apigee organization provisioned."
To resolve this error, follow the steps to create a new organization and provision it.
On the command line, get your gcloud authentication
credentials using the following command:
export TOKEN=$(gcloud auth print-access-token)
To check that your token was populated, use echo, as the
following example shows:
echo $TOKEN
This should display your token as an encoded string.
for /f "tokens=*" %a in ('gcloud auth print-access-token') do set TOKEN=%aTo check that your token was populated, use echo, as the
following example shows:
echo %TOKEN%
This should display your token as an encoded string.
In Step 1, you created the
PROJECT_ID environment variable. Add the following environment variables. Select the tab that corresponds to the type of organization you need: No data residency or with Data residency:
export ORG_NAME=$PROJECT_IDexport ANALYTICS_REGION="ANALYTICS_REGION"export RUNTIMETYPE=HYBRID
set ORG_NAME=$PROJECT_IDset ANALYTICS_REGION="ANALYTICS_REGION"set RUNTIMETYPE=HYBRID
Where:
ORG_NAME (Required): This value must
match the PROJECT_ID.
ANALYTICS_REGION (Required): The primary region for
analytics data storage. For a list of available Apigee API Analytics regions, see
Apigee locations.
RUNTIMETYPE (Required): Must be set to HYBRID.
export ORG_NAME=$PROJECT_IDexport RUNTIMETYPE=HYBRIDexport CONTROL_PLANE_LOCATION="YOUR_CONTROL_PLANE_LOCATION"export CONSUMER_DATA_REGION="YOUR_CONSUMER_DATA_REGION"export BILLING_TYPE="SUBSCRIPTION"
set ORG_NAME=$PROJECT_IDset RUNTIMETYPE=HYBRIDset CONTROL_PLANE_LOCATION="YOUR_CONTROL_PLANE_LOCATION"set CONSUMER_DATA_REGION="YOUR_CONSUMER_DATA_REGION"set BILLING_TYPE="SUBSCRIPTION"
Where:
ORG_NAME: This value must
match the PROJECT_ID.
RUNTIMETYPE: Must be set to HYBRID.
CONTROL_PLANE_LOCATION: The location where customer
core content like proxy bundles is stored. For a list see Available Apigee API control plane regions.
CONSUMER_DATA_REGION: A sub-region of the control plane region. You must specify both the
CONTROL_PLANE_LOCATION and the CONSUMER_DATA_REGION.
For a list of available consumer data regions, see
Apigee locations.
BILLING_TYPE: Must be set to "SUBSCRIPTION". This is the billing type for your Apigee hybrid organization. See Subscription entitlements for more information.
For example:
export ORG_NAME=$PROJECT_IDexport RUNTIMETYPE=HYBRIDexport CONSUMER_DATA_REGION="us-west1"export CONTROL_PLANE_LOCATION="us"export BILLING_TYPE="SUBSCRIPTION"
curl -H "Authorization: Bearer $TOKEN" -X POST -H "content-type:application/json" \
-d '{
"name":"'"$ORG_NAME"'",
"runtimeType":"'"$RUNTIMETYPE"'",
"analyticsRegion":"'"$ANALYTICS_REGION"'"
}' \
"https://apigee.googleapis.com/v1/organizations?parent=projects/$PROJECT_ID"curl -H "Authorization: Bearer $TOKEN" -X POST -H "content-type:application/json" \
-d '{
"name":"'"$ORG_NAME"'",
"billingType":"'"$BILLING_TYPE"'",
"runtimeType":"'"$RUNTIMETYPE"'",
"apiConsumerDataLocation":"'"$CONSUMER_DATA_REGION"'"
}' \
"https://$CONTROL_PLANE_LOCATION-apigee.googleapis.com/v1/organizations?parent=projects/$PROJECT_ID"On a successful creation request, the organizations API responds with a message similar to the following:
{ "name": "organizations/org_name/operations/LONG_RUNNING_OPERATION_ID", "metadata": { "@type": "type.googleapis.com/google.cloud.apigee.v1.OperationMetadata", "operationType": "INSERT", "targetResourceName": "organizations/org_name", "state": "IN_PROGRESS" } }
Where:
As the state property in the response indicates, Apigee has started to create
the new organization, so
its state is IN_PROGRESS. This process can take several minutes.
If you get an error, see Troubleshooting organization creation.
export LONG_RUNNING_OPERATION_ID=LONG_RUNNING_OPERATION_ID
export LONG_RUNNING_OPERATION_ID=6abc8a72-46de-f9da-bcfe-70d9ab347e4f
curl -H "Authorization: Bearer $TOKEN" \ "https://apigee.googleapis.com/v1/organizations/$ORG_NAME/operations/$LONG_RUNNING_OPERATION_ID"
The following examples show possible responses to this request:
If Apigee is still creating the organization, Apigee responds with a status of
IN_PROGRESS. For example:
{ "name": "organizations/ORG_NAME/operations/LONG_RUNNING_OPERATION_ID", "metadata": { "@type": "type.googleapis.com/google.cloud.apigee.v1.OperationMetadata", "operationType": "INSERT", "targetResourceName": "organizations/ORG_NAME", "state": "IN_PROGRESS" } }
You should wait a little longer before attempting to verify that the creation process is complete.
When the organization has been provisioned, the state of the long-running operation is
FINISHED. For example:
{ "name": "organizations/ORG_NAME/operations/LONG_RUNNING_OPERATION_ID", "metadata": { "@type": "type.googleapis.com/google.cloud.apigee.v1.OperationMetadata", "operationType": "INSERT", "targetResourceName": "organizations/ORG_NAME", "state": "FINISHED" }, "done": true, "response": { "@type": "type.googleapis.com/google.cloud.apigee.v1.Organization", "name": "ORG_NAME", "description": "", "createdAt": "1626237148461", "lastModifiedAt": "1626237149384", "properties": { "property": [ { "name": "features.hybrid.enabled", "value": "true" }, { "name": "features.mart.connect.enabled", "value": "true" } ] }, "analyticsRegion": "ANALYTICS_REGION", "runtimeType": "HYBRID", "subscriptionType": "TRIAL", "state": "ACTIVE", "billingType": "EVALUATION", "expiresAt": "1631421073171", "addonsConfig": { "advancedApiOpsConfig": {}, "integrationConfig": {}, "monetizationConfig": {} } } }
curl -H "Authorization: Bearer $TOKEN" \ "https://$CONTROL_PLANE_LOCATION-apigee.googleapis.com/v1/organizations/$ORG_NAME/operations/$LONG_RUNNING_OPERATION_ID"
The following examples show possible responses to this request:
If Apigee is still creating the organization, Apigee responds with a status of
IN_PROGRESS. For example:
{ "name": "organizations/ORG_NAME/operations/LONG_RUNNING_OPERATION_ID", "metadata": { "@type": "type.googleapis.com/google.cloud.apigee.v1.OperationMetadata", "operationType": "INSERT", "targetResourceName": "organizations/ORG_NAME", "state": "IN_PROGRESS" } }
You should wait a little longer before attempting to verify that the creation process is complete.
When the organization has been provisioned, the state of the long-running operation is
FINISHED. For example:
{ "name": "organizations/ORG_NAME/operations/LONG_RUNNING_OPERATION_ID", "metadata": { "@type": "type.googleapis.com/google.cloud.apigee.v1.OperationMetadata", "operationType": "INSERT", "targetResourceName": "organizations/ORG_NAME", "state": "FINISHED" }, "done": true, "response": { "@type": "type.googleapis.com/google.cloud.apigee.v1.Organization", "name": "ORG_NAME", "description": "", "createdAt": "1626237148461", "lastModifiedAt": "1626237149384", "properties": { "property": [ { "name": "features.hybrid.enabled", "value": "true" }, { "name": "features.mart.connect.enabled", "value": "true" } ] }, "analyticsRegion": "ANALYTICS_REGION", "runtimeType": "HYBRID", "subscriptionType": "TRIAL", "state": "ACTIVE", "billingType": "SUBSCRIPTION", "apiConsumerDataLocation": "CONSUMER_DATA_REGION", "expiresAt": "1631421073171", "addonsConfig": { "advancedApiOpsConfig": {}, "integrationConfig": {}, "monetizationConfig": {} } } }
For example:
curl -H "Authorization: Bearer $TOKEN" \ "https://apigee.googleapis.com/v1/organizations/$ORG_NAME"
The response to your request contains details about the specified organization in JSON format.
{
"name": "apigee-example",
"createdAt": "1626237148461",
"lastModifiedAt": "1626237149384",
"properties": {
"property": [
{
"name": "features.hybrid.enabled",
"value": "true"
},
{
"name": "features.mart.connect.enabled",
"value": "true"
}
]
},
"analyticsRegion": "us-west1",
"runtimeType": "HYBRID",
"subscriptionType": "PAID",
"projectId": "apigee-example",
"state": "ACTIVE",
"billingType": "SUBSCRIPTION",
"expiresAt": "1631421073171",
"addonsConfig": {
"advancedApiOpsConfig": {},
"integrationConfig": {},
"monetizationConfig": {}
}
}curl -H "Authorization: Bearer $TOKEN" \ "https://$CONTROL_PLANE_LOCATION-apigee.googleapis.com/v1/organizations/$ORG_NAME"
The response to your request contains details about the specified organization in JSON format.
{
"name": "apigee-example",
"createdAt": "1626237148461",
"lastModifiedAt": "1626237149384",
"properties": {
"property": [
{
"name": "features.hybrid.enabled",
"value": "true"
},
{
"name": "features.mart.connect.enabled",
"value": "true"
}
]
},
"analyticsRegion": "us-west1",
"runtimeType": "HYBRID",
"subscriptionType": "PAID",
"projectId": "apigee-example",
"state": "ACTIVE",
"billingType": "SUBSCRIPTION",
"expiresAt": "1631421073171",
"addonsConfig": {
"advancedApiOpsConfig": {},
"integrationConfig": {},
"monetizationConfig": {}
}
}When you create an organization with the Create organizations API, you might get an error response. Responses look like the following:
{
"error": {
"code": HTTP_error_code,
"message": "short_error_message",
"status": "high_level_error_type",
"details": [
{
"@type": "specific_error_type",
"detail": "expanded_error_description"
}
]
}
}The following table lists errors you might receive and potential resolutions when you try to create a new organization:
400Invalid JSON payload received400Invalid organization ID400Unsupported analytics regionanalyticsRegion in your
request body, or the value you specified is not one of the valid options.400Does not have an Apigee entitlement400'global' violates constraint in constraints/gcp.resourceLocations
on the resource projects/PROJECT_ID, Control Plane Region
400runtimeType HYBRID is not supported for PAYG_V2, use CLOUD instead: invalid argument
401Request had invalid authentication credentialsgcloud authentication token is either bad or outdated, or you did not include
one in the request. Generate a new token and resend the address.403Permission denied on resource project PROJECT_ID403Unable to retrieve project information403Permission denied on resource project organizations/PROJECT_ID/deployedIngressConfig409Organization already exists409Org PROPOSED_ORG_NAME already existsGo to Step 3: Create an environment group.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-07-23 UTC.