> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blaxel.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete governance policy

> Permanently deletes a governance policy. Resources using this policy will need to be updated to use a different policy.



## OpenAPI

````yaml /api-reference/controlplane.yml delete /policies/{policyName}
openapi: 3.0.3
info:
  title: Blaxel Control Plane
  version: 0.0.1
servers:
  - description: Blaxel Control Plane
    url: https://api.blaxel.ai/v0
  - description: Blaxel Inference
    url: https://run.blaxel.ai
security:
  - OAuth2:
      - admin
  - ApiKeyAuth: []
paths:
  /policies/{policyName}:
    parameters:
      - description: Unique name identifier of the policy
        in: path
        name: policyName
        required: true
        schema:
          type: string
    delete:
      tags:
        - policies
      summary: Delete governance policy
      description: >-
        Permanently deletes a governance policy. Resources using this policy
        will need to be updated to use a different policy.
      operationId: DeletePolicy
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Policy'
          description: successful operation
      security:
        - OAuth2:
            - policies:delete
        - ApiKeyAuth: []
components:
  schemas:
    Policy:
      type: object
      description: >-
        Rule that controls how a deployment is made and served (e.g. location
        restrictions)
      properties:
        metadata:
          $ref: '#/components/schemas/Metadata'
        spec:
          $ref: '#/components/schemas/PolicySpec'
      required:
        - metadata
        - spec
    Metadata:
      type: object
      description: >-
        Common metadata fields shared by all Blaxel resources including name,
        labels, timestamps, and ownership information
      allOf:
        - $ref: '#/components/schemas/TimeFields'
        - $ref: '#/components/schemas/OwnerFields'
        - properties:
            displayName:
              type: string
              description: >-
                Human-readable name for display in the UI. Can contain spaces
                and special characters, max 63 characters.
              example: My Resource
            labels:
              $ref: '#/components/schemas/MetadataLabels'
            name:
              type: string
              description: >-
                Unique identifier for the resource within the workspace. Must be
                lowercase alphanumeric with hyphens, max 49 characters.
                Immutable after creation.
              example: my-resource
            plan:
              type: string
              description: >-
                Billing plan tier applied to this resource (inherited from
                workspace account)
              readOnly: true
            url:
              type: string
              description: >-
                Auto-generated endpoint URL for accessing this resource (for
                agents, functions, models, sandboxes)
              readOnly: true
            workspace:
              type: string
              description: >-
                Name of the workspace this resource belongs to (read-only, set
                automatically)
              readOnly: true
          required:
            - name
    PolicySpec:
      type: object
      description: Policy specification
      properties:
        flavors:
          $ref: '#/components/schemas/Flavors'
        locations:
          $ref: '#/components/schemas/PolicyLocations'
        maxTokens:
          $ref: '#/components/schemas/PolicyMaxTokens'
        resourceTypes:
          $ref: '#/components/schemas/PolicyResourceTypes'
        sandbox:
          type: boolean
          description: Sandbox mode
          example: false
        type:
          type: string
          description: Policy type, can be location or flavor
          enum:
            - location
            - flavor
            - maxToken
          example: location
    TimeFields:
      type: object
      description: Time fields for Persistance
      properties:
        createdAt:
          type: string
          description: The date and time when the resource was created
          readOnly: true
        updatedAt:
          type: string
          description: The date and time when the resource was updated
          readOnly: true
    OwnerFields:
      type: object
      description: Owner fields for Persistance
      properties:
        createdBy:
          type: string
          description: The user or service account who created the resource
          readOnly: true
        updatedBy:
          type: string
          description: The user or service account who updated the resource
          readOnly: true
    MetadataLabels:
      type: object
      description: >-
        Key-value pairs for organizing and filtering resources. Labels can be
        used to categorize resources by environment, project, team, or any
        custom taxonomy.
      additionalProperties:
        type: string
    Flavors:
      type: array
      description: Types of hardware available for deployments
      items:
        $ref: '#/components/schemas/Flavor'
    PolicyLocations:
      type: array
      description: PolicyLocations is a local type that wraps a slice of Location
      items:
        $ref: '#/components/schemas/PolicyLocation'
    PolicyMaxTokens:
      type: object
      description: PolicyMaxTokens is a local type that wraps a slice of PolicyMaxTokens
      properties:
        granularity:
          type: string
          description: Granularity
          example: minute
        input:
          type: integer
          description: Input
          example: 10000
        output:
          type: integer
          description: Output
          example: 5000
        ratioInputOverOutput:
          type: integer
          description: RatioInputOverOutput
          example: 2
        step:
          type: integer
          description: Step
          example: 1
        total:
          type: integer
          description: Total
          example: 15000
    PolicyResourceTypes:
      type: array
      description: >-
        PolicyResourceTypes is a local type that wraps a slice of
        PolicyResourceType
      items:
        $ref: '#/components/schemas/PolicyResourceType'
    Flavor:
      type: object
      description: A type of hardware available for deployments
      properties:
        name:
          type: string
          description: Flavor name (e.g. t4)
          example: t4
        type:
          type: string
          description: Flavor type (e.g. cpu, gpu)
          enum:
            - cpu
            - gpu
          example: cpu
    PolicyLocation:
      type: object
      description: Policy location
      properties:
        name:
          type: string
          description: Policy location name
          example: EU
        type:
          type: string
          description: Policy location type
          enum:
            - location
            - country
            - continent
          example: continent
    PolicyResourceType:
      type: string
      description: PolicyResourceType is a type of resource, e.g. model, function, etc.
      enum:
        - model
        - function
        - agent
        - sandbox
  securitySchemes:
    OAuth2:
      description: OAuth2 authentication with JWT tokens
      flows:
        authorizationCode:
          authorizationUrl: /oauth/authorize
          scopes:
            admin: Administrative access
            agents:create: Create agents
            agents:delete: Delete agents
            agents:get: Get agent details
            agents:list: List agents
            agents:update: Update agents
            apiKey:list: List API keys
            apiKey:write: Create and delete API keys
            configurations:list: List configurations
            customdomains:create: Create custom domains
            customdomains:delete: Delete custom domains
            customdomains:get: Get custom domain details
            customdomains:list: List custom domains
            customdomains:update: Update custom domains
            functions:create: Create functions
            functions:delete: Delete functions
            functions:get: Get function details
            functions:list: List functions
            functions:update: Update functions
            integrations:create: Create integrations
            integrations:list: List integrations
            invitations:list: List invitations
            jobs:create: Create jobs
            jobs:delete: Delete jobs
            jobs:get: Get job details
            jobs:list: List jobs
            jobs:update: Update jobs
            locations:list: List locations
            mcphub:list: List MCP hub resources
            models:create: Create models
            models:delete: Delete models
            models:get: Get model details
            models:list: List models
            models:update: Update models
            policies:create: Create policies
            policies:delete: Delete policies
            policies:get: Get policy details
            policies:list: List policies
            policies:update: Update policies
            sandboxes:control: Control sandbox operations
            sandboxes:create: Create sandboxes
            sandboxes:delete: Delete sandboxes
            sandboxes:get: Get sandbox details
            sandboxes:list: List sandboxes
            sandboxes:update: Update sandboxes
            sandboxhub:list: List sandbox hub resources
            templates:get: Get template details
            templates:list: List templates
            volumeTemplates:create: Create volume templates
            volumeTemplates:delete: Delete volume templates
            volumeTemplates:get: Get volume template details
            volumeTemplates:list: List volume templates
            volumeTemplates:upsert: Create or update volume templates
            volumes:create: Create volumes
            volumes:delete: Delete volumes
            volumes:get: Get volume details
            volumes:list: List volumes
            workspaces:accept: Accept workspace invitation
            workspaces:create: Create workspaces
            workspaces:decline: Decline workspace invitation
            workspaces:delete: Delete workspaces
            workspaces:get: Get workspace details
            workspaces:invite: Invite users to workspace
            workspaces:leave: Leave workspace
            workspaces:list: List workspaces
            workspaces:remove: Remove users from workspace
            workspaces:update: Update workspaces
          tokenUrl: /oauth/token
        clientCredentials:
          scopes:
            admin: Administrative access
            agents:create: Create agents
            agents:delete: Delete agents
            agents:get: Get agent details
            agents:list: List agents
            agents:update: Update agents
            apiKey:list: List API keys
            apiKey:write: Create and delete API keys
            configurations:list: List configurations
            customdomains:create: Create custom domains
            customdomains:delete: Delete custom domains
            customdomains:get: Get custom domain details
            customdomains:list: List custom domains
            customdomains:update: Update custom domains
            functions:create: Create functions
            functions:delete: Delete functions
            functions:get: Get function details
            functions:list: List functions
            functions:update: Update functions
            integrations:create: Create integrations
            integrations:list: List integrations
            invitations:list: List invitations
            jobs:create: Create jobs
            jobs:delete: Delete jobs
            jobs:get: Get job details
            jobs:list: List jobs
            jobs:update: Update jobs
            locations:list: List locations
            mcphub:list: List MCP hub resources
            models:create: Create models
            models:delete: Delete models
            models:get: Get model details
            models:list: List models
            models:update: Update models
            policies:create: Create policies
            policies:delete: Delete policies
            policies:get: Get policy details
            policies:list: List policies
            policies:update: Update policies
            sandboxes:control: Control sandbox operations
            sandboxes:create: Create sandboxes
            sandboxes:delete: Delete sandboxes
            sandboxes:get: Get sandbox details
            sandboxes:list: List sandboxes
            sandboxes:update: Update sandboxes
            sandboxhub:list: List sandbox hub resources
            templates:get: Get template details
            templates:list: List templates
            volumeTemplates:create: Create volume templates
            volumeTemplates:delete: Delete volume templates
            volumeTemplates:get: Get volume template details
            volumeTemplates:list: List volume templates
            volumeTemplates:upsert: Create or update volume templates
            volumes:create: Create volumes
            volumes:delete: Delete volumes
            volumes:get: Get volume details
            volumes:list: List volumes
            workspaces:accept: Accept workspace invitation
            workspaces:create: Create workspaces
            workspaces:decline: Decline workspace invitation
            workspaces:delete: Delete workspaces
            workspaces:get: Get workspace details
            workspaces:invite: Invite users to workspace
            workspaces:leave: Leave workspace
            workspaces:list: List workspaces
            workspaces:remove: Remove users from workspace
            workspaces:update: Update workspaces
          tokenUrl: /oauth/token
      type: oauth2
    ApiKeyAuth:
      bearerFormat: API Key
      description: Long-lived API key for programmatic access
      scheme: bearer
      type: http

````