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

# Encrypt data



## OpenAPI

````yaml /openapi/v2.yaml post /encrypt
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:
  /encrypt:
    post:
      summary: Encrypt data
      operationId: postV2Encrypt
      requestBody:
        required: true
        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
      responses:
        '200':
          description: Encrypted data
          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
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
components:
  responses:
    UnauthorizedError:
      description: Unauthorized - Invalid API Key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            unauthorized:
              $ref: '#/components/examples/unauthorized'
    ForbiddenError:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            forbidden:
              $ref: '#/components/examples/forbidden'
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
  examples:
    unauthorized:
      value:
        message: Unauthenticated.
    forbidden:
      value:
        message: This action is unauthorized.
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-Qanapi-Authorization
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````