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

# Update your organization{% #update-your-organization %}

{% tab title="v1" %}

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

### Overview

Update your organization.

### Arguments

#### Path Parameters

| Name                        | Type   | Description                                                   |
| --------------------------- | ------ | ------------------------------------------------------------- |
| public_id [*required*] | string | The `public_id` of the organization you are operating within. |

### Request

#### Body Data (required)



{% tab title="Model" %}

| Parent field                  | Field                         | Type     | Description                                                                                                                                                                                                 |
| ----------------------------- | ----------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                               | billing                       | object   | **DEPRECATED**: A JSON array of billing type.                                                                                                                                                               |
| billing                       | type                          | string   | The type of billing. Only `parent_billing` is supported.                                                                                                                                                    |
|                               | created                       | string   | Date of the organization creation.                                                                                                                                                                          |
|                               | description                   | string   | Description of the organization.                                                                                                                                                                            |
|                               | name                          | string   | The name of the child organization, limited to 32 characters.                                                                                                                                               |
|                               | public_id                     | string   | The `public_id` of the organization you are operating within.                                                                                                                                               |
|                               | 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). |
|                               | subscription                  | object   | **DEPRECATED**: Subscription definition.                                                                                                                                                                    |
| subscription                  | type                          | string   | The subscription type. Types available are `trial`, `free`, and `pro`.                                                                                                                                      |
|                               | trial                         | boolean  | Only available for MSP customers. Allows child organizations to be created on a trial plan.                                                                                                                 |

{% /tab %}

{% tab title="Example" %}

