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

# Lock deletion

> Protect a connector from deletion

While locked, [delete](/api/connectors/delete) refuses with `409` until the lock is removed. Use it to protect production sources from accidental cleanup.


## OpenAPI

````yaml openapi.public.json POST /v1/connectors/{connector_id}/deletion-lock
openapi: 3.1.0
info:
  description: >-
    Public Ardent API. Generated by scripts/export_public_openapi.py — do not
    edit by hand.
  title: Ardent API
  version: v1
servers:
  - url: https://api.tryardent.com
security: []
paths:
  /v1/connectors/{connector_id}/deletion-lock:
    post:
      tags:
        - v1-connectors
      summary: Lock Connector Deletion Endpoint
      operationId: >-
        lock_connector_deletion_endpoint_v1_connectors__connector_id__deletion_lock_post
      parameters:
        - in: path
          name: connector_id
          required: true
          schema:
            title: Connector Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConnectorDeletionLockRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectorEnvelope'
          description: The locked connector.
        '403':
          description: No update permission on this connector.
        '404':
          description: Connector not found (or not visible to the caller).
        '409':
          description: A delete is already in progress.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - bearerAuth: []
components:
  schemas:
    ConnectorDeletionLockRequest:
      properties:
        reason:
          anyOf:
            - maxLength: 500
              type: string
            - type: 'null'
          description: Why the connector is locked, up to 500 characters.
          title: Reason
      title: ConnectorDeletionLockRequest
      type: object
    ConnectorEnvelope:
      properties:
        connector:
          $ref: '#/components/schemas/ConnectorRow'
          description: The connector's current row.
      required:
        - connector
      title: ConnectorEnvelope
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ConnectorRow:
      additionalProperties: true
      properties:
        can_delete:
          anyOf:
            - type: boolean
            - type: 'null'
          description: Whether the caller may delete this connector.
          title: Can Delete
        can_update:
          anyOf:
            - type: boolean
            - type: 'null'
          description: Whether the caller may update this connector.
          title: Can Update
        created_at:
          anyOf:
            - type: string
            - type: 'null'
          description: When the connector was created.
          title: Created At
        id:
          description: Connector ID.
          title: Id
          type: string
        name:
          description: Connector name.
          title: Name
          type: string
        org_id:
          description: Organization the connector belongs to.
          title: Org Id
          type: string
        project_id:
          anyOf:
            - type: string
            - type: 'null'
          description: Project the connector belongs to.
          title: Project Id
        service_name:
          description: Service type. `postgresql` today.
          title: Service Name
          type: string
        status:
          anyOf:
            - type: string
            - type: 'null'
          description: Current connector status.
          title: Status
      required:
        - id
        - org_id
        - name
        - service_name
      title: ConnectorRow
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    bearerAuth:
      description: >-
        Ardent API key (sk-ard_live_… / sk-ard_test_…) or a dashboard session
        token.
      scheme: bearer
      type: http

````