> ## Documentation Index
> Fetch the complete documentation index at: https://api-reference.hyperswitch.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Add Data in Locker

> Add sensitive data in the locker



## OpenAPI

````yaml rust_locker_open_api_spec post /data/add
openapi: 3.0.2
info:
  title: Tartarus - OpenAPI 3.0
  description: >-
    This is the OpenAPI 3.0 specification for the card locker.

    This is used by the [hyperswitch](https://github.com/juspay/hyperswitch) for
    storing card information securely.
  version: '1.0'
servers: []
security: []
tags:
  - name: Key Custodian
    description: API used to initialize the locker after deployment.
  - name: Data
    description: CRUD APIs for working with data to be stored in the locker
  - name: Cards
    description: >-
      CRUD APIs for working with cards data to be stored in the locker
      (deprecated)
paths:
  /data/add:
    post:
      tags:
        - Cards
        - Data
      summary: Add Data in Locker
      description: Add sensitive data in the locker
      parameters:
        - in: header
          name: x-tenant-id
          schema:
            type: string
      requestBody:
        description: The request body might be JWE + JWS encrypted when using middleware
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/StoreDataReq'
                - $ref: '#/components/schemas/JWEReq'
        required: true
      responses:
        '200':
          description: Store Data Response
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/StoreDataRes'
                  - $ref: '#/components/schemas/JWERes'
components:
  schemas:
    StoreDataReq:
      title: StoreDataReq
      type: object
      properties:
        merchant_id:
          type: string
          example: m0100
        merchant_customer_id:
          type: string
          example: HsCustomer1
        requester_card_reference:
          type: string
          example: 3ffdf1e5-7f38-4f26-936f-c66a6f4296fa
        card:
          $ref: '#/components/schemas/Card'
        enc_card_data:
          type: string
          example: qwe4tyusdfg
    JWEReq:
      title: JWEReq
      type: object
      properties:
        header:
          type: string
        iv:
          type: string
        encrypted_payload:
          type: string
        tag:
          type: string
        encrypted_key:
          type: string
    StoreDataRes:
      title: StoreDataRes
      type: object
      description: Response received if the data was stored successfully
      properties:
        status:
          type: string
          enum:
            - Ok
        payload:
          type: object
          properties:
            card_reference:
              type: string
    JWERes:
      title: JWERes
      type: object
      description: JWE encrypted response equivalent
      properties:
        header:
          type: string
        iv:
          type: string
        encrypted_payload:
          type: string
        tag:
          type: string
        encrypted_key:
          type: string
    Card:
      title: Card
      type: object
      required:
        - card_number
      properties:
        card_number:
          type: string
        name_on_card:
          type: string
        card_exp_month:
          type: string
        card_exp_year:
          type: string
        card_brand:
          type: string
        card_isin:
          type: string
        nick_name:
          type: string

````