```json
{
  "billing": {
    "type": "string"
  },
  "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 %}

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Response with an organization.

| Parent field                  | Field                         | Type     | Description                                                                                                                                                                                                 |
| ----------------------------- | ----------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                               | org                           | object   | Create, edit, and manage organizations.                                                                                                                                                                     |
| org                           | billing                       | object   | **DEPRECATED**: A JSON array of billing type.                                                                                                                                                               |
| billing                       | type                          | string   | The type of billing. Only `parent_billing` is supported.                                                                                                                                                    |
| org                           | created                       | string   | Date of the organization creation.                                                                                                                                                                          |
| org                           | description                   | string   | Description of the organization.                                                                                                                                                                            |
| org                           | name                          | string   | The name of the child organization, limited to 32 characters.                                                                                                                                               |
| org                           | public_id                     | string   | The `public_id` of the organization you are operating within.                                                                                                                                               |
| org                           | 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). |
| org                           | subscription                  | object   | **DEPRECATED**: Subscription definition.                                                                                                                                                                    |
| subscription                  | type                          | string   | The subscription type. Types available are `trial`, `free`, and `pro`.                                                                                                                                      |
| org                           | trial                         | boolean  | Only available for MSP customers. Allows child organizations to be created on a trial plan.                                                                                                                 |

{% /tab %}

{% tab title="Example" %}

```json
{
  "org": {
    "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="400" %}
Bad Request
{% 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="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

##### 
                  \## default
# 
 \# Path parameters export public_id="abc123" \# Curl command curl -X PUT "https://api.datadoghq.com/api/v1/org/${public_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "billing": {
    "type": "parent_billing"
  },
  "name": "New child org",
  "settings": {
    "saml": {
      "enabled": false
    },
    "saml_idp_initiated_login": {
      "enabled": false
    },
    "saml_strict_mode": {
      "enabled": false
    }
  }
}
EOF 
                
##### 

```python
"""
Update your organization returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.organizations_api import OrganizationsApi
from datadog_api_client.v1.model.access_role import AccessRole
from datadog_api_client.v1.model.organization import Organization
from datadog_api_client.v1.model.organization_billing import OrganizationBilling
from datadog_api_client.v1.model.organization_settings import OrganizationSettings
from datadog_api_client.v1.model.organization_settings_saml import OrganizationSettingsSaml
from datadog_api_client.v1.model.organization_settings_saml_autocreate_users_domains import (
    OrganizationSettingsSamlAutocreateUsersDomains,
)
from datadog_api_client.v1.model.organization_settings_saml_idp_initiated_login import (
    OrganizationSettingsSamlIdpInitiatedLogin,
)
from datadog_api_client.v1.model.organization_settings_saml_strict_mode import OrganizationSettingsSamlStrictMode
from datadog_api_client.v1.model.organization_subscription import OrganizationSubscription

body = Organization(
    billing=OrganizationBilling(
        type="parent_billing",
    ),
    description="some description",
    name="New child org",
    public_id="abcdef12345",
    settings=OrganizationSettings(
        private_widget_share=False,
        saml=OrganizationSettingsSaml(
            enabled=False,
        ),
        saml_autocreate_access_role=AccessRole.READ_ONLY,
        saml_autocreate_users_domains=OrganizationSettingsSamlAutocreateUsersDomains(
            domains=[
                "example.com",
            ],
            enabled=False,
        ),
        saml_can_be_enabled=False,
        saml_idp_endpoint="https://my.saml.endpoint",
        saml_idp_initiated_login=OrganizationSettingsSamlIdpInitiatedLogin(
            enabled=False,
        ),
        saml_idp_metadata_uploaded=False,
        saml_login_url="https://my.saml.login.url",
        saml_strict_mode=OrganizationSettingsSamlStrictMode(
            enabled=False,
        ),
    ),
    subscription=OrganizationSubscription(
        type="pro",
    ),
    trial=False,
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = OrganizationsApi(api_client)
    response = api_instance.update_org(public_id="abc123", body=body)

    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
# Update your organization returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::OrganizationsAPI.new

body = DatadogAPIClient::V1::Organization.new({
  billing: DatadogAPIClient::V1::OrganizationBilling.new({
    type: "parent_billing",
  }),
  description: "some description",
  name: "New child org",
  public_id: "abcdef12345",
  settings: DatadogAPIClient::V1::OrganizationSettings.new({
    private_widget_share: false,
    saml: DatadogAPIClient::V1::OrganizationSettingsSaml.new({
      enabled: false,
    }),
    saml_autocreate_access_role: DatadogAPIClient::V1::AccessRole::READ_ONLY,
    saml_autocreate_users_domains: DatadogAPIClient::V1::OrganizationSettingsSamlAutocreateUsersDomains.new({
      domains: [
        "example.com",
      ],
      enabled: false,
    }),
    saml_can_be_enabled: false,
    saml_idp_endpoint: "https://my.saml.endpoint",
    saml_idp_initiated_login: DatadogAPIClient::V1::OrganizationSettingsSamlIdpInitiatedLogin.new({
      enabled: false,
    }),
    saml_idp_metadata_uploaded: false,
    saml_login_url: "https://my.saml.login.url",
    saml_strict_mode: DatadogAPIClient::V1::OrganizationSettingsSamlStrictMode.new({
      enabled: false,
    }),
  }),
  subscription: DatadogAPIClient::V1::OrganizationSubscription.new({
    type: "pro",
  }),
  trial: false,
})
p api_instance.update_org("abc123", body)
```

#### 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
// Update your organization 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() {
	body := datadogV1.Organization{
		Billing: &datadogV1.OrganizationBilling{
			Type: datadog.PtrString("parent_billing"),
		},
		Description: datadog.PtrString("some description"),
		Name:        datadog.PtrString("New child org"),
		PublicId:    datadog.PtrString("abcdef12345"),
		Settings: &datadogV1.OrganizationSettings{
			PrivateWidgetShare: datadog.PtrBool(false),
			Saml: &datadogV1.OrganizationSettingsSaml{
				Enabled: datadog.PtrBool(false),
			},
			SamlAutocreateAccessRole: *datadogV1.NewNullableAccessRole(datadogV1.ACCESSROLE_READ_ONLY.Ptr()),
			SamlAutocreateUsersDomains: &datadogV1.OrganizationSettingsSamlAutocreateUsersDomains{
				Domains: []string{
					"example.com",
				},
				Enabled: datadog.PtrBool(false),
			},
			SamlCanBeEnabled: datadog.PtrBool(false),
			SamlIdpEndpoint:  datadog.PtrString("https://my.saml.endpoint"),
			SamlIdpInitiatedLogin: &datadogV1.OrganizationSettingsSamlIdpInitiatedLogin{
				Enabled: datadog.PtrBool(false),
			},
			SamlIdpMetadataUploaded: datadog.PtrBool(false),
			SamlLoginUrl:            datadog.PtrString("https://my.saml.login.url"),
			SamlStrictMode: &datadogV1.OrganizationSettingsSamlStrictMode{
				Enabled: datadog.PtrBool(false),
			},
		},
		Subscription: &datadogV1.OrganizationSubscription{
			Type: datadog.PtrString("pro"),
		},
		Trial: datadog.PtrBool(false),
	}
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV1.NewOrganizationsApi(apiClient)
	resp, r, err := api.UpdateOrg(ctx, "abc123", body)

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

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `OrganizationsApi.UpdateOrg`:\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
// Update your organization 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.AccessRole;
import com.datadog.api.client.v1.model.Organization;
import com.datadog.api.client.v1.model.OrganizationBilling;
import com.datadog.api.client.v1.model.OrganizationResponse;
import com.datadog.api.client.v1.model.OrganizationSettings;
import com.datadog.api.client.v1.model.OrganizationSettingsSaml;
import com.datadog.api.client.v1.model.OrganizationSettingsSamlAutocreateUsersDomains;
import com.datadog.api.client.v1.model.OrganizationSettingsSamlIdpInitiatedLogin;
import com.datadog.api.client.v1.model.OrganizationSettingsSamlStrictMode;
import com.datadog.api.client.v1.model.OrganizationSubscription;
import java.util.Collections;

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

    Organization body =
        new Organization()
            .billing(new OrganizationBilling().type("parent_billing"))
            .description("some description")
            .name("New child org")
            .publicId("abcdef12345")
            .settings(
                new OrganizationSettings()
                    .privateWidgetShare(false)
                    .saml(new OrganizationSettingsSaml().enabled(false))
                    .samlAutocreateAccessRole(AccessRole.READ_ONLY)
                    .samlAutocreateUsersDomains(
                        new OrganizationSettingsSamlAutocreateUsersDomains()
                            .domains(Collections.singletonList("example.com"))
                            .enabled(false))
                    .samlCanBeEnabled(false)
                    .samlIdpEndpoint("https://my.saml.endpoint")
                    .samlIdpInitiatedLogin(
                        new OrganizationSettingsSamlIdpInitiatedLogin().enabled(false))
                    .samlIdpMetadataUploaded(false)
                    .samlLoginUrl("https://my.saml.login.url")
                    .samlStrictMode(new OrganizationSettingsSamlStrictMode().enabled(false)))
            .subscription(new OrganizationSubscription().type("pro"))
            .trial(false);

    try {
      OrganizationResponse result = apiInstance.updateOrg("abc123", body);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling OrganizationsApi#updateOrg");
      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
// Update your organization returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV1::api_organizations::OrganizationsAPI;
use datadog_api_client::datadogV1::model::AccessRole;
use datadog_api_client::datadogV1::model::Organization;
use datadog_api_client::datadogV1::model::OrganizationBilling;
use datadog_api_client::datadogV1::model::OrganizationSettings;
use datadog_api_client::datadogV1::model::OrganizationSettingsSaml;
use datadog_api_client::datadogV1::model::OrganizationSettingsSamlAutocreateUsersDomains;
use datadog_api_client::datadogV1::model::OrganizationSettingsSamlIdpInitiatedLogin;
use datadog_api_client::datadogV1::model::OrganizationSettingsSamlStrictMode;
use datadog_api_client::datadogV1::model::OrganizationSubscription;

#[tokio::main]
async fn main() {
    let body = Organization::new()
        .billing(OrganizationBilling::new().type_("parent_billing".to_string()))
        .description("some description".to_string())
        .name("New child org".to_string())
        .public_id("abcdef12345".to_string())
        .settings(
            OrganizationSettings::new()
                .private_widget_share(false)
                .saml(OrganizationSettingsSaml::new().enabled(false))
                .saml_autocreate_access_role(Some(AccessRole::READ_ONLY))
                .saml_autocreate_users_domains(
                    OrganizationSettingsSamlAutocreateUsersDomains::new()
                        .domains(vec!["example.com".to_string()])
                        .enabled(false),
                )
                .saml_can_be_enabled(false)
                .saml_idp_endpoint("https://my.saml.endpoint".to_string())
                .saml_idp_initiated_login(
                    OrganizationSettingsSamlIdpInitiatedLogin::new().enabled(false),
                )
                .saml_idp_metadata_uploaded(false)
                .saml_login_url("https://my.saml.login.url".to_string())
                .saml_strict_mode(OrganizationSettingsSamlStrictMode::new().enabled(false)),
        )
        .subscription(OrganizationSubscription::new().type_("pro".to_string()))
        .trial(false);
    let configuration = datadog::Configuration::new();
    let api = OrganizationsAPI::with_config(configuration);
    let resp = api.update_org("abc123".to_string(), body).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
/**
 * Update your organization returns "OK" response
 */

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

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

const params: v1.OrganizationsApiUpdateOrgRequest = {
  body: {
    billing: {
      type: "parent_billing",
    },
    description: "some description",
    name: "New child org",
    publicId: "abcdef12345",
    settings: {
      privateWidgetShare: false,
      saml: {
        enabled: false,
      },
      samlAutocreateAccessRole: "ro",
      samlAutocreateUsersDomains: {
        domains: ["example.com"],
        enabled: false,
      },
      samlCanBeEnabled: false,
      samlIdpEndpoint: "https://my.saml.endpoint",
      samlIdpInitiatedLogin: {
        enabled: false,
      },
      samlIdpMetadataUploaded: false,
      samlLoginUrl: "https://my.saml.login.url",
      samlStrictMode: {
        enabled: false,
      },
    },
    subscription: {
      type: "pro",
    },
    trial: false,
  },
  publicId: "abc123",
};

apiInstance
  .updateOrg(params)
  .then((data: v1.OrganizationResponse) => {
    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 %}
