Skip to content

Create new tenant

POST/tenants

Partner API · Tenants

Create a new tenant.

Required permissionaccount_management:write OR license_management:write

Parameters

Name In Type Required Description
X-Partner-ID header string (uuid) Yes Partner ID.
fields query array of string No The fields to return in a partial response.

Request body

Content type: application/json

Request body fields

namestringrequired
Tenant name. This cannot be changed after the tenant has been created.
dataGeographystring
Geographical location where the tenant data is stored.
Must be one of: US, IE, DE, CA, AU, JP, IN, BR, AE.
dataRegionstring
The data region where tenant data is stored.
Must be one of: eu01, eu02, us01, us02, us03, ca01, au01, jp01, in01, br01, ae01.
billingTypestringrequired
Billing type.
Must be one of: trial, usage, ordered.
contactobjectrequired
Contact information for a partner, organization or tenant.
Show child attributesHide child attributes
firstNamestringrequired
First name.
lastNamestringrequired
Last name.
emailstring (email)
Email address.
phonestringrequired
Phone number.
mobilestring
Mobile number.
faxstring
Fax number.
addressobjectrequired
Address of a partner, organization or tenant.
Show child attributesHide child attributes
address1stringrequired
Line 1 of the address.
address2string
Line 2 of the address.
address3string
Line 3 of the address.
citystringrequired
City.
statestring
State.
countryCodestringrequired
Country code.
postalCodestringrequired
Postal code.
adminobject
Create an admin when creating a tenant. Email uniqueness is checked and results in a conflict if it is already in the system.
Show child attributesHide child attributes
namestringrequired
Name.
firstNamestring
Admin's first name or given name.
lastNamestring
Admins's last name or surname.
emailstring (email)required
Email address.
productsarray of object
Products list.
Items must be unique.
Sophos product code with an optional quantity.
Show child attributesHide child attributes
codestringrequired
Sophos product code.
Must match the pattern ^[A-Z][a-zA-Z]{0,19}([0-9]{0,4})([-_][a-zA-Z0-9]{0,20}([0-9]{0,3})){0,5}$.
quantityinteger
Quantity for the number of seats.
acceptedSampleSubmissionboolean
Whether the tenant has accepted the sample submission agreement.

Request samples

curl -X POST "https://api.central.sophos.com/partner/v1/tenants" -H "Authorization: Bearer <access-token>" -H "X-Partner-ID: <partner-id>" -H "Content-Type: application/json" -d "{
  \"name\": \"Usage Tenant with Recommended Products\",
  \"dataGeography\": \"DE\",
  \"dataRegion\": \"eu02\",
  \"billingType\": \"usage\",
  \"contact\": {
    \"firstName\": \"Roger\",
    \"lastName\": \"Rabit\",
    \"email\": \"mustbeunique@samplecomain.de\",
    \"phone\": \"111-111-1111\",
    \"mobile\": \"2222222222\",
    \"fax\": \"3333333333\",
    \"address\": {
      \"address1\": \"123 Fake St\",
      \"city\": \"Berlin\",
      \"countryCode\": \"DE\",
      \"postalCode\": \"10115\"
    }
  },
  \"admin\": {
    \"name\": \"Augustus Cesar\",
    \"firstName\": \"Augustus\",
    \"lastName\": \"Cesar\",
    \"email\": \"tenant_admin@sampledomain.de\"
  },
  \"products\": [
    {
      \"code\": \"CIXA-MSP\"
    },
    {
      \"code\": \"CEMA-MSP\"
    }
  ],
  \"acceptedSampleSubmission\": true
}"

import requests

