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

# Delete Deployment

> Soft-delete a deployment. Marks it as deleted and triggers K8s resource cleanup.



## OpenAPI

````yaml https://api.dev-sgp.scale.com/openapi-versions/v5/openapi.json delete /v5/agentex/deployments/{deployment_id}
openapi: 3.1.0
info:
  title: EGP API V5
  description: >-
    This is the parent API for all EGP APIs. If you are looking for the EGP API,
    please go to https://api.egp.scale.com/docs.
  contact:
    name: Scale Generative AI Platform
    url: https://scale.com/genai-platform
  version: 0.1.0
servers:
  - url: https://api.egp.scale.com
security: []
paths:
  /v5/agentex/deployments/{deployment_id}:
    delete:
      tags:
        - Agentex Cloud Deploy
      summary: Delete Deployment
      description: >-
        Soft-delete a deployment. Marks it as deleted and triggers K8s resource
        cleanup.
      operationId: DELETE-V5-/agentex/deployments/deployment_id
      parameters:
        - name: deployment_id
          in: path
          required: true
          schema:
            type: string
            title: Deployment Id
        - name: x-selected-account-id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Account ID Header
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentexCloudDeploy'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    AgentexCloudDeploy:
      properties:
        id:
          type: string
          title: Id
        object:
          type: string
          const: agentex_cloud_deploy
          title: Object
          default: agentex_cloud_deploy
        build_id:
          title: Build Id
          type: string
        namespace:
          type: string
          title: Namespace
        helm_release_name:
          title: Helm Release Name
          type: string
        manifest_file:
          type: string
          title: Manifest File
        environment_config:
          type: string
          title: Environment Config
        status:
          type: string
          title: Status
        account_id:
          type: string
          title: Account Id
        expires_at:
          title: Expires At
          type: string
          format: date-time
        preview_label:
          title: Preview Label
          type: string
        created_at:
          type: string
          format: date-time
          title: Created At
        created_by:
          $ref: '#/components/schemas/Identity'
          description: The identity that created the entity.
        deploy_events:
          items:
            $ref: '#/components/schemas/AgentexCloudDeployEvent'
          type: array
          title: Deploy Events
          description: Kubernetes events for this deployment.
      type: object
      required:
        - id
        - namespace
        - manifest_file
        - environment_config
        - status
        - account_id
        - created_at
        - created_by
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Identity:
      properties:
        id:
          type: string
          title: Id
        object:
          type: string
          const: identity
          title: Object
          default: identity
        type:
          $ref: '#/components/schemas/IdentityType'
      type: object
      required:
        - id
        - type
      title: Identity
    AgentexCloudDeployEvent:
      properties:
        type:
          title: Type
          description: Event type, e.g. 'Normal' or 'Warning'.
          type: string
        reason:
          title: Reason
          description: Short reason, e.g. 'Pulling', 'Scheduled'.
          type: string
        message:
          title: Message
          description: Full event message.
          type: string
        timestamp:
          title: Timestamp
          description: When the event was observed.
          type: string
          format: date-time
      type: object
      title: AgentexCloudDeployEvent
      description: Slim event representation for the API response.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          title: Error Type
          type: string
        input:
          title: Input
        ctx:
          type: object
          title: Context
          additionalProperties: true
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    IdentityType:
      type: string
      enum:
        - user
        - service_account
      title: IdentityType
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````