# Create cloud tenant

## Create cloud tenant

> Create cloud tenant.\
> Available for Operations account with platform account management permissions.\
> Accepts type, name, status, external IDs (pyraTenantId, cloudConsumptionId, providerId), and optional account reference.\
> Returns the created cloud tenant object with revision 1.

```json
{"openapi":"3.0.1","info":{"title":"Marketplace API","version":"5.0.5521-gb6ada4dc"},"servers":[{"url":"https://api.platform.softwareone.com"}],"paths":{"/public/v1/accounts/cloud-tenants":{"post":{"tags":["CloudTenants"],"summary":"Create cloud tenant","description":"Create cloud tenant.\nAvailable for Operations account with platform account management permissions.\nAccepts type, name, status, external IDs (pyraTenantId, cloudConsumptionId, providerId), and optional account reference.\nReturns the created cloud tenant object with revision 1.","requestBody":{"description":"Cloud tenant payload.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/CreateCloudTenantDto"}]}},"text/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/CreateCloudTenantDto"}]}},"application/*+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/CreateCloudTenantDto"}]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloudTenant"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}},"components":{"schemas":{"CreateCloudTenantDto":{"required":["externalIds","name"],"type":"object","properties":{"type":{"allOf":[{"$ref":"#/components/schemas/CloudTenantType"}]},"name":{"maxLength":100,"minLength":1,"type":"string"},"status":{"allOf":[{"$ref":"#/components/schemas/CloudTenantStatus"}]},"externalIds":{"allOf":[{"$ref":"#/components/schemas/CloudTenantExternalIdsDto"}]},"account":{"allOf":[{"$ref":"#/components/schemas/AccountDto"}],"nullable":true}},"additionalProperties":false},"CloudTenantType":{"enum":["AwsDirect","AwsService","Csp365","CspAzure","Ea365","EaAzure","Slm","Virtual"],"type":"string"},"CloudTenantStatus":{"enum":["Active","Disabled","Deleted"],"type":"string"},"CloudTenantExternalIdsDto":{"required":["cloudConsumptionId","pyraTenantId"],"type":"object","properties":{"pyraTenantId":{"minLength":1,"type":"string","format":"uuid"},"cloudConsumptionId":{"minLength":1,"type":"string","format":"uuid"},"providerId":{"type":"string","nullable":true}},"additionalProperties":false},"AccountDto":{"type":"object","properties":{"id":{"type":"string","allOf":[{"pattern":"^ACC-\\d\\d\\d\\d-\\d\\d\\d\\d$"},{"pattern":"^ACC-\\d\\d\\d\\d-\\d\\d\\d\\d$"},{"pattern":"^ACC-\\d\\d\\d\\d-\\d\\d\\d\\d$"},{"pattern":"^ACC-\\d\\d\\d\\d-\\d\\d\\d\\d$"},{"pattern":"^ACC-\\d\\d\\d\\d-\\d\\d\\d\\d$"}]}},"additionalProperties":false},"CloudTenant":{"type":"object","properties":{"id":{"type":"string"},"audit":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectAudit"}]},"$meta":{"allOf":[{"$ref":"#/components/schemas/PlatformMetadata"}],"nullable":true},"name":{"type":"string"},"revision":{"type":"integer","format":"int32"},"account":{"type":"object","allOf":[{"$ref":"#/components/schemas/AccountRef"}]},"externalIds":{"allOf":[{"$ref":"#/components/schemas/CloudTenantExternalIds"}],"nullable":true},"status":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"PlatformObjectAudit":{"type":"object","properties":{"created":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"updated":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true}},"additionalProperties":false},"PlatformObjectEvent":{"type":"object","properties":{"at":{"type":"string","format":"date-time","nullable":true},"by":{"type":"object","allOf":[{"$ref":"#/components/schemas/PlatformIdentityRef"}]}},"additionalProperties":false},"PlatformIdentityRef":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"icon":{"type":"string","nullable":true},"revision":{"type":"integer","format":"int32"}},"additionalProperties":false},"PlatformMetadata":{"type":"object","properties":{"omitted":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"AccountRef":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"icon":{"type":"string","nullable":true},"revision":{"type":"integer","format":"int32"},"type":{"allOf":[{"$ref":"#/components/schemas/AccountType"}],"nullable":true},"status":{"allOf":[{"$ref":"#/components/schemas/AccountStatus"}],"nullable":true}},"additionalProperties":false},"AccountType":{"enum":["Client","Vendor","Operations"],"type":"string"},"AccountStatus":{"enum":["Active","Enabled","Disabled"],"type":"string"},"CloudTenantExternalIds":{"type":"object","properties":{"cloudConsumptionId":{"type":"string","format":"uuid"},"providerId":{"type":"string","nullable":true},"pyraTenantId":{"type":"string","format":"uuid"}},"additionalProperties":false},"ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.platform.softwareone.com/developer-resources/rest-api/accounts-api/cloud-tenants/create-cloud-tenant.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
