---
title: List your managed organizations
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: Docs > API Reference > Organizations
---

# List your managed organizations{% #list-your-managed-organizations %}
Copy pageCopied
{% tab title="v2" %}

| Datadog site      | API endpoint                                 |
| ----------------- | -------------------------------------------- |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v2/org |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v2/org |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v2/org      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v2/org      |
| us2.ddog-gov.com  | GET https://api.us2.ddog-gov.com/api/v2/org  |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v2/org     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v2/org |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v2/org |

### Overview

Returns the current organization and its managed organizations in JSON:API format. This endpoint requires any of the following permissions:
`org_management``org_connections_write` 


OAuth apps require the `org_management, org_connections_write` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#organizations) to access this endpoint.



### Arguments

#### Query Strings

| Name         | Type   | Description                           |
| ------------ | ------ | ------------------------------------- |
| filter[name] | string | Filter managed organizations by name. |

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Response containing the current organization and its managed organizations.

| Parent field  | Field                           | Type      | Description                                                                      |
| ------------- | ------------------------------- | --------- | -------------------------------------------------------------------------------- |
|               | data [*required*]          | object    | The managed organizations resource.                                              |
| data          | id [*required*]            | uuid      | The UUID of the current organization.                                            |
| data          | relationships [*required*] | object    | Relationships of the managed organizations resource.                             |
| relationships | current_org [*required*]   | object    | Relationship to the current organization.                                        |
| current_org   | data [*required*]          | object    | Reference to an organization resource.                                           |
| data          | id [*required*]            | uuid      | The UUID of the organization.                                                    |
| data          | type [*required*]          | enum      | The resource type for organizations. Allowed enum values: `orgs`                 |
| relationships | managed_orgs [*required*]  | object    | Relationship to the managed organizations.                                       |
| managed_orgs  | data [*required*]          | [object]  | List of managed organization references.                                         |
| data          | id [*required*]            | uuid      | The UUID of the organization.                                                    |
| data          | type [*required*]          | enum      | The resource type for organizations. Allowed enum values: `orgs`                 |
| data          | type [*required*]          | enum      | The resource type for managed organizations. Allowed enum values: `managed_orgs` |
|               | included [*required*]      | [object]  | Included organization resources.                                                 |
| included      | attributes [*required*]    | object    | Attributes of an organization.                                                   |
| attributes    | created_at [*required*]    | date-time | The creation timestamp of the organization.                                      |
| attributes    | description [*required*]   | string    | A description of the organization.                                               |
| attributes    | disabled [*required*]      | boolean   | Whether the organization is disabled.                                            |
| attributes    | modified_at [*required*]   | date-time | The last modification timestamp of the organization.                             |
| attributes    | name [*required*]          | string    | The name of the organization.                                                    |
| attributes    | public_id [*required*]     | string    | The public identifier of the organization.                                       |
| attributes    | sharing [*required*]       | string    | The sharing setting of the organization.                                         |
| attributes    | url [*required*]           | string    | The URL of the organization.                                                     |
| included      | id [*required*]            | uuid      | The UUID of the organization.                                                    |
| included      | type [*required*]          | enum      | The resource type for organizations. Allowed enum values: `orgs`                 |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "id": "4dee724d-00cc-11ea-a77b-570c9d03c6c5",
    "relationships": {
      "current_org": {
        "data": {
          "id": "4dee724d-00cc-11ea-a77b-570c9d03c6c5",
          "type": "orgs"
        }
      },
      "managed_orgs": {
        "data": [
          {
            "id": "4dee724d-00cc-11ea-a77b-570c9d03c6c5",
            "type": "orgs"
          }
        ]
      }
    },
    "type": "managed_orgs"
  },
  "included": [
    {
      "attributes": {
        "created_at": "2019-09-26T17:28:28Z",
        "description": "Production organization.",
        "disabled": false,
        "modified_at": "2024-01-15T10:30:00Z",
        "name": "My Organization",
        "public_id": "abcdef12345",
        "sharing": "none",
        "url": "https://app.datadoghq.com/account/my-org"
      },
      "id": "4dee724d-00cc-11ea-a77b-570c9d03c6c5",
      "type": "orgs"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="401" %}
Unauthorized
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Curl command curl -X GET "https://api.datadoghq.com/api/v2/org" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" 
                
##### 

```python
"""
List your managed organizations returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.organizations_api import OrganizationsApi

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = OrganizationsApi(api_client)
    response = api_instance.list_orgs()

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
##### 

```ruby
# List your managed organizations returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::OrganizationsAPI.new
p api_instance.list_orgs()
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
##### 

```go
// List your managed organizations returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)

func main() {
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewOrganizationsApi(apiClient)
	resp, r, err := api.ListOrgs(ctx, *datadogV2.NewListOrgsOptionalParameters())

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `OrganizationsApi.ListOrgs`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `OrganizationsApi.ListOrgs`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
##### 

```java
// List your managed organizations returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.OrganizationsApi;
import com.datadog.api.client.v2.model.ManagedOrgsResponse;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    OrganizationsApi apiInstance = new OrganizationsApi(defaultClient);

    try {
      ManagedOrgsResponse result = apiInstance.listOrgs();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling OrganizationsApi#listOrgs");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
##### 

```rust
// List your managed organizations returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_organizations::ListOrgsOptionalParams;
use datadog_api_client::datadogV2::api_organizations::OrganizationsAPI;

#[tokio::main]
async fn main() {
    let configuration = datadog::Configuration::new();
    let api = OrganizationsAPI::with_config(configuration);
    let resp = api.list_orgs(ListOrgsOptionalParams::default()).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
##### 

```typescript
/**
 * List your managed organizations returns "OK" response
 */

import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v2.OrganizationsApi(configuration);

apiInstance
  .listOrgs()
  .then((data: v2.ManagedOrgsResponse) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"
{% /tab %}

{% tab title="v1" %}

| Datadog site      | API endpoint                                 |
| ----------------- | -------------------------------------------- |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v1/org |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v1/org |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v1/org      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v1/org      |
| us2.ddog-gov.com  | GET https://api.us2.ddog-gov.com/api/v1/org  |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v1/org     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v1/org |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v1/org |

### Overview

This endpoint returns data on your top-level organization. This endpoint requires the `org_management` permission.

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Response with the list of organizations.

| Parent field                  | Field                         | Type     | Description                                                                                                                                                                                                 |
| ----------------------------- | ----------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                               | orgs                          | [object] | Array of organization objects.                                                                                                                                                                              |
| orgs                          | billing                       | object   | **DEPRECATED**: A JSON array of billing type.                                                                                                                                                               |
| billing                       | type                          | string   | The type of billing. Only `parent_billing` is supported.                                                                                                                                                    |
| orgs                          | created                       | string   | Date of the organization creation.                                                                                                                                                                          |
| orgs                          | description                   | string   | Description of the organization.                                                                                                                                                                            |
| orgs                          | name                          | string   | The name of the child organization, limited to 32 characters.                                                                                                                                               |
| orgs                          | public_id                     | string   | The `public_id` of the organization you are operating within.                                                                                                                                               |
| orgs                          | settings                      | object   | A JSON array of settings.                                                                                                                                                                                   |
| settings                      | private_widget_share          | boolean  | Whether or not the organization users can share widgets outside of Datadog.                                                                                                                                 |
| settings                      | saml                          | object   | Set the boolean property enabled to enable or disable single sign on with SAML. See the SAML documentation for more information about all SAML settings.                                                    |
| saml                          | enabled                       | boolean  | Whether or not SAML is enabled for this organization.                                                                                                                                                       |
| settings                      | saml_autocreate_access_role   | enum     | The access role of the user. Options are **st** (standard user), **adm** (admin user), or **ro** (read-only user). Allowed enum values: `st,adm,ro,ERROR`                                                   |
| settings                      | saml_autocreate_users_domains | object   | Has two properties, `enabled` (boolean) and `domains`, which is a list of domains without the @ symbol.                                                                                                     |
| saml_autocreate_users_domains | domains                       | [string] | List of domains where the SAML automated user creation is enabled.                                                                                                                                          |
| saml_autocreate_users_domains | enabled                       | boolean  | Whether or not the automated user creation based on SAML domain is enabled.                                                                                                                                 |
| settings                      | saml_can_be_enabled           | boolean  | Whether or not SAML can be enabled for this organization.                                                                                                                                                   |
| settings                      | saml_idp_endpoint             | string   | Identity provider endpoint for SAML authentication.                                                                                                                                                         |
| settings                      | saml_idp_initiated_login      | object   | Has one property enabled (boolean).                                                                                                                                                                         |
| saml_idp_initiated_login      | enabled                       | boolean  | Whether SAML IdP initiated login is enabled, learn more in the [SAML documentation](https://docs.datadoghq.com/account_management/saml.md#idp-initiated-login).                                             |
| settings                      | saml_idp_metadata_uploaded    | boolean  | Whether or not a SAML identity provider metadata file was provided to the Datadog organization.                                                                                                             |
| settings                      | saml_login_url                | string   | URL for SAML logging.                                                                                                                                                                                       |
| settings                      | saml_strict_mode              | object   | Has one property enabled (boolean).                                                                                                                                                                         |
| saml_strict_mode              | enabled                       | boolean  | Whether or not the SAML strict mode is enabled. If true, all users must log in with SAML. Learn more on the [SAML Strict documentation](https://docs.datadoghq.com/account_management/saml.md#saml-strict). |
| orgs                          | subscription                  | object   | **DEPRECATED**: Subscription definition.                                                                                                                                                                    |
| subscription                  | type                          | string   | The subscription type. Types available are `trial`, `free`, and `pro`.                                                                                                                                      |
| orgs                          | trial                         | boolean  | Only available for MSP customers. Allows child organizations to be created on a trial plan.                                                                                                                 |

{% /tab %}

{% tab title="Example" %}

```json
{
  "orgs": [
    {
      "billing": {
        "type": "string"
      },
      "created": "2019-09-26T17:28:28Z",
      "description": "some description",
      "name": "New child org",
      "public_id": "abcdef12345",
      "settings": {
        "private_widget_share": false,
        "saml": {
          "enabled": false
        },
        "saml_autocreate_access_role": "ro",
        "saml_autocreate_users_domains": {
          "domains": [
            "example.com"
          ],
          "enabled": false
        },
        "saml_can_be_enabled": false,
        "saml_idp_endpoint": "https://my.saml.endpoint",
        "saml_idp_initiated_login": {
          "enabled": false
        },
        "saml_idp_metadata_uploaded": false,
        "saml_login_url": "https://my.saml.login.url",
        "saml_strict_mode": {
          "enabled": false
        }
      },
      "subscription": {
        "type": "string"
      },
      "trial": false
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Curl command curl -X GET "https://api.datadoghq.com/api/v1/org" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" 
                
##### 

```python
"""
List your managed organizations returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.organizations_api import OrganizationsApi

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = OrganizationsApi(api_client)
    response = api_instance.list_orgs()

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" python3 "example.py"
##### 

```ruby
# List your managed organizations returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::OrganizationsAPI.new
p api_instance.list_orgs()
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"
##### 

```go
// List your managed organizations returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV1"
)

func main() {
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV1.NewOrganizationsApi(apiClient)
	resp, r, err := api.ListOrgs(ctx)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `OrganizationsApi.ListOrgs`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `OrganizationsApi.ListOrgs`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"
##### 

```java
// List your managed organizations returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.OrganizationsApi;
import com.datadog.api.client.v1.model.OrganizationListResponse;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    OrganizationsApi apiInstance = new OrganizationsApi(defaultClient);

    try {
      OrganizationListResponse result = apiInstance.listOrgs();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling OrganizationsApi#listOrgs");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" java "Example.java"
##### 

```rust
// List your managed organizations returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV1::api_organizations::OrganizationsAPI;

#[tokio::main]
async fn main() {
    let configuration = datadog::Configuration::new();
    let api = OrganizationsAPI::with_config(configuration);
    let resp = api.list_orgs().await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo run
##### 

```typescript
/**
 * List your managed organizations returns "OK" response
 */

import { client, v1 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v1.OrganizationsApi(configuration);

apiInstance
  .listOrgs()
  .then((data: v1.OrganizationListResponse) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" tsc "example.ts"
{% /tab %}