response = requests.post(
    "https://api.central.sophos.com/partner/v1/tenants",
    headers={
        "Authorization": "Bearer <access-token>",
        "X-Partner-ID": "<partner-id>",
        "Content-Type": "application/json",
    },
    json={   'name': 'Usage Tenant with Recommended Products',
    'dataGeography': 'DE',
    'dataRegion': 'eu02',
    'billingType': 'usage',
    'contact': {   'firstName': 'Roger',
                   'lastName': 'Rabit',
                   'email': 'mustbeunique@samplecomain.de',
                   'phone': '111-111-1111',
                   'mobile': '2222222222',
                   'fax': '3333333333',
                   'address': {   'address1': '123 Fake St',
                                  'city': 'Berlin',
                                  'countryCode': 'DE',
                                  'postalCode': '10115'}},
    'admin': {   'name': 'Augustus Cesar',
                 'firstName': 'Augustus',
                 'lastName': 'Cesar',
                 'email': 'tenant_admin@sampledomain.de'},
    'products': [{'code': 'CIXA-MSP'}, {'code': 'CEMA-MSP'}],
    'acceptedSampleSubmission': True},
)
print(response.json())

$headers = @{
    "Authorization" = "Bearer <access-token>"
    "X-Partner-ID" = "<partner-id>"
    "Content-Type" = "application/json"
}
$body = '{
  "name": "Usage Tenant with Recommended Products",
  "dataGeography": "DE",
  "dataRegion": "eu02",
  "billingType": "usage",
  "contact": {
    "firstName": "Roger",
    "lastName": "Rabit",
    "email": "mustbeunique@samplecomain.de",
    "phone": "111-111-1111",
    "mobile": "2222222222",
    "fax": "3333333333",
    "address": {
      "address1": "123 Fake St",
      "city": "Berlin",
      "countryCode": "DE",
      "postalCode": "10115"
    }
  },
  "admin": {
    "name": "Augustus Cesar",
    "firstName": "Augustus",
    "lastName": "Cesar",
    "email": "tenant_admin@sampledomain.de"
  },
  "products": [
    {
      "code": "CIXA-MSP"
    },
    {
      "code": "CEMA-MSP"
    }
  ],
  "acceptedSampleSubmission": true
}'
Invoke-RestMethod -Method POST -Uri "https://api.central.sophos.com/partner/v1/tenants" -Headers $headers -Body $body -ContentType "application/json"

package main

import (
    "fmt"
    "io"
    "net/http"
    "strings"
)

func main() {
    req, err := http.NewRequest("POST", "https://api.central.sophos.com/partner/v1/tenants", strings.NewReader(`{
  "name": "Usage Tenant with Recommended Products",
  "dataGeography": "DE",
  "dataRegion": "eu02",
  "billingType": "usage",
  "contact": {
    "firstName": "Roger",
    "lastName": "Rabit",
    "email": "mustbeunique@samplecomain.de",
    "phone": "111-111-1111",
    "mobile": "2222222222",
    "fax": "3333333333",
    "address": {
      "address1": "123 Fake St",
      "city": "Berlin",
      "countryCode": "DE",
      "postalCode": "10115"
    }
  },
  "admin": {
    "name": "Augustus Cesar",
    "firstName": "Augustus",
    "lastName": "Cesar",
    "email": "tenant_admin@sampledomain.de"
  },
  "products": [
    {
      "code": "CIXA-MSP"
    },
    {
      "code": "CEMA-MSP"
    }
  ],
  "acceptedSampleSubmission": true
}`))
    if err != nil {
        panic(err)
    }
    req.Header.Set("Authorization", "Bearer <access-token>")
    req.Header.Set("X-Partner-ID", "<partner-id>")
    req.Header.Set("Content-Type", "application/json")

    resp, err := http.DefaultClient.Do(req)
    if err != nil {
        panic(err)
    }
    defer resp.Body.Close()

    body, _ := io.ReadAll(resp.Body)
    fmt.Println(string(body))
}

