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

# Archive or permanently delete patient profile

> By default, the patient profile is **archived** (soft delete). Archived profiles can still be retrieved using the `arc=true` query parameter in the retrieve API.

To **permanently delete** an already archived profile, set the `perm=true` query parameter. Permanent deletion is only allowed on profiles that have already been archived.




## OpenAPI

````yaml delete /profiles/v1/patient/{oid}
openapi: 3.0.3
info:
  title: Patient APIs
  description: Patient Directory CRUD
  version: 1.0.0
servers:
  - url: https://api.eka.care
security: []
paths:
  /profiles/v1/patient/{oid}:
    delete:
      tags:
        - Patient
      summary: Archive or permanently delete patient profile
      description: >
        By default, the patient profile is **archived** (soft delete). Archived
        profiles can still be retrieved using the `arc=true` query parameter in
        the retrieve API.


        To **permanently delete** an already archived profile, set the
        `perm=true` query parameter. Permanent deletion is only allowed on
        profiles that have already been archived.
      parameters:
        - in: header
          name: client-id
          required: true
          schema:
            type: string
            example: EC_1431
        - in: path
          name: oid
          required: true
          schema:
            type: string
            example: 18661861868168
        - in: query
          name: arc
          required: false
          schema:
            type: boolean
            example: true
            default: false
        - in: query
          name: perm
          required: false
          description: >
            Permanently delete an archived profile. The profile must already be
            archived for this to take effect.
          schema:
            type: boolean
            example: true
            default: false
      responses:
        '200':
          description: Patient profile archived or permanently deleted successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Profile archived successfully
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/404Error'
      security:
        - bearerAuth: []
components:
  schemas:
    404Error:
      type: object
      properties:
        message:
          type: string
          example: Not found
        code:
          type: string
          example: profile_not_found
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.