---
agentTools:
  projectIndex: https://imx.readme.io/llms.txt
---

# Update metadata schema by name

Update metadata schema by name

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Immutable X API",
    "version": "1.0",
    "description": "https://docs.x.immutable.com/reference",
    "contact": {
      "name": "Immutable",
      "url": "https://godsunchained.com"
    }
  },
  "servers": [
    {
      "url": "https://api.x.immutable.com",
      "description": "Production Environment"
    },
    {
      "url": "https://api.ropsten.x.immutable.com",
      "description": "Ropsten Environment"
    }
  ],
  "paths": {
    "/v1/collections/{address}/metadata-schema/{name}": {
      "parameters": [
        {
          "schema": {
            "type": "string"
          },
          "name": "address",
          "in": "path",
          "required": true,
          "description": "Collection contract address"
        },
        {
          "schema": {
            "type": "string"
          },
          "name": "name",
          "in": "path",
          "required": true,
          "description": "Metadata schema name"
        }
      ],
      "patch": {
        "summary": "Update metadata schema by name",
        "operationId": "updateMetadataSchemaByName",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Update metadata schema by name",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "",
                "type": "object",
                "x-examples": {
                  "example-1": {
                    "filterable": true,
                    "name": "a",
                    "type": "b"
                  }
                },
                "properties": {
                  "filterable": {
                    "type": "boolean",
                    "description": "Sets the metadata as filterable"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Name of the metadata key"
                  },
                  "type": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Type of the metadata. Values: \"enum\", \"text\", \"boolean\", \"continuous\", \"discrete\" | Default: \"text\". Src: https://docs.x.immutable.com/docs/asset-metadata#property-type-mapping"
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "tags": [
          "collections"
        ]
      }
    }
  },
  "tags": [
    {
      "name": "collections"
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 97,
      "1": 222,
      "2": 73,
      "3": 4,
      "4": 47,
      "5": 148,
      "6": 195,
      "7": 0,
      "8": 100,
      "9": 250,
      "10": 119,
      "11": 107
    }
  }
}
```