const response = await fetch("https://api.central.sophos.com/partner/v1/tenants", {
  method: "POST",
  headers: {
    "Authorization": "Bearer <access-token>",
    "X-Partner-ID": "<partner-id>",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
  "name": "Usage Tenant with Recommended Products",
  "dataGeography": "DE",
  "dataRegion": "eu02",
  "billingType": "usage",
  "contact": {
    "firstName": "Roger",
    "lastName": "Rabit",
    "email": "mustbeunique@samplecomain.de",
    "phone": "111-111-1111",
    "mobile": "2222222222",
    "fax": "3333333333",
    "address": {
      "address1": "123 Fake St",
      "city": "Berlin",
      "countryCode": "DE",
      "postalCode": "10115"
    }
  },
  "admin": {
    "name": "Augustus Cesar",
    "firstName": "Augustus",
    "lastName": "Cesar",
    "email": "tenant_admin@sampledomain.de"
  },
  "products": [
    {
      "code": "CIXA-MSP"
    },
    {
      "code": "CEMA-MSP"
    }
  ],
  "acceptedSampleSubmission": true
}),
});
const data = await response.json();
console.log(data);

Responses

201 — Created a new tenant.

Response fields

idstring (uuid)required
Tenant ID.
namestringrequired
Name set when the tenant was created.
dataGeographystringrequired
Geographical location where the tenant data is stored.
Must be one of: US, IE, DE, CA, AU, JP, IN, BR, AE.
dataRegionstringrequired
The data region where tenant data is stored.
Must be one of: eu01, eu02, us01, us02, us03, ca01, au01, jp01, in01, br01, ae01.
billingTypestringrequired
Billing type.
Must be one of: term, trial, usage, ordered.
partnerobjectrequired
Represents a referenced object.
Show child attributesHide child attributes
idstring (uuid)required
The ID of the referenced object.
organizationobject
Represents a referenced object.
Show child attributesHide child attributes
idstring (uuid)required
The ID of the referenced object.
apiHoststring (uri)required
Tenant API host URL.
productsarray of object
Products list.
Items must be unique.
Sophos product code with an optional quantity.
Show child attributesHide child attributes
codestringrequired
Sophos product code.
Must match the pattern ^[A-Z][a-zA-Z]{0,19}([0-9]{0,4})([-_][a-zA-Z0-9]{0,20}([0-9]{0,3})){0,5}$.
quantityinteger
Quantity for the number of seats.
statusstring
Tenant account status.
Must be one of: active, suspended, canceled.
primaryboolean
Indicates whether tenant is primary subestate or not.
managedboolean
Indicates if tenant has enabled management by this partner.
contactobject
Contact information for a partner, organization or tenant.
Show child attributesHide child attributes
firstNamestringrequired
First name.
lastNamestringrequired
Last name.
emailstring (email)
Email address.
phonestringrequired
Phone number.
mobilestring
Mobile number.
faxstring
Fax number.
addressobjectrequired
Address of a partner, organization or tenant.
Show child attributesHide child attributes
address1stringrequired
Line 1 of the address.
address2string
Line 2 of the address.
address3string
Line 3 of the address.
citystringrequired
City.
statestring
State.
countryCodestringrequired
Country code.
postalCodestringrequired
Postal code.

Errors

Status Meaning
409 Role name already in use or is a pre-defined role name.
500 Unexpected error.

All error responses share the same shape — see the error response object.

Response examples

201

{
  "id": "00000000-0000-0000-0000-000000000000",
  "name": "string",
  "dataGeography": "US",
  "dataRegion": "eu01",
  "billingType": "term",
  "partner": {
    "id": "00000000-0000-0000-0000-000000000000"
  },
  "organization": {
    "id": "00000000-0000-0000-0000-000000000000"
  },
  "apiHost": "https://example.com",
  "products": [
    {
      "code": "string",
      "quantity": 0
    }
  ],
  "status": "active",
  "primary": true,
  "managed": true,
  "contact": {
    "firstName": "string",
    "lastName": "string",
    "email": "user@example.com",
    "phone": "string",
    "mobile": "string",
    "fax": "string",
    "address": {
      "address1": "string",
      "address2": "string",
      "address3": "string",
      "city": "string",
      "state": "string",
      "countryCode": "string",
      "postalCode": "string"
    }
  }
}

See the guide for a narrative walkthrough of this API.