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

# Set seller body encryption keys

> Stores the seller's public-only P-256 JSON Web Key Set and active key id used by buyers to encrypt request bodies end to end. Replaces any existing configuration.



## OpenAPI

````yaml https://api.zeroclick.io/openapi.json put /v1/sellers/{sellerId}/body-encryption
openapi: 3.0.0
info:
  title: ZeroClick API
  description: >-
    REST API for managing ZeroClick sellers, services, pricing, usage, and
    analytics. Authenticate with an API key from the ZeroClick dashboard.
  version: 1.0.0
servers:
  - url: https://api.zeroclick.io
security:
  - bearerAuth: []
tags:
  - name: API keys
  - name: Sellers
  - name: Services
  - name: Meters
  - name: Plans
  - name: Plan meter prices
  - name: Usage
  - name: Analytics
  - name: Stripe Connect
  - name: Sandbox
  - name: Organizations
  - name: Users
paths:
  /v1/sellers/{sellerId}/body-encryption:
    put:
      tags:
        - Sellers
      summary: Set seller body encryption keys
      description: >-
        Stores the seller's public-only P-256 JSON Web Key Set and active key id
        used by buyers to encrypt request bodies end to end. Replaces any
        existing configuration.
      parameters:
        - schema:
            type: string
            minLength: 1
          in: path
          name: sellerId
          required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                jwks:
                  type: object
                  properties:
                    keys:
                      minItems: 1
                      maxItems: 10
                      type: array
                      items:
                        type: object
                        properties:
                          kty:
                            type: string
                            enum:
                              - EC
                          crv:
                            type: string
                            enum:
                              - P-256
                          kid:
                            type: string
                            minLength: 1
                            maxLength: 128
                          x:
                            type: string
                            pattern: ^[A-Za-z0-9_-]{43}$
                          'y':
                            type: string
                            pattern: ^[A-Za-z0-9_-]{43}$
                          use:
                            type: string
                            enum:
                              - enc
                          alg:
                            type: string
                            enum:
                              - ECDH-ES+A256KW
                        required:
                          - kty
                          - crv
                          - kid
                          - x
                          - 'y'
                        additionalProperties: false
                  required:
                    - keys
                activeKid:
                  type: string
                  minLength: 1
                  maxLength: 128
              required:
                - jwks
                - activeKid
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  bodyEncryption:
                    type: object
                    properties:
                      id:
                        type: string
                      jwks:
                        type: object
                        properties:
                          keys:
                            minItems: 1
                            maxItems: 10
                            type: array
                            items:
                              type: object
                              properties:
                                kty:
                                  type: string
                                  enum:
                                    - EC
                                crv:
                                  type: string
                                  enum:
                                    - P-256
                                kid:
                                  type: string
                                  minLength: 1
                                  maxLength: 128
                                x:
                                  type: string
                                  pattern: ^[A-Za-z0-9_-]{43}$
                                'y':
                                  type: string
                                  pattern: ^[A-Za-z0-9_-]{43}$
                                use:
                                  type: string
                                  enum:
                                    - enc
                                alg:
                                  type: string
                                  enum:
                                    - ECDH-ES+A256KW
                              required:
                                - kty
                                - crv
                                - kid
                                - x
                                - 'y'
                              additionalProperties: false
                        required:
                          - keys
                        additionalProperties: false
                      activeKid:
                        type: string
                      createdAt:
                        type: string
                      updatedAt:
                        type: string
                    required:
                      - id
                      - jwks
                      - activeKid
                      - createdAt
                      - updatedAt
                    additionalProperties: false
                required:
                  - bodyEncryption
                additionalProperties: false
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                      - organization_required
                      - organization_permission_required
                      - seller_not_found
                      - service_not_found
                      - meter_not_found
                      - plan_not_found
                      - plan_meter_price_not_found
                      - duplicate_slug
                      - duplicate_key
                      - duplicate_plan_meter_price
                      - signing_secret_not_found
                      - insufficient_scope
                      - payg_price_not_whole_cents
                      - custom_domain_skip_unavailable
                      - active_stateful_accounts_exist
                required:
                  - error
                additionalProperties: false
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                      - organization_required
                      - organization_permission_required
                      - seller_not_found
                      - service_not_found
                      - meter_not_found
                      - plan_not_found
                      - plan_meter_price_not_found
                      - duplicate_slug
                      - duplicate_key
                      - duplicate_plan_meter_price
                      - signing_secret_not_found
                      - insufficient_scope
                      - payg_price_not_whole_cents
                      - custom_domain_skip_unavailable
                      - active_stateful_accounts_exist
                required:
                  - error
                additionalProperties: false
        '409':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                      - organization_required
                      - organization_permission_required
                      - seller_not_found
                      - service_not_found
                      - meter_not_found
                      - plan_not_found
                      - plan_meter_price_not_found
                      - duplicate_slug
                      - duplicate_key
                      - duplicate_plan_meter_price
                      - signing_secret_not_found
                      - insufficient_scope
                      - payg_price_not_whole_cents
                      - custom_domain_skip_unavailable
                      - active_stateful_accounts_exist
                required:
                  - error
                additionalProperties: false
        '422':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                      - organization_required
                      - organization_permission_required
                      - seller_not_found
                      - service_not_found
                      - meter_not_found
                      - plan_not_found
                      - plan_meter_price_not_found
                      - duplicate_slug
                      - duplicate_key
                      - duplicate_plan_meter_price
                      - signing_secret_not_found
                      - insufficient_scope
                      - payg_price_not_whole_cents
                      - custom_domain_skip_unavailable
                      - active_stateful_accounts_exist
                required:
                  - error
                additionalProperties: false
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key created in the ZeroClick dashboard under Settings → API keys.
        Keys start with `zc_`. Send them as `Authorization: Bearer zc_...`.

````