Cloudinary Custom Policies API

View and manage the custom policies that control permissions in your account and product environments. Each policy includes a statement defined in Cedar. For more information on writing Cedar statements for custom policies, see the [Cedar official documentation](https://docs.cedarpolicy.com/).

GitHub OpenAPI

Operations 5

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

GET /v2/accounts/{account_id}/permissions/policies/custom List custom permission policies · Get custom policies #
Ask an LLM
“Which custom policies are defined for my account?”
“Can I list only the enabled custom policies?”
Tell an agent
List custom policies for account {account_id}.
Show custom policies in account {account_id} scoped to {scope_type}.
POST /v2/accounts/{account_id}/permissions/policies/custom Create a custom policy · Create custom policy #
Ask an LLM
“How do I create a custom policy with a Cedar statement?”
“Can I create a custom policy for a single product environment?”
Tell an agent
Create custom policy {name} in account {account_id} with statement {policy_statement}.
Create custom policy {name} scoped to {scope_type} {scope_id} in account {account_id}.
GET /v2/accounts/{account_id}/permissions/policies/custom/{policy_id} Get a custom policy · Get custom policy #
Ask an LLM
“What does one custom policy allow?”
“Can I fetch a single custom policy by ID?”
Tell an agent
Get custom policy {policy_id} in account {account_id}.
Show the statement of custom policy {policy_id}.
PUT /v2/accounts/{account_id}/permissions/policies/custom/{policy_id} Replace a custom policy · Update custom policy #
Ask an LLM
“How do I change the statement of an existing custom policy?”
“Will updating a policy with the same statement fail?”
Tell an agent
Replace custom policy {policy_id} in account {account_id} with statement {policy_statement}, name {name}.
Update custom policy {policy_id} to {name} scoped to {scope_type} {scope_id}.
DELETE /v2/accounts/{account_id}/permissions/policies/custom/{policy_id} Delete a custom policy · Delete custom policy #
Ask an LLM
“How do I delete a custom policy?”
“Can I remove a custom policy by ID?”
Tell an agent destructive · confirm first
Delete custom policy {policy_id} from account {account_id}.
Remove custom policy {policy_id}.

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-custom-policies-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-custom-policies-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Cloudinary Custom Policies 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
  x-refined-note:
  - x-cld-module-context differs across the merged source definitions and was not carried
  - x-cld-module-name differs across the merged source definitions and was not carried
  version: '1.0'
  description: 'Operations tagged Custom Policies across 3 of this provider''s published API definitions: cloudinary-provisioning-schema.yml, cloudinary-permissions-openapi.yml, cloudinary-provisioning-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.
security:
- basicAuth: []
tags:
- name: Custom Policies
  description: 'View and manage the custom policies that control permissions in your account and product environments. Each policy includes a statement defined in Cedar.


    For more information on writing Cedar statements for custom policies, see the Cedar official documentation.'
paths:
  /v2/accounts/{account_id}/permissions/policies/custom:
    parameters:
    - $ref: '#/components/parameters/AccountIdParam'
    get:
      x-speakeasy-group: policies.custom
      x-speakeasy-name-override: list
      x-speakeasy-mcp:
        name: list-custom-policies
        scopes:
        - admin
        title: List Custom Policies
        readOnlyHint: true
        idempotentHint: true
      summary: Get custom policies
      description: 'Retrieve all custom permission policies defined for a specific scope. The scope can be at the account level or within a specific product environment.


        **Notes:**

        * If `scope_type` isn''t specified as `prodenv`, the account-level policies will be returned.


        * If `scope_type` is specified as `prodenv`, `scope_id` is required.'
      operationId: getCustomPolicies
      tags:
      - Custom Policies
      parameters:
      - $ref: '#/components/parameters/ScopeTypeParam'
      - $ref: '#/components/parameters/ScopeIdParam'
      - $ref: '#/components/parameters/EnabledParam'
      - $ref: '#/components/parameters/CursorParam'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomPoliciesResponse'
              examples:
                CustomPoliciesExample:
                  $ref: '#/components/examples/CustomPoliciesExample'
        '401':
          description: Authorization required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PermissionsErrorResponse'
              examples:
                authorizationErrorExample:
                  $ref: '#/components/examples/AuthorizationErrorExample'
        '403':
          description: Not allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PermissionsErrorResponse'
              examples:
                authorizationErrorExample:
                  $ref: '#/components/examples/ForbiddenErrorExample'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PermissionsErrorResponse'
              examples:
                internalServerErrorExample:
                  $ref: '#/components/examples/InternalServerErrorExample'
    post:
      x-speakeasy-group: policies.custom
      x-speakeasy-name-override: create
      x-speakeasy-mcp:
        name: create-custom-policy
        scopes:
        - admin
        title: Create Custom Policy
        destructiveHint: false
      summary: Create custom policy
      description: Create a new custom policy with a statement defined in Cedar. This policy specifies permissions for a principal, allowing a specific action on a designated resource, within a particular scope.
      operationId: createCustomPolicy
      externalDocs:
        description: Learn more about creating a new custom policy
        url: https://cloudinary.com/documentation/permissions_api_guide#create_a_policy_statement
      tags:
      - Custom Policies
      requestBody:
        description: Policy details.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCustomPolicy'
            examples:
              createCustomPolicyExample:
                $ref: '#/components/examples/CreateCustomPolicyExample'
      responses:
        '201':
          description: Policy created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomPolicyResponse'
              examples:
                createPolicyResponse:
                  $ref: '#/components/examples/CreateCustomPolicyResponseExample'
        '400':
          description: Missing fields, invalid field, or invalid Cedar statement
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PermissionsErrorResponse'
              examples:
                missingFieldsErrorExample:
                  $ref: '#/components/examples/MissingFieldsErrorExample'
                invalidFieldErrorExample:
                  $ref: '#/components/examples/InvalidFieldErrorExample'
                cedarErrorExample:
                  $ref: '#/components/examples/CedarErrorExample'
        '401':
          description: Authorization required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PermissionsErrorResponse'
              examples:
                authorizationErrorExample:
                  $ref: '#/components/examples/AuthorizationErrorExample'
        '403':
          description: Not allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PermissionsErrorResponse'
              examples:
                authorizationErrorExample:
                  $ref: '#/components/examples/ForbiddenErrorExample'
        '409':
          description: Already exists for the scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PermissionsErrorResponse'
              examples:
                customPolicyAlreadyExistsErrorExample:
                  $ref: '#/components/examples/CustomPolicyAlreadyExistsErrorExample'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PermissionsErrorResponse'
              examples:
                internalServerErrorExample:
                  $ref: '#/components/examples/InternalServerErrorExample'
    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.
  /v2/accounts/{account_id}/permissions/policies/custom/{policy_id}:
    parameters:
    - $ref: '#/components/parameters/AccountIdParam'
    - $ref: '#/components/parameters/PolicyIdParam'
    get:
      x-speakeasy-group: policies.custom
      x-speakeasy-name-override: get
      x-speakeasy-mcp:
        name: get-custom-policy
        scopes:
        - admin
        title: Get Custom Policy
        readOnlyHint: true
        idempotentHint: true
      summary: Get custom policy
      description: Get a specific custom policy.
      operationId: getCustomPolicy
      tags:
      - Custom Policies
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomPolicyResponse'
              examples:
                CustomPolicyExample:
                  $ref: '#/components/examples/CustomPolicyExample'
        '401':
          description: Authorization required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PermissionsErrorResponse'
              examples:
                authorizationErrorExample:
                  $ref: '#/components/examples/AuthorizationErrorExample'
        '403':
          description: Not allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PermissionsErrorResponse'
              examples:
                authorizationErrorExample:
                  $ref: '#/components/examples/ForbiddenErrorExample'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PermissionsErrorResponse'
              examples:
                policyNotFoundErrorExample:
                  $ref: '#/components/examples/PolicyNotFoundErrorExample'
    put:
      summary: Update custom policy
      x-speakeasy-group: policies.custom
      x-speakeasy-name-override: update
      x-speakeasy-mcp:
        name: update-custom-policy
        scopes:
        - admin
        title: Update Custom Policy
        destructiveHint: false
        idempotentHint: true
      description: 'Update a specific custom policy by providing the entire policy entity in the request body. Ensure the new `policy_statement` includes modifications. Existing permissions will be replaced with the new data.


        *Note:* Updating a policy with an identical `policy_statement` will trigger a 409 error.'
      operationId: updateCustomPolicy
      tags:
      - Custom Policies
      requestBody:
        description: Policy details
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCustomPolicy'
            examples:
              updateCustomPolicyExample:
                $ref: '#/components/examples/UpdateCustomPolicyExample'
      responses:
        '200':
          description: Policy updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomPolicyResponse'
              examples:
                updatePolicyResponse:
                  $ref: '#/components/examples/UpdateCustomPolicyResponseExample'
        '400':
          description: Missing fields, invalid field, or invalid Cedar statement
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PermissionsErrorResponse'
              examples:
                missingFieldsUpdateErrorExample:
                  $ref: '#/components/examples/MissingFieldsErrorExample'
                invalidFieldErrorExample:
                  $ref: '#/components/examples/InvalidFieldErrorExample'
                cedarErrorExample:
                  $ref: '#/components/examples/CedarErrorExample'
        '401':
          description: Authorization required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PermissionsErrorResponse'
              examples:
                authorizationErrorExample:
                  $ref: '#/components/examples/AuthorizationErrorExample'
        '403':
          description: Not allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PermissionsErrorResponse'
              examples:
                authorizationErrorExample:
                  $ref: '#/components/examples/ForbiddenErrorExample'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PermissionsErrorResponse'
              examples:
                policyNotFoundErrorExample:
                  $ref: '#/components/examples/PolicyNotFoundErrorExample'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PermissionsErrorResponse'
              examples:
                customPolicyAlreadyExistsErrorExample:
                  $ref: '#/components/examples/CustomPolicyAlreadyExistsErrorExample'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PermissionsErrorResponse'
              examples:
                internalServerErrorExample:
                  $ref: '#/components/examples/InternalServerErrorExample'
    delete:
      x-speakeasy-group: policies.custom
      x-speakeasy-name-override: delete
      x-speakeasy-mcp:
        name: delete-custom-policy
        scopes:
        - admin
        title: Delete Custom Policy
        destructiveHint: true
        idempotentHint: true
      summary: Delete custom policy
      description: Delete a specific custom policy.
      operationId: deleteCustomPolicy
      tags:
      - Custom Policies
      responses:
        '204':
          description: Successful operation
        '401':
          description: Authorization required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PermissionsErrorResponse'
              examples:
                authorizationErrorExample:
                  $ref: '#/components/examples/AuthorizationErrorExample'
        '403':
          description: Not allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PermissionsErrorResponse'
              examples:
                authorizationErrorExample:
                  $ref: '#/components/examples/ForbiddenErrorExample'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PermissionsErrorResponse'
              examples:
                policyNotFoundErrorExample:
                  $ref: '#/components/examples/PolicyNotFoundErrorExample'
    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:
  examples:
    CreateCustomPolicyResponseExample:
      summary: Custom policy created successfully
      value:
        data:
          id: 12jf789l12hwiuencl7aaqey
          policy_statement: permit(principal == Cloudinary::APIKey::"1234",action==Cloudinary::Action::"read",resource is Cloudinary::Folder ) when {resource.ancestor_ids.contains("asdfjkl12347890")} ;
          description: Permit read access to the Clothing folder with external ID asdfjkl12347890.
          scope_type: prodenv
          scope_id: 975l29lz02jt0836fhwi
          name: Read access to Clothing folder
          enabled: true
          created_at: 1719475216
          updated_at: 1719475216
    CreateCustomPolicyExample:
      summary: Create custom policy example
      value:
        policy_statement: permit(principal == Cloudinary::APIKey::"1234",action==Cloudinary::Action::"read",resource is Cloudinary::Folder ) when {resource.ancestor_ids.contains("asdfjkl12347890")} ;
        description: Permit read access to the Clothing folder with external ID asdfjkl12347890.
        scope_type: prodenv
        scope_id: 975l29lz02jt0836fhwi
        name: Read access to Clothing folder
        enabled: true
    CedarErrorExample:
      summary: Invalid Cedar statement
      value:
        error:
          category: user_error
          code: ACCOUNTS_00002
          message: invalid request
          details:
            fields:
            - policy_statement: permit(principal == Cloudinary::APIKy::"1234", action == Cloudinary::Action::"read", resource is Cloudinary::Folder ) when {resource.ancestor_ids.contains("asdfjkl12347890")} ;
            - cedar_errors:
              - cedar_message: invalid_principal
    MissingFieldsErrorExample:
      summary: Missing fields
      value:
        error:
          category: user_error
          code: ACCOUNTS_00005
          message: missing fields
          details:
            fields:
            - name
    UpdateCustomPolicyResponseExample:
      summary: Custom policy updated successfully
      value:
        data:
          id: 12jf789l12hwiuencl7aaqey
          policy_statement: permit(principal == Cloudinary::APIKey::"1234",action==Cloudinary::Action::"read",resource is Cloudinary::Folder ) when {resource.ancestor_ids.contains("asdfjkl12347890")} ;
          description: Permit read access to the Accessories folder with external ID asdfjkl12347890.
          scope_type: prodenv
          scope_id: 975l29lz02jt0836fhwi
          name: Read access to Accessories folder
          enabled: true
          created_at: 1719475216
          updated_at: 1719475216
    CustomPoliciesExample:
      summary: Custom policies example
      value:
        data:
        - id: 12jf789l12hwiuencl7aaqey
          policy_statement: permit(principal == Cloudinary::APIKey::"1234",action==Cloudinary::Action::"read",resource is Cloudinary::Folder ) when {resource.ancestor_ids.contains("asdfjkl12347890")} ;
          description: Permit read access to the Clothing folder with external ID asdfjkl12347890.
          scope_type: prodenv
          scope_id: 975l29lz02jt0836fhwi
          name: Read access to Clothing folder
          enabled: true
          created_at: 1719475216
          updated_at: 1719475216
        - id: 13890asdhjfqyewiurzbxn273
          policy_statement: permit(principal == Cloudinary::APIKey::"1234",action==Cloudinary::Action::"update",resource is Cloudinary::Folder ) when {resource.ancestor_ids.contains("asdfjkl12347890")} ;
          description: Permit updating the Clothing folder with external ID asdfjkl12347890.
          scope_type: prodenv
          scope_id: 975l29lz02jt0836fhwi
          name: Update access to Clothing folder
          enabled: true
          created_at: 1719475216
          updated_at: 1719475216
    PolicyNotFoundErrorExample:
      summary: Policy not found
      value:
        error:
          category: server_error
          code: ACCOUNTS_00003
          message: not found
          details:
            fields:
            - policy_id: al18owlkth68901
    ForbiddenErrorExample:
      summary: Not allowed
      value:
        error:
          category: user_error
          code: ACCOUNTS_00006
          message: not allowed
    UpdateCustomPolicyExample:
      summary: Update custom policy example
      value:
        policy_statement: permit(principal == Cloudinary::APIKey::"1234",action==Cloudinary::Action::"read",resource is Cloudinary::Folder ) when {resource.ancestor_ids.contains("asdfjkl12347890")} ;
        description: Permit read access to the Accessories folder with external ID asdfjkl12347890.
        scope_type: prodenv
        scope_id: 975l29lz02jt0836fhwi
        name: Read access to Accessories folder
        enabled: true
    CustomPolicyExample:
      summary: Custom policy example
      value:
        data:
          id: 12jf789l12hwiuencl7aaqey
          policy_statement: permit(principal == Cloudinary::APIKey::"1234",action==Cloudinary::Action::"read",resource is Cloudinary::Folder ) when {resource.ancestor_ids.contains("asdfjkl12347890")} ;
          description: Permit read access to the Clothing folder with external ID asdfjkl12347890.
          scope_type: prodenv
          scope_id: 975l29lz02jt0836fhwi
          name: Read access to Clothing folder
          enabled: true
          created_at: 1719475216
          updated_at: 1719475216
    AuthorizationErrorExample:
      summary: Authorization required
      value:
        error:
          category: user_error
          code: ACCOUNTS_00006
          message: invalid credentials
    InvalidFieldErrorExample:
      summary: Invalid field
      value:
        error:
          category: user_error
          code: ACCOUNTS_00005
          message: invalid request
          details:
            fields:
            - scope_type: account
    InternalServerErrorExample:
      summary: Internal server error
      value:
        error:
          category: server_error
          code: ACCOUNTS_00001
          message: something went wrong
    CustomPolicyAlreadyExistsErrorExample:
      summary: Already exists for the scope
      value:
        error:
          category: user_error
          code: ACCOUNTS_00006
          message: already exists for the scope
          details:
            fields:
            - policy_statement: permit(principal == Cloudinary::APIKey::"1234", action == Cloudinary::Action::"read", resource is Cloudinary::Folder ) when {resource.ancestor_ids.contains("asdfjkl12347890")} ;
  schemas:
    PermissionsError:
      type: object
      properties:
        category:
          type: string
          description: A classification of the error, indicating the general area or type of problem.
        code:
          type: string
          description: A specific error code that uniquely identifies the error condition.
        message:
          type: string
          description: A human-readable message providing a brief explanation of the error and its cause.
        details:
          type: object
          description: Additional contextual information about the error, which may include relevant data.
    CreateCustomPolicy:
      $ref: '#/components/schemas/CustomPolicy'
    UpdateCustomPolicy:
      required:
      - enabled
      allOf:
      - $ref: '#/components/schemas/CustomPolicy'
    CustomPoliciesResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/CustomPolicyResponseData'
          description: An array of custom policies.
        next_cursor:
          type: string
          description: When a request has more results to return, the next_cursor value is returned as part of the response. You can then specify this value as the cursor parameter of a following request.
    CustomPolicyResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/CustomPolicyResponseData'
    PermissionsErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/PermissionsError'
    ScopeTypeEnum:
      type: string
      description: Specifies where the role/policy is applied, either at the account level or within product environments.
      enum:
      - account
      - prodenv
      example: prodenv
    CustomPolicy:
      type: object
      required:
      - scope_type
      - policy_statement
      - name
      properties:
        policy_statement:
          description: A Cedar statement that permits or forbids a principal to perform an action on a resource. Refer to the [Permissions API guide](permissions_api_guide) for more information.
          type: string
          example: 'permit(principal == Cloudinary::APIKey::\"1234\",action==Cloudinary::Action::\"read\",resource is Cloudinary::Folder ) when {resource.ancestor_ids.contains(\"asdfjkl12347890\")} ;

            '
        description:
          description: A short description of the policy.
          type:
          - string
          - 'null'
          example: Permit read access to the Clothing folder with external ID asdfjkl12347890.
        scope_type:
          $ref: '#/components/schemas/ScopeTypeEnum'
        scope_id:
          description: 'The ID of a specific product environment, or "all" product environments, where the policy is applied. Required and only relevant if scope_type is "prodenv".

            - <product_environment_id>

            - all

            *Note:* The "all" specification is relevant only when creating or updating a policy.

            '
          type:
          - string
          - 'null'
          example: 975l29lz02jt0836fhwi
        name:
          description: The name assigned to the policy.
          type: string
          example: Read access to Clothing folder
        enabled:
          description: Indicates whether the policy is currently active. Can be "true" (enabled) or "false" (disabled).
          type:
          - boolean
          - 'null'
          example: true
          default: true
    CustomPolicyResponseData:
      type: object
      required:
      - id
      - enabled
      - policy_statement
      - created_at
      - updated_at
      - scope_type
      - name
      properties:
        id:
          description: The unique identifier of the policy.
          type: string
          example: 12jf789l12hwiuencl7aaqey
        policy_statement:
          description: A Cedar policy that permits or forbids a certain action on a certain element to a principal (user, group, or API key).
          type: string
          example: permit(principal == Cloudinary::APIKey::"1234",action==Cloudinary::Action::"read",resource is Cloudinary::Folder ) when {resource.ancestor_ids.contains("asdfjkl12347890")} ;
        description:
          description: A short description of the policy.
          type:
          - string
          - 'null'
          example: Permit read access to the Clothing folder with external ID asdfjkl12347890.
        scope_type:
          $ref: '#/components/schemas/ScopeTypeEnum'
        scope_id:
          description: Returned only if the scope type is product environment. Can be "all" to represent all product environments or an ID of a specific product environment.
          type:
          - string
          - 'null'
          example: 975l29lz02jt0836fhwi
        name:
          description: The name of the policy
          type: string
          example: Read access to Clothing folder
        enabled:
          description: Whether the policy is enabled or not
          type: boolean
          example: true
        created_at:
          description: Creation time of the policy in epoch time.
          type: integer
          format: int64
          example: 1719475216
        updated_at:
          description: Last update time of the policy in epoch time.
          type: integer
          format: int64
          example: 1719475216
    Error:
      type: object
      properties:
        category:
          type: string
          description: A classification of the error, indicating the general area or type of problem.
        code:
          type: string
          description: A specific error code that uniquely identifies the error condition.
        message:
          type: string
          description: A human-readable message providing a brief explanation of the error and its cause.
        details:
          type: object
          description: Additional contextual information about the error, which may include relevant data.
    ErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/Error'
  parameters:
    ScopeTypeParam:
      name: scope_type
      description: Specifies the level for retrieving policies or roles, either at the account level or within product environments.
      in: query
      required: false
      schema:
        $ref: '#/components/schemas/ScopeTypeEnum'
    CursorParam:
      name: cursor
      description: A pagination cursor for fetching subsequent results.
      in: query
      schema:
        type: string
    ScopeIdParam:
      name: scope_id
      description: 'The ID of a specific product environment where the policy is applied. This parameter is only relevant if `scope_type` is "prodenv".

        - <product_environment_id>

        '
      in: query
      required: false
      schema:
        type: string
    PolicyIdParam:
      name: policy_id
      description: A unique identifier for the custom permission policy.
      in: path
      required: true
      schema:
        type: string
    AccountIdParam:
      name: account_id
      description: Account ID
      in: path
      required: true
      schema:
        type: string
      x-speakeasy-globals-hidden: true
    EnabledParam:
      name: enabled
      description: Filter policies by enabled status (true/false).
      in: query
      schema:
        type:
        - boolean
        - 'null'
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
x-refined-from:
- cloudinary-provisioning-schema.yml
- cloudinary-permissions-openapi.yml
- cloudinary-provisioning-openapi.yml