Cloudinary Metadata Rules API

Enables you to set up dependencies and relationships between structured metadata fields and options.

GitHub OpenAPI

Operations 4

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /v1_1/{cloud_name}/metadata_rules Create a metadata rule · Creates a new conditional metadata rule #
Ask an LLM
“How do I create a new metadata rule that sets a field when a condition is met?”
“Can I set the result and state when creating a metadata rule?”
Tell an agent
Create a metadata rule named {name} with condition {condition} and result {result} in {cloud_name}.
Add a new metadata rule for field {metadata_field_id} in {cloud_name}.
GET /v1_1/{cloud_name}/metadata_rules List metadata rules · Retrieves a list of all conditional metadata rules defined in your account #
Ask an LLM
“Which conditional metadata rules are defined in my account?”
“Can I see all metadata rules for one cloud name?”
Tell an agent
List all metadata rules in {cloud_name}.
Show every conditional metadata rule for {cloud_name}.
PUT /v1_1/{cloud_name}/metadata_rules/{external_id} Update a metadata rule · Updates an existing conditional metadata rule's definition #
Ask an LLM
“Can I change the condition or result of an existing metadata rule?”
“How do I deactivate a metadata rule by ID?”
Tell an agent
Update metadata rule {external_id} in {cloud_name} to condition {condition} and result {result}.
Set the state of metadata rule {external_id} in {cloud_name} to {state}.
DELETE /v1_1/{cloud_name}/metadata_rules/{external_id} Delete a metadata rule · Deletes a conditional metadata rule by its ID #
Ask an LLM
“How do I permanently delete a metadata rule?”
“Can I remove a conditional metadata rule by its ID?”
Tell an agent destructive · confirm first
Delete metadata rule {external_id} from {cloud_name}.
Permanently remove conditional metadata rule {external_id} in {cloud_name}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/cloudinary:cloudinary-metadata-rules-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

cloudinary-metadata-rules-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Cloudinary Metadata Rules API
  contact:
    name: Cloudinary Support
    email: support@cloudinary.com
    url: https://support.cloudinary.com
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  termsOfService: https://cloudinary.com/tou
  version: '1.0'
  description: 'Operations tagged metadata_rules across 3 of this provider''s published API definitions: cloudinary-api-schema.yml, cloudinary-platform-openapi.yml, cloudinary-structured-metadata-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://{region}.cloudinary.com
  description: Regional API endpoints for optimal performance.
  variables:
    region:
      default: api
      description: Regional endpoint selection
      enum:
      - api
      - api-eu
      - api-ap
- url: https://{host}
  description: Custom domains for enterprise deployments.
  variables:
    host:
      default: api.cloudinary.com
      description: API host domain.
tags:
- name: metadata_rules
  description: Enables you to set up dependencies and relationships between structured metadata fields and options.
