Update or Remove Keys from Organization Metadata with the Management API

Overview

This article provides instructions on updating or removing key-value pairs from the Organization Metadata using the Management API.

Applies To

  • Organizations
  • Management API

Solution

Update existing values or remove key-value pairs from Organization Metadata by submitting a new request body using the Management API.

  1. Use the Modify an Organization API endpoint to change the body of the Organization Metadata. The existing metadata is overwritten by the content of the new API call.
  2. To modify or remove keys, construct a new JSON body containing only the desired keys with their updated values.
  3. For example, to update the value of the MFA key and remove the key2 key from the following metadata structure:
{
  "metadata": {
    "key1": "value1",
    "MFA": "true",
    "key2": "value2"
  }
}
  1. Send an API call with a request body that includes the updated MFA value and omits key2. This action removes the key2 key entirely.
{
  "metadata": {
    "key1": "value1",
    "MFA": "false"
  }
}