---
title: Get tenant details
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/go)

[Tenants](https://developers.cloudflare.com/api/go/resources/tenants)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# Get tenant details

client.Tenants.Get(ctx, tenantID) (\*[Tenant](<https://developers.cloudflare.com/api/go/resources/tenants#(resource)%20tenants%20%3E%20(model)%20tenant%20%3E%20(schema)>), error)

GET/tenants/{tenant\_id}

Retrieves a tenant’s identity, status, metadata, contacts, and organizational units.

##### Security

API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

**Example:**`X-Auth-Email: user@example.com`

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

**Example:**`X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194`

##### ParametersExpand Collapse

tenantID string

[Link to this property](<#(resource)%20tenants%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20tenant_id%20%3E%20(schema)>)

##### ReturnsExpand Collapse

<details>

<summary>

type Tenant struct{…}

</summary>

Cdate Time

formatdate-time

<a href="#(resource)%20tenants%20%3E%20(model)%20tenant%20%3E%20(schema)%20%3E%20(property)%20cdate">Link to this property</a>

Edate Time

formatdate-time

<a href="#(resource)%20tenants%20%3E%20(model)%20tenant%20%3E%20(schema)%20%3E%20(property)%20edate">Link to this property</a>

<details>

<summary>

TenantContacts TenantTenantContacts

</summary>

Email stringOptional

<a href="#(resource)%20tenants%20%3E%20(model)%20tenant%20%3E%20(schema)%20%3E%20(property)%20tenant_contacts%20%3E%20(property)%20email">Link to this property</a>

Website stringOptional

<a href="#(resource)%20tenants%20%3E%20(model)%20tenant%20%3E%20(schema)%20%3E%20(property)%20tenant_contacts%20%3E%20(property)%20website">Link to this property</a>

</details>

<a href="#(resource)%20tenants%20%3E%20(model)%20tenant%20%3E%20(schema)%20%3E%20(property)%20tenant_contacts">Link to this property</a>

TenantLabels \[]string

<a href="#(resource)%20tenants%20%3E%20(model)%20tenant%20%3E%20(schema)%20%3E%20(property)%20tenant_labels">Link to this property</a>

<details>

<summary>

TenantMetadata TenantTenantMetadata

</summary>

<details>

<summary>

DNS TenantTenantMetadataDNSOptional

</summary>

<details>

<summary>

NSPool TenantTenantMetadataDNSNSPool

</summary>

Primary stringOptional

<a href="#(resource)%20tenants%20%3E%20(model)%20tenant%20%3E%20(schema)%20%3E%20(property)%20tenant_metadata%20%3E%20(property)%20dns%20%3E%20(property)%20ns_pool%20%3E%20(property)%20primary">Link to this property</a>

Secondary stringOptional

<a href="#(resource)%20tenants%20%3E%20(model)%20tenant%20%3E%20(schema)%20%3E%20(property)%20tenant_metadata%20%3E%20(property)%20dns%20%3E%20(property)%20ns_pool%20%3E%20(property)%20secondary">Link to this property</a>

</details>

<a href="#(resource)%20tenants%20%3E%20(model)%20tenant%20%3E%20(schema)%20%3E%20(property)%20tenant_metadata%20%3E%20(property)%20dns%20%3E%20(property)%20ns_pool">Link to this property</a>

</details>

<a href="#(resource)%20tenants%20%3E%20(model)%20tenant%20%3E%20(schema)%20%3E%20(property)%20tenant_metadata%20%3E%20(property)%20dns">Link to this property</a>

</details>

<a href="#(resource)%20tenants%20%3E%20(model)%20tenant%20%3E%20(schema)%20%3E%20(property)%20tenant_metadata">Link to this property</a>

TenantName string

<a href="#(resource)%20tenants%20%3E%20(model)%20tenant%20%3E%20(schema)%20%3E%20(property)%20tenant_name">Link to this property</a>

TenantNetwork unknown

<a href="#(resource)%20tenants%20%3E%20(model)%20tenant%20%3E%20(schema)%20%3E%20(property)%20tenant_network">Link to this property</a>

TenantStatus string

<a href="#(resource)%20tenants%20%3E%20(model)%20tenant%20%3E%20(schema)%20%3E%20(property)%20tenant_status">Link to this property</a>

TenantTag string

<a href="#(resource)%20tenants%20%3E%20(model)%20tenant%20%3E%20(schema)%20%3E%20(property)%20tenant_tag">Link to this property</a>

TenantType string

<a href="#(resource)%20tenants%20%3E%20(model)%20tenant%20%3E%20(schema)%20%3E%20(property)%20tenant_type">Link to this property</a>

<details>

<summary>

TenantUnits \[]TenantTenantUnit

</summary>

UnitMemberships \[]unknown

<a href="#(resource)%20tenants%20%3E%20(model)%20tenant%20%3E%20(schema)%20%3E%20(property)%20tenant_units%20%3E%20(items)%20%3E%20(property)%20unit_memberships">Link to this property</a>

UnitMetadata unknown

<a href="#(resource)%20tenants%20%3E%20(model)%20tenant%20%3E%20(schema)%20%3E%20(property)%20tenant_units%20%3E%20(items)%20%3E%20(property)%20unit_metadata">Link to this property</a>

UnitName string

<a href="#(resource)%20tenants%20%3E%20(model)%20tenant%20%3E%20(schema)%20%3E%20(property)%20tenant_units%20%3E%20(items)%20%3E%20(property)%20unit_name">Link to this property</a>

UnitStatus string

<a href="#(resource)%20tenants%20%3E%20(model)%20tenant%20%3E%20(schema)%20%3E%20(property)%20tenant_units%20%3E%20(items)%20%3E%20(property)%20unit_status">Link to this property</a>

UnitTag string

<a href="#(resource)%20tenants%20%3E%20(model)%20tenant%20%3E%20(schema)%20%3E%20(property)%20tenant_units%20%3E%20(items)%20%3E%20(property)%20unit_tag">Link to this property</a>

</details>

<a href="#(resource)%20tenants%20%3E%20(model)%20tenant%20%3E%20(schema)%20%3E%20(property)%20tenant_units">Link to this property</a>

CustomerID stringOptional

<a href="#(resource)%20tenants%20%3E%20(model)%20tenant%20%3E%20(schema)%20%3E%20(property)%20customer_id">Link to this property</a>

</details>

[Link to this property](<#(resource)%20tenants%20%3E%20(model)%20tenant%20%3E%20(schema)>)

### Get tenant details

Go

HTTPTypeScriptPythonGoTerraform

```
package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/option"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"),
    option.WithAPIEmail("user@example.com"),
  )
  tenant, err := client.Tenants.Get(context.TODO(), "tenant_id")
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", tenant.CustomerID)
}
```

200 example

```
{
  "errors": [],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": {
    "cdate": "2019-12-27T18:11:19.117Z",
    "edate": "2019-12-27T18:11:19.117Z",
    "tenant_contacts": {
      "email": "email",
      "website": "website"
    },
    "tenant_labels": [
      "string"
    ],
    "tenant_metadata": {
      "dns": {
        "ns_pool": {
          "primary": "primary",
          "secondary": "secondary"
        }
      }
    },
    "tenant_name": "tenant_name",
    "tenant_network": {},
    "tenant_status": "tenant_status",
    "tenant_tag": "tenant_tag",
    "tenant_type": "tenant_type",
    "tenant_units": [
      {
        "unit_memberships": [
          {}
        ],
        "unit_metadata": {},
        "unit_name": "unit_name",
        "unit_status": "unit_status",
        "unit_tag": "unit_tag"
      }
    ],
    "customer_id": "customer_id"
  },
  "success": true
}
```

##### Returns Examples

200 example

```
{
  "errors": [],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": {
    "cdate": "2019-12-27T18:11:19.117Z",
    "edate": "2019-12-27T18:11:19.117Z",
    "tenant_contacts": {
      "email": "email",
      "website": "website"
    },
    "tenant_labels": [
      "string"
    ],
    "tenant_metadata": {
      "dns": {
        "ns_pool": {
          "primary": "primary",
          "secondary": "secondary"
        }
      }
    },
    "tenant_name": "tenant_name",
    "tenant_network": {},
    "tenant_status": "tenant_status",
    "tenant_tag": "tenant_tag",
    "tenant_type": "tenant_type",
    "tenant_units": [
      {
        "unit_memberships": [
          {}
        ],
        "unit_metadata": {},
        "unit_name": "unit_name",
        "unit_status": "unit_status",
        "unit_tag": "unit_tag"
      }
    ],
    "customer_id": "customer_id"
  },
  "success": true
}
```