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

# Delete Assignments

> Delete every assignment in `assignmentIds` outright — the rows are removed.

The escape hatch for a membership created by mistake. To take a node off a
cluster and keep the record, use ``/nodes/detach``, which ends the assignment
and leaves it as history. The node and cluster rows are untouched, and the
audit entry keeps a snapshot of what was removed.

A caller that picked these rows by status should send ``expectedStatuses``:
it is rechecked under the row lock, so a membership taken live since the
caller read it is refused rather than deleted.



## OpenAPI

````yaml https://api.primeintellect.ai/openapi.json post /api/admin/inventory/assignments/bulk-delete
openapi: 3.1.0
info:
  title: PI API
  version: 0.1.0
servers:
  - url: https://api.primeintellect.ai
security: []
paths:
  /api/admin/inventory/assignments/bulk-delete:
    post:
      tags:
        - admin-inventory
      summary: Delete Assignments
      description: >-
        Delete every assignment in `assignmentIds` outright — the rows are
        removed.


        The escape hatch for a membership created by mistake. To take a node off
        a

        cluster and keep the record, use ``/nodes/detach``, which ends the
        assignment

        and leaves it as history. The node and cluster rows are untouched, and
        the

        audit entry keeps a snapshot of what was removed.


        A caller that picked these rows by status should send
        ``expectedStatuses``:

        it is rechecked under the row lock, so a membership taken live since the

        caller read it is refused rather than deleted.
      operationId: delete_assignments_api_admin_inventory_assignments_bulk_delete_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkAssignmentDeleteRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericResponse_MutationResult_'
        '401':
          description: Authorization failed
        '403':
          description: Insufficient permissions
        '422':
          description: Invalid request data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - HTTPBearer: []
components:
  schemas:
    BulkAssignmentDeleteRequest:
      properties:
        assignmentIds:
          items:
            type: string
          type: array
          maxItems: 1000
          title: Assignmentids
        expectedStatuses:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Expectedstatuses
      type: object
      required:
        - assignmentIds
      title: BulkAssignmentDeleteRequest
    GenericResponse_MutationResult_:
      properties:
        data:
          anyOf:
            - $ref: '#/components/schemas/MutationResult'
            - type: 'null'
          description: Response data
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
          description: Response status
      type: object
      title: GenericResponse[MutationResult]
    ErrorResponse:
      properties:
        errors:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
          title: Errors
      type: object
      required:
        - errors
      title: ErrorResponse
    MutationResult:
      properties:
        operationId:
          type: string
          title: Operationid
        targetId:
          anyOf:
            - type: string
            - type: 'null'
          title: Targetid
        targetName:
          anyOf:
            - type: string
            - type: 'null'
          title: Targetname
        message:
          type: string
          title: Message
        created:
          anyOf:
            - type: integer
            - type: 'null'
          title: Created
        updated:
          anyOf:
            - type: integer
            - type: 'null'
          title: Updated
        assigned:
          anyOf:
            - type: integer
            - type: 'null'
          title: Assigned
        detached:
          anyOf:
            - type: integer
            - type: 'null'
          title: Detached
        retired:
          anyOf:
            - type: integer
            - type: 'null'
          title: Retired
      type: object
      required:
        - operationId
        - message
      title: MutationResult
    ErrorDetail:
      properties:
        param:
          type: string
          title: Param
        details:
          type: string
          title: Details
      type: object
      required:
        - param
        - details
      title: ErrorDetail
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````