paths:
  /v1_1/{cloud_name}/metadata_rules:
    parameters:
    - $ref: '#/components/parameters/cloud_name'
    post:
      x-speakeasy-mcp:
        name: create-metadata-rule
        scopes:
        - builder
        title: Create Metadata Rule
      operationId: createMetadataRule
      summary: Creates a new conditional metadata rule
      description: Creates a new metadata rule with the specified properties and configuration.
      tags:
      - metadata_rules
      responses:
        '200':
          description: metadata rule created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/metadata_rule_response'
        '400':
          description: validation error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_error'
        '401':
          description: authentication error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_error'
        '403':
          description: insufficient permissions.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_error'
      requestBody:
        description: The metadata rule to create.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/metadata_rule_create'
      security:
      - basicAuth: []
      - oauth2:
        - asset_management
        - upload
        - media_generation
    get:
      x-speakeasy-mcp:
        name: list-metadata-rules
        scopes:
        - builder
        title: List Metadata Rules
        readOnlyHint: true
        idempotentHint: true
      operationId: listMetadataRules
      summary: Retrieves a list of all conditional metadata rules defined in your account
      description: Retrieves a list of all metadata rules in the cloud.
      tags:
      - metadata_rules
      responses:
        '200':
          description: metadata rules retrieved.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/metadata_rules_list_response'
        '401':
          description: authentication error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_error'
        '403':
          description: insufficient permissions.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_error'
      security:
      - basicAuth: []
      - oauth2:
        - asset_management
        - upload
        - media_generation
    servers:
    - url: https://{region}.cloudinary.com
      description: Regional API endpoints for optimal performance.
      variables:
        region:
          default: api
          description: Regional endpoint selection
          enum:
          - api
          - api-eu
          - api-ap
    - url: https://{host}
      description: Custom domains for enterprise deployments.
      variables:
        host:
          default: api.cloudinary.com
          description: API host domain.
  /v1_1/{cloud_name}/metadata_rules/{external_id}:
    parameters:
    - $ref: '#/components/parameters/cloud_name'
    - name: external_id
      in: path
      required: true
      schema:
        type: string
      description: The unique identifier of the metadata rule.
    put:
      x-speakeasy-mcp:
        name: update-metadata-rule
        scopes:
        - builder
        title: Update Metadata Rule
        idempotentHint: true
      operationId: updateMetadataRule
      summary: Updates an existing conditional metadata rule's definition
      description: Updates the properties and configuration of an existing metadata rule.
      tags:
      - metadata_rules
      requestBody:
        description: The updated metadata rule definition.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/metadata_rule_update'
      responses:
        '200':
          description: metadata rule updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/metadata_rule_response'
        '400':
          description: validation error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_error'
        '401':
          description: authentication error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_error'
        '403':
          description: insufficient permissions.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_error'
        '404':
          description: metadata rule not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_error'
      security:
      - basicAuth: []
      - oauth2:
        - asset_management
        - upload
        - media_generation
    delete:
      x-speakeasy-mcp:
        name: delete-metadata-rule
        scopes:
        - builder
        title: Delete Metadata Rule
        destructiveHint: true
        idempotentHint: true
      operationId: deleteMetadataRule
      summary: Deletes a conditional metadata rule by its ID
      description: Permanently deletes a metadata rule.
      tags:
      - metadata_rules
      responses:
        '200':
          description: metadata rule deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/success_response'
        '400':
          description: validation error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_error'
        '401':
          description: authentication error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_error'
        '403':
          description: insufficient permissions.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_error'
        '404':
          description: metadata rule not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_error'
      security:
      - basicAuth: []
      - oauth2:
        - asset_management
        - upload
        - media_generation
    servers:
    - url: https://{region}.cloudinary.com
      description: Regional API endpoints for optimal performance.
      variables:
        region:
          default: api
          description: Regional endpoint selection
          enum:
          - api
          - api-eu
          - api-ap
    - url: https://{host}
      description: Custom domains for enterprise deployments.
      variables:
        host:
          default: api.cloudinary.com
          description: API host domain.
