---
title: Create Tenant
slug: api-documentation/create-tenant
docTags: 
createdAt: 2026-10-19T10:26:54.944Z
---

{
  "id": "5Xt5iL7myXh9JGGWfI-Eu",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.upstartcommerce.com/v1/tenants",
    "servers": [
      {
        "url": "https://api.upstartcommerce.com/v1/tenants"
      }
    ],
    "name": "Create Tenant",
    "description": "<p>Warning: Deprecated\nThis endpoint creates a new tenant.</p>\n<p>Authorized permissions:</p>\n<ul>\n<li><code>tenant.create</code></li>\n</ul>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        },
        {
          "kind": "required",
          "name": "x-upstart-tenant",
          "type": "string",
          "description": "Tenant identifier associated with the site this call is for."
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "example": "{\"name\":\"Acme Retail Corporation\",\"email\":\"admin@acmeretail.com\",\"domain\":\"acme-retail\",\"tenant\":\"acme001\",\"sites\":[{\"name\":\"Main Store\",\"url\":\"shop.acmeretail.com\",\"enabled\":true,\"activationDate\":\"2024-01-15T00:00:00Z\"}]}",
          "description": "<p>The tenant to create, with its name, domain and contact details.</p>",
          "customType": "CreateTenant",
          "schema": [
            {
              "name": "name",
              "kind": "required",
              "type": "string",
              "description": "<p>The business or organization name for this tenant. This appears in the administrative portal header, emails, and throughout the system. Should be the legal business name or recognizable brand name (e.g., 'Acme Retail Corporation', 'Bob's Hardware').</p>",
              "example": "Acme Retail Corporation"
            },
            {
              "name": "email",
              "kind": "required",
              "type": "string<email>",
              "description": "<p>The email address for the initial administrator account. This user will receive a verification email and will have full administrative access to the tenant. Must be a valid, deliverable email address. This becomes the primary contact for the tenant.</p>",
              "example": "admin@acmeretail.com",
              "format": "email"
            },
            {
              "name": "domain",
              "kind": "optional",
              "type": "string",
              "description": "<p>The subdomain prefix used to access the tenant's administrative portal (e.g., 'acme' becomes 'acme.upstartcommerce.com'). Must be unique across all tenants, contain only alphanumeric characters and hyphens, start and end with alphanumeric characters, and be between 3-63 characters. Cannot be changed after creation.</p>",
              "example": "acme-retail",
              "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9]$"
            },
            {
              "name": "sites",
              "kind": "required",
              "type": "array",
              "description": "<p>An array of sites (storefronts/channels) to create for this tenant. At least one site is required. Each site represents a customer-facing storefront with its own URL and configuration. You can add more sites later through the site management APIs.</p>",
              "modelRef": "#/components/schemas/CreateSite",
              "customType": "CreateSite[]",
              "schema": [
                {
                  "name": "activationDate",
                  "kind": "optional",
                  "type": "string<date-time>",
                  "description": "<p>The date and time when this site becomes active and accessible to customers. If not specified, the site is activated immediately upon creation. Use this to schedule future site launches. Must be in ISO 8601 format (UTC).</p>",
                  "example": "2025-01-15T00:00:00Z",
                  "format": "date-time"
                },
                {
                  "name": "archived",
                  "kind": "optional",
                  "type": "boolean",
                  "description": "<p>Whether this site is archived (soft deleted). Archived sites are hidden from normal operations but data is retained for historical purposes. Defaults to false for new sites. Set to true only when migrating historical data.</p>",
                  "example": false,
                  "default": false
                },
                {
                  "name": "deactivationDate",
                  "kind": "optional",
                  "type": "string<date-time>",
                  "description": "<p>The date and time when this site will automatically become inactive. Optional - if not set, the site remains active indefinitely. Useful for temporary sites, seasonal stores, or scheduled site closures. Must be after activationDate.</p>",
                  "example": "2025-12-31T23:59:59Z",
                  "format": "date-time"
                },
                {
                  "name": "enabled",
                  "kind": "optional",
                  "type": "boolean",
                  "description": "<p>Controls whether the site is currently enabled for operations, independent of activation dates. Use this as a manual override to quickly enable/disable a site. When false, the site is inaccessible even if within activation dates. Defaults to true.</p>",
                  "example": true,
                  "default": true
                },
                {
                  "name": "id",
                  "kind": "optional",
                  "type": "string",
                  "description": "<p>Optional custom identifier for the site. If not provided, a unique identifier will be automatically generated. Must be unique within the tenant. Use lowercase alphanumeric characters and hyphens. Once set, this ID cannot be changed.</p>",
                  "example": "us-west-store"
                },
                {
                  "name": "name",
                  "kind": "required",
                  "type": "string",
                  "description": "<p>The display name for the site, shown in administrative interfaces and reports. Should be descriptive and unique within the tenant for easy identification (e.g., 'US West Coast Store', 'Mobile App Channel', 'B2B Portal').</p>",
                  "example": "US West Coast Store"
                },
                {
                  "name": "url",
                  "kind": "required",
                  "type": "string",
                  "description": "<p>The primary URL/domain where this site is accessible to customers. Should include the full domain without protocol (e.g., 'store.example.com' not '<a href=\"https://store.example.com\" target=\"_blank\">https://store.example.com</a>'). Must be unique across all tenants in the platform.</p>",
                  "example": "westcoast.acmeretail.com"
                }
              ]
            },
            {
              "name": "tenant",
              "kind": "optional",
              "type": "string",
              "description": "<p>Optional custom tenant identifier. If not provided, one will be auto-generated. Must be globally unique, contain only alphanumeric characters, and be max 40 characters. Use this to maintain consistent identifiers across environments or during migrations. Once set, cannot be changed.</p>",
              "example": "acme001",
              "pattern": "^[0-9a-zA-Z]{0,40}$"
            }
          ],
          "modelRef": "#/components/schemas/CreateTenant",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "NoChannelPortalAccess",
          "name": "NoChannelPortalAccess",
          "kind": "optional",
          "type": "http",
          "description": "<p>This authentication is required for clients to interact with any of the management APIs. Similar to 'LoggedIn', it indicates that the user has actually logged into the system, but in this case with a management role.</p>",
          "scheme": "bearer"
        },
        {
          "id": "SessionIdAuth",
          "name": "X-Upstart-Session-Id",
          "kind": "optional",
          "type": "apiKey",
          "description": "<p>Legacy auth-mgmt session credential, obtained from user-svc <code>POST /v1/user/session-login</code>.</p>\n<p>Accepted as an alternative to a bearer token: every operation that lists both schemes takes either one.\nThis is what control-center sends -- it attaches <code>X-Upstart-Session-Id</code> and never an <code>Authorization</code> header.\nDeclaring it here is what stops Tapir refusing those requests at the transport for a missing <code>Authorization</code>.</p>",
          "in": "header"
        },
        {
          "id": "ApiKeyAuth",
          "name": "X-UpStart-API-Key",
          "kind": "optional",
          "type": "apiKey",
          "description": "<p>Legacy auth-mgmt API key, for service and integration callers.</p>\n<p>Accepted as an alternative to a bearer token or session id: every operation that lists these schemes takes any one of them.\nDeclaring it here is what stops Tapir refusing API-key-only requests at the transport for a missing <code>Authorization</code>.</p>",
          "in": "header"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "201",
        "description": "<p>Success-tenant created successfully.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"tenant\":\"acme001\",\"name\":\"Acme Retail Corporation\",\"email\":\"admin@acmeretail.com\",\"domain\":\"acme-retail\",\"sites\":[{\"id\":\"main-store\",\"name\":\"Main Store\",\"url\":\"shop.acmeretail.com\",\"enabled\":true,\"archived\":false,\"activationDate\":\"2024-01-15T00:00:00Z\"}]}",
            "description": "<p>Complete tenant information including all associated sites. Returned by tenant creation, update, and retrieval operations. Provides a full view of a tenant's configuration and all its storefronts/channels.</p>",
            "customType": "TenantSummary",
            "schema": [
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": "The business or organization name for this tenant. Displayed in administrative interfaces and used for identification. Typically the legal business name or primary brand name.",
                "example": "Acme Retail Corporation"
              },
              {
                "name": "sites",
                "kind": "required",
                "type": "array",
                "description": "<p>Array of all sites (storefronts/channels) associated with this tenant. Each site represents a customer-facing storefront with its own URL and configuration. A tenant must have at least one site. Sites are returned in creation order.</p>",
                "modelRef": "#/components/schemas/SiteData",
                "customType": "SiteData[]",
                "schema": [
                  {
                    "name": "activationDate",
                    "kind": "optional",
                    "type": "string<date-time>",
                    "description": "<p>The date and time when this site became (or will become) active and accessible to customers. Sites before this date are not accessible. null indicates the site is active from creation. Always in ISO 8601 format (UTC).</p>",
                    "example": "2024-01-15T00:00:00Z",
                    "format": "date-time"
                  },
                  {
                    "name": "archived",
                    "kind": "required",
                    "type": "boolean",
                    "description": "<p>Indicates the site has been soft-deleted and is retained only for historical/audit purposes. Archived sites are excluded from all queries and operations. Cannot be unarchived - create a new site instead. This is different from 'enabled' which is a temporary disable.</p>",
                    "example": false,
                    "default": false
                  },
                  {
                    "name": "deactivationDate",
                    "kind": "optional",
                    "type": "string<date-time>",
                    "description": "<p>The date and time after which this site becomes inactive and inaccessible. null means the site has no scheduled end date and remains active indefinitely (subject to 'enabled' flag). Useful for temporary sites or scheduled closures.</p>",
                    "example": "2025-12-31T23:59:59Z",
                    "format": "date-time"
                  },
                  {
                    "name": "enabled",
                    "kind": "required",
                    "type": "boolean",
                    "description": "<p>Manual override flag that immediately enables/disables the site, independent of activation dates. When false, the site is inaccessible even if within active dates. Use this for emergency shutdowns or maintenance windows. Can be toggled at any time without affecting activation dates.</p>",
                    "example": true,
                    "default": true
                  },
                  {
                    "name": "id",
                    "kind": "required",
                    "type": "string",
                    "description": "<p>The unique identifier for this site within the tenant. Immutable once created. Used in API calls, configuration records, and for associating data with specific sites. Format is alphanumeric with hyphens.</p>",
                    "example": "us-west-store"
                  },
                  {
                    "name": "name",
                    "kind": "required",
                    "type": "string",
                    "description": "<p>The display name for the site shown in administrative interfaces, reports, and internal systems. Should be descriptive and unique within the tenant for easy identification by administrators.</p>",
                    "example": "US West Coast Store"
                  },
                  {
                    "name": "url",
                    "kind": "required",
                    "type": "string",
                    "description": "<p>The primary domain where customers access this site. Must be unique across the entire platform. Does not include protocol (https:// is assumed). This URL is used for routing and site identification.</p>",
                    "example": "westcoast.acmeretail.com"
                  }
                ]
              },
              {
                "name": "tenant",
                "kind": "required",
                "type": "string",
                "description": "<p>The unique identifier for this tenant. Immutable once created. Use this value in the x-upstart-tenant header for all tenant-scoped API operations. Must be unique across the entire platform.</p>",
                "example": "acme001"
              },
              {
                "name": "email",
                "kind": "required",
                "type": "string",
                "description": "<p>The primary contact email address for this tenant. Used for administrative notifications, password resets, and system communications. Typically belongs to the primary administrator or technical contact.</p>",
                "example": "admin@acmeretail.com"
              },
              {
                "name": "domain",
                "kind": "optional",
                "type": "string",
                "description": "<p>The domain prefix/subdomain used to access this tenant's administrative portal (e.g., 'acme' for 'acme.upstartcommerce.com'). Unique across all tenants. Cannot be changed after creation. This is different from site URLs which are customer-facing.</p>",
                "example": "acme-retail"
              }
            ],
            "modelRef": "#/components/schemas/TenantSummary",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "The request contained information that the server was unable to process. Appropriate errors are provided in the response body.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"name\":\"ValidationError\",\"code\":\"INVALID_EMAIL_FORMAT\",\"detail\":\"The email field must be a valid email address. Received: \\\"invalid-email\\\"\"}",
            "description": "<p>Error response returned when request validation fails (HTTP 400). Contains details about which fields failed validation and why. Used for client-side error display and form validation feedback.</p>",
            "customType": "ValidationErrorResponse",
            "schema": [
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": "<p>The error type, typically 'ValidationError' for all validation failures. Use this to distinguish validation errors from other error types in your error handling logic.</p>",
                "example": "ValidationError"
              },
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": "<p>A validation-specific error code indicating the validation rule that failed. Examples include 'REQUIRED_FIELD_MISSING', 'INVALID_FORMAT', 'VALUE_OUT_OF_RANGE', 'DUPLICATE_VALUE'. Use for specific handling of different validation scenarios.</p>",
                "example": "INVALID_EMAIL_FORMAT"
              },
              {
                "name": "detail",
                "kind": "optional",
                "type": "string",
                "description": "<p>Human-readable validation error message describing which field(s) failed and why. Should be specific enough for developers to fix the issue. May include field paths for nested objects (e.g., 'sites[0].url is not a valid domain').</p>",
                "example": "The email field must be a valid email address. Received: \"invalid-email\""
              }
            ],
            "modelRef": "#/components/schemas/ValidationErrorResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "The provided credentials were not valid for this endpoint. It may be that they are expired or that the user's roles are insufficient.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"name\":\"AuthorizationError\",\"code\":\"INSUFFICIENT_PERMISSIONS\",\"detail\":\"User does not have the required tenant.create permission to perform this operation.\",\"reason\":\"Your access token does not include the necessary permissions. Contact your administrator to request access.\"}",
            "description": "<p>Returned when credentials are missing, expired or insufficient (HTTP 401).</p>",
            "customType": "UnauthorizedError",
            "schema": [
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": "<p>The high-level error category or type name.</p>"
              },
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": "A specific error code identifying the exact error condition."
              },
              {
                "name": "detail",
                "kind": "optional",
                "type": "string",
                "description": "<p>A human-readable description of what went wrong.</p>"
              },
              {
                "name": "reason",
                "kind": "optional",
                "type": "string",
                "description": "Optional additional context or suggested resolution."
              }
            ],
            "modelRef": "#/components/schemas/UnauthorizedError",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "409",
        "description": "The request conflicts with the current state of the resource. This typically occurs when trying to create a resource that already exists or when there's a conflict with business rules.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"name\":\"ConflictError\",\"code\":\"TENANT_DOMAIN_ALREADY_EXISTS\",\"detail\":\"A tenant with the domain \\\"acme-retail\\\" already exists in the system.\",\"reason\":\"Tenant domains must be globally unique. Please choose a different domain name for your tenant.\"}",
            "description": "<p>Returned when the request conflicts with the current resource state (HTTP 409).</p>",
            "customType": "ConflictError",
            "schema": [
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": "<p>The high-level error category or type name.</p>"
              },
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": "A specific error code identifying the exact error condition."
              },
              {
                "name": "detail",
                "kind": "optional",
                "type": "string",
                "description": "<p>A human-readable description of what went wrong.</p>"
              },
              {
                "name": "reason",
                "kind": "optional",
                "type": "string",
                "description": "Optional additional context or suggested resolution."
              }
            ],
            "modelRef": "#/components/schemas/ConflictError",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "422",
        "description": "<p>The request was well-formed but contains semantic errors or violates business rules that prevent processing.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"name\":\"UnprocessableEntityError\",\"code\":\"INVALID_SITE_CONFIGURATION\",\"detail\":\"The deactivationDate must be after the activationDate.\",\"reason\":\"A site cannot be deactivated before it is activated. Please adjust the dates so that deactivation occurs after activation.\"}",
            "description": "<p>Returned when the request is well-formed but violates business rules (HTTP 422).</p>",
            "customType": "UnprocessableEntityError",
            "schema": [
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": "<p>The high-level error category or type name.</p>"
              },
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": "A specific error code identifying the exact error condition."
              },
              {
                "name": "detail",
                "kind": "optional",
                "type": "string",
                "description": "<p>A human-readable description of what went wrong.</p>"
              },
              {
                "name": "reason",
                "kind": "optional",
                "type": "string",
                "description": "Optional additional context or suggested resolution."
              }
            ],
            "modelRef": "#/components/schemas/UnprocessableEntityError",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "500",
        "description": "<p>An unexpected internal server error occurred. The request may be retried, and if the problem persists, contact support with the traceId from the error response.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"name\":\"InternalServerError\",\"code\":\"UNEXPECTED_ERROR\",\"detail\":\"An unexpected error occurred while processing your request.\",\"reason\":\"Our team has been notified. Please try again, and if the problem persists, contact support with trace ID: 550e8400-e29b-41d4-a716-446655440000\"}",
            "description": "<p>Returned for an unexpected server-side failure (HTTP 500).</p>",
            "customType": "InternalServerError",
            "schema": [
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": "<p>The high-level error category or type name.</p>"
              },
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": "A specific error code identifying the exact error condition."
              },
              {
                "name": "detail",
                "kind": "optional",
                "type": "string",
                "description": "<p>A human-readable description of what went wrong.</p>"
              },
              {
                "name": "reason",
                "kind": "optional",
                "type": "string",
                "description": "Optional additional context or suggested resolution."
              }
            ],
            "modelRef": "#/components/schemas/InternalServerError",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "503",
        "description": "<p>A downstream dependency was unavailable, so the request could not be authorized or completed. The request may be retried.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"name\":\"Service Unavailable\",\"code\":\"UNKNOWN\",\"detail\":\"Permission resolution is unavailable, please retry\",\"reason\":\"A dependency required to authorize this request is temporarily unreachable. Please retry shortly.\"}",
            "description": "<p>Returned when a downstream dependency this request needed is unavailable (HTTP 503).</p>\n<p>Distinct from 401: the caller's credentials are fine. The service could not resolve the permissions\nrequired to authorize the request, so the outcome is unknown rather than denied. The request may be retried.</p>",
            "customType": "ServiceUnavailableError",
            "schema": [
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": "<p>The high-level error category or type name.</p>"
              },
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": "A specific error code identifying the exact error condition."
              },
              {
                "name": "detail",
                "kind": "optional",
                "type": "string",
                "description": "<p>A human-readable description of what went wrong.</p>"
              },
              {
                "name": "reason",
                "kind": "optional",
                "type": "string",
                "description": "Optional additional context or suggested resolution."
              }
            ],
            "modelRef": "#/components/schemas/ServiceUnavailableError",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "deprecated": true,
    "examples": {
      "languages": [
        {
          "id": "hKgs7hL4WtPUziKlqRrqJ",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.upstartcommerce.com/v1/tenants \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --header 'x-upstart-tenant: string' \\\n     --data-raw '{\n     \"name\": \"Acme Retail Corporation\",\n     \"email\": \"admin@acmeretail.com\",\n     \"sites\": [\n     {\n     \"enabled\": true,\n     \"name\": \"US West Coast Store\",\n     \"url\": \"westcoast.acmeretail.com\"\n     }\n     ]\n     }'"
        },
        {
          "id": "6SOI0vt3loeenD8HWVOyn",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\nmyHeaders.append(\"x-upstart-tenant\", \"string\");\n\nvar raw = JSON.stringify({\n   \"name\": \"Acme Retail Corporation\",\n   \"email\": \"admin@acmeretail.com\",\n   \"sites\": [\n      {\n         \"enabled\": true,\n         \"name\": \"US West Coast Store\",\n         \"url\": \"westcoast.acmeretail.com\"\n      }\n   ]\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.upstartcommerce.com/v1/tenants\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "LyU3dAfjg-zOPrUVaQdlw",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.upstartcommerce.com/v1/tenants\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest[\"x-upstart-tenant\"] = \"string\"\nrequest.body = JSON.dump({\n   \"name\": \"Acme Retail Corporation\",\n   \"email\": \"admin@acmeretail.com\",\n   \"sites\": [\n      {\n         \"enabled\": true,\n         \"name\": \"US West Coast Store\",\n         \"url\": \"westcoast.acmeretail.com\"\n      }\n   ]\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "Tc1rtRvM0sOPm5GuXDnV7",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.upstartcommerce.com/v1/tenants\"\n\npayload = json.dumps({\n   \"name\": \"Acme Retail Corporation\",\n   \"email\": \"admin@acmeretail.com\",\n   \"sites\": [\n      {\n         \"enabled\": True,\n         \"name\": \"US West Coast Store\",\n         \"url\": \"westcoast.acmeretail.com\"\n      }\n   ]\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'x-upstart-tenant': 'string'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "hKgs7hL4WtPUziKlqRrqJ"
    },
    "results": {
      "languages": [
        {
          "id": "t--uRmzfjL70_0r-x21KA",
          "language": "201",
          "code": "// Success-tenant created successfully.\n{\n  \"name\": \"Acme Retail Corporation\",\n  \"sites\": [\n    {\n      \"activationDate\": \"2024-01-15T00:00:00Z\",\n      \"archived\": false,\n      \"deactivationDate\": \"2025-12-31T23:59:59Z\",\n      \"enabled\": true,\n      \"id\": \"us-west-store\",\n      \"name\": \"US West Coast Store\",\n      \"url\": \"westcoast.acmeretail.com\"\n    }\n  ],\n  \"tenant\": \"acme001\",\n  \"email\": \"admin@acmeretail.com\",\n  \"domain\": \"acme-retail\"\n}"
        },
        {
          "id": "eKCYZDPG2v69yHI2zRYIP",
          "language": "400",
          "code": "// The request contained information that the server was unable to process. Appropriate errors are provided in the response body.\n{\n  \"name\": \"ValidationError\",\n  \"code\": \"INVALID_EMAIL_FORMAT\",\n  \"detail\": \"The email field must be a valid email address. Received: \\\"invalid-email\\\"\"\n}"
        },
        {
          "id": "6Iyl0_Q7eefIesQkJOEP2",
          "language": "401",
          "code": "// The provided credentials were not valid for this endpoint. It may be that they are expired or that the user's roles are insufficient.\n{\n  \"name\": \"\",\n  \"code\": \"\",\n  \"detail\": \"\",\n  \"reason\": \"\"\n}"
        },
        {
          "id": "m9R1eBtfRv-BoWMXzAFm2",
          "language": "409",
          "code": "// The request conflicts with the current state of the resource. This typically occurs when trying to create a resource that already exists or when there's a conflict with business rules.\n{\n  \"name\": \"\",\n  \"code\": \"\",\n  \"detail\": \"\",\n  \"reason\": \"\"\n}"
        },
        {
          "id": "hKyFzrpi8NHTvuT0yT79-",
          "language": "422",
          "code": "// The request was well-formed but contains semantic errors or violates business rules that prevent processing.\n{\n  \"name\": \"\",\n  \"code\": \"\",\n  \"detail\": \"\",\n  \"reason\": \"\"\n}"
        },
        {
          "id": "JgwLJYhbQCzbJhHnXoCPb",
          "language": "500",
          "code": "// An unexpected internal server error occurred. The request may be retried, and if the problem persists, contact support with the traceId from the error response.\n{\n  \"name\": \"\",\n  \"code\": \"\",\n  \"detail\": \"\",\n  \"reason\": \"\"\n}"
        },
        {
          "id": "YyWFvtvaKTt5E1MVvuNm2",
          "language": "503",
          "code": "// A downstream dependency was unavailable, so the request could not be authorized or completed. The request may be retried.\n{\n  \"name\": \"\",\n  \"code\": \"\",\n  \"detail\": \"\",\n  \"reason\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "t--uRmzfjL70_0r-x21KA"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}