> ## 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.

# Decrypt

> Decrypt data using ECDH key exchange.

## Used in

* [Receive and decrypt records as a HIU](https://developer.eka.care/docs/hie-cm/workflows/hiu-receive-data.md)


## OpenAPI

````yaml api-reference/user-app/abdm-connect/registration.yml POST /abdm/v1/ecdh/decrypt
openapi: 3.1.0
info:
  description: >-
    ABHA identity, care context linking, consent, HPR/HFR, UHI and
    scan-and-share APIs, with the webhook events Eka sends.
  title: ABDM Connect
  version: 1.0.0
servers:
  - description: Production
    url: https://api.eka.care
  - description: Stage/Sandbox
    url: https://api.dev.eka.care
security: []
paths:
  /abdm/v1/ecdh/decrypt:
    post:
      tags:
        - Care Contexts
      summary: Decrypt
      description: Decrypt data using ECDH key exchange.
      operationId: decrypt
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ModelsDecryptPayload'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelsDecryptResponse'
          description: OK
        4XX:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericError'
          description: ''
        5XX:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericError'
          description: ''
      security:
        - authApiKey: []
components:
  schemas:
    ModelsDecryptPayload:
      properties:
        encrypted_data:
          description: Base64-encoded encrypted data to decrypt
          type: string
        receiver_nonce:
          description: Nonce associated with the receiver's key pair
          type: string
        receiver_private_key:
          description: Base64-encoded private key of the receiver
          type: string
        sender_nonce:
          description: Nonce associated with the sender's key pair
          type: string
        sender_public_key:
          description: Base64-encoded public key of the sender
          type: string
      type: object
    ModelsDecryptResponse:
      properties:
        decrypted_data:
          description: Decrypted plaintext data
          type: string
      type: object
    GenericError:
      properties:
        code:
          type: integer
        error:
          type: string
        source_error:
          $ref: '#/components/schemas/SourceErr'
      type: object
    SourceErr:
      properties:
        code:
          type: string
        message:
          type: string
      type: object
  securitySchemes:
    authApiKey:
      description: The API requires a Bearer token (JWT) for authentication.
      scheme: bearer
      type: http

````

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