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

# Decrypt data



## OpenAPI

````yaml /openapi/v2.yaml post /decrypt
openapi: 3.0.0
info:
  title: Qanapi API v2
  version: 2.0.0
  description: Qanapi API version 2
servers:
  - url: https://{subdomain}.qanapi.cloud/api/v2
    description: The Qanapi API server
    variables:
      subdomain:
        default: ''
        description: Customer-specific subdomain.
security:
  - ApiKey: []
    BearerAuth: []
paths:
  /decrypt:
    post:
      summary: Decrypt data
      operationId: postV2Decrypt
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
            example:
              name: John Smith
              email: john@example.com
              ssn: >-
                qanapi:MQ:MDFreWVwc2hkMjE2d2N2dHlyZ3NtbXR0M2M:Un9XLlZVXEhQVK/+MiOAiw:$
              dob: >-
                qanapi:MQ:MDFreWVwc2hkOTUwMTkwejUya3I5eHM4OGI:F9ArUSbZ9qrfjX7zN+Fk/Q:$
              address: 123 Main St
      responses:
        '200':
          description: Decrypted data
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
              example:
                name: John Smith
                email: john@example.com
                ssn: 123-45-6789
                dob: '1980-01-01'
                address: 123 Main St
        '400':
          description: Unable to process encrypted data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                cannotDecrypt:
                  summary: You are not authorized to decrypt this content
                  value:
                    message: You are not authorized to decrypt this content
                forbidden:
                  $ref: '#/components/examples/forbidden'
        '404':
          description: Encryption metadata not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Decryption failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
  responses:
    UnauthorizedError:
      description: Unauthorized - Invalid API Key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            unauthorized:
              $ref: '#/components/examples/unauthorized'
  examples:
    forbidden:
      value:
        message: This action is unauthorized.
    unauthorized:
      value:
        message: Unauthenticated.
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-Qanapi-Authorization
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````