components:
  parameters:
    cloud_name:
      name: cloud_name
      in: path
      required: true
      schema:
        type: string
      description: The cloud name of your product environment.
      example: my_cloud
  schemas:
    state_enum:
      type: string
      enum:
      - active
      - inactive
      description: The active or inactive state.
    metadata_rule_apply_value:
      type: object
      description: Applies a specific value to the metadata field when the rule condition is met.
      required:
      - value
      properties:
        value:
          type:
          - string
          - 'null'
          description: The value to apply to the metadata field.
          example: my value
        mode:
          type: string
          enum:
          - default
          - override
          - append
          description: 'How to apply the value. `default` sets it only when no value is already inferred; `override` always replaces any inferred value; `append` adds to an existing array value.

            '
          example: default
    metadata_rule_update:
      allOf:
      - $ref: '#/components/schemas/metadata_rule_base'
      example:
        metadata_field_id: smd-field-1
        name: Disable field when other field is populated
        condition:
          metadata_field_id: smd-field-2
          populated: true
        result:
          disable: true
        state: active
        position: 1
    metadata_rule_base:
      type: object
      properties:
        metadata_field_id:
          type: string
          description: The ID of the metadata field this rule applies to.
        name:
          type: string
          description: A descriptive name for the metadata rule.
        condition:
          type: object
          description: The condition that triggers this rule. Ensure it adheres to the metadata rule condition schema.
        result:
          $ref: '#/components/schemas/metadata_rule_result'
        state:
          $ref: '#/components/schemas/state_enum'
          description: The state of the rule.
        position:
          type: integer
          description: The position/order of this rule relative to other rules.
      example:
        metadata_field_id: smd-field-1
        name: My Rule
        condition:
          metadata_field_id: smd-field-2
          populated: true
        result:
          apply_value:
            value: my value
            mode: default
        state: active
        position: 1
    metadata_rules_list_response:
      type: object
      properties:
        metadata_rules:
          type: array
          items:
            $ref: '#/components/schemas/metadata_rule_response'
    metadata_rule_result:
      type: object
      description: The result to apply when the rule's condition is met. At least one property must be set.
      minProperties: 1
      properties:
        apply_value:
          $ref: '#/components/schemas/metadata_rule_apply_value'
        disable:
          type: boolean
          description: When true, disables the field in the UI (sets default_disabled). Preferred over the legacy enable action.
        enable:
          type: boolean
          deprecated: true
          description: When true, enables the field in the UI (clears default_disabled). Deprecated — prefer using disable with value false instead.
        hide:
          type: boolean
          description: When true, hides the field in the UI (sets hidden_ui).
        activate_values:
          $ref: '#/components/schemas/metadata_rule_activate_values'
        set_mandatory:
          type: boolean
          description: When true, makes the field mandatory; when false, makes it optional.
    metadata_rule_activate_values:
      description: 'Restricts which datasource option ids are active. Either the string "all" (activate every option) or an object listing the external ids to activate.

        '
      oneOf:
      - type: string
        enum:
        - all
      - type: object
        required:
        - external_ids
        properties:
          external_ids:
            type:
            - array
            - 'null'
            items:
              type: string
            description: The datasource external ids to activate.
          mode:
            type: string
            enum:
            - override
            - append
            description: Whether to override the current active set or append to it. Defaults to append.
    success_response:
      type: object
      properties:
        success:
          type: boolean
          description: Whether the operation was successful.
          example: true
      required:
      - success
    metadata_rule_create:
      allOf:
      - $ref: '#/components/schemas/metadata_rule_base'
      required:
      - metadata_field_id
      - name
      - condition
      - result
      example:
        metadata_field_id: smd-field-1
        name: Disable field when other field is populated
        condition:
          metadata_field_id: smd-field-2
          populated: true
        result:
          disable: true
        state: active
        position: 1
    metadata_rule_response:
      allOf:
      - $ref: '#/components/schemas/metadata_rule_base'
      - type: object
        properties:
          external_id:
            type: string
            description: The unique identifier of the metadata rule.
          condition_signature:
            type: string
            description: A signature representing the condition structure.
      example:
        external_id: '1234567890'
        metadata_field_id: smd-field-1
        name: Disable field when other field is populated
        condition:
          metadata_field_id: smd-field-2
          populated: true
        condition_signature: dGhlIGZveCBqdW1wZWQgb3ZlciB0aGUgbGF6eSBkb2c
        result:
          disable: true
        state: active
        position: 1
    api_error:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
          required:
          - message
      required:
      - error
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: Basic authentication using Cloudinary API Key and API Secret.
    oauth2:
      type: oauth2
      description: OAuth2 Authorization Code flow for user authentication
      flows:
        authorizationCode:
          authorizationUrl: https://oauth.cloudinary.com/oauth2/auth
          tokenUrl: https://oauth.cloudinary.com/oauth2/token
          scopes:
            asset_management: Allows managing assets, including reading, updating, and deleting.
            upload: Allows uploading new assets.
            media_generation: Generate media
x-refined-from:
- cloudinary-api-schema.yml
- cloudinary-platform-openapi.yml
- cloudinary-structured-metadata-openapi.yml