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

# Create My Key

> Genera una chiave pubblicabile. Il valore in chiaro torna UNA volta.



## OpenAPI

````yaml https://api.vellaro.io/openapi.json post /api/v1/admin/api-keys
openapi: 3.1.0
info:
  title: Vellaro API
  description: Vellaro 2026 — E-commerce API
  version: 0.1.0
servers:
  - url: https://api.vellaro.io
    description: Produzione
security: []
tags: []
paths:
  /api/v1/admin/api-keys:
    post:
      tags:
        - admin:api-keys
      summary: Create My Key
      description: Genera una chiave pubblicabile. Il valore in chiaro torna UNA volta.
      operationId: create_my_key_api_v1_admin_api_keys_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdminApiKeyCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_ApiKeyCreateOut_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    AdminApiKeyCreate:
      properties:
        label:
          anyOf:
            - type: string
              maxLength: 120
            - type: 'null'
          title: Label
        client_type:
          $ref: '#/components/schemas/ApiKeyClientType'
          default: web
        environment:
          $ref: '#/components/schemas/ApiKeyEnvironment'
          default: live
        allowed_origins:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Allowed Origins
        expires_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Expires At
      type: object
      title: AdminApiKeyCreate
      description: >-
        Input volutamente ridotto: niente scope, niente rate limit.


        Quello che il negozio decide è a cosa serve la chiave (etichetta), per

        quale client, in quale ambiente e — solo per il web — da quali domini
        può

        partire. Tutto il resto è politica di piattaforma.
    ApiResponse_ApiKeyCreateOut_:
      properties:
        data:
          anyOf:
            - $ref: '#/components/schemas/ApiKeyCreateOut'
            - type: 'null'
        meta:
          anyOf:
            - $ref: '#/components/schemas/PaginationMeta'
            - type: 'null'
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Code
      type: object
      title: ApiResponse[ApiKeyCreateOut]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ApiKeyClientType:
      type: string
      enum:
        - web
        - mobile
        - server
        - partner
        - dev
      title: ApiKeyClientType
    ApiKeyEnvironment:
      type: string
      enum:
        - live
        - test
      title: ApiKeyEnvironment
    ApiKeyCreateOut:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        tenant_id:
          type: string
          format: uuid
          title: Tenant Id
        key_prefix:
          type: string
          title: Key Prefix
        last4:
          type: string
          title: Last4
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
        client_type:
          type: string
          title: Client Type
        environment:
          type: string
          title: Environment
        allowed_origins:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Allowed Origins
        scopes:
          items:
            type: string
          type: array
          title: Scopes
        rate_limit_rpm:
          anyOf:
            - type: integer
            - type: 'null'
          title: Rate Limit Rpm
        is_active:
          type: boolean
          title: Is Active
        expires_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Expires At
        last_used_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Used At
        notes:
          anyOf:
            - type: string
            - type: 'null'
          title: Notes
        created_at:
          type: string
          format: date-time
          title: Created At
        revoked_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Revoked At
        plaintext:
          type: string
          title: Plaintext
          description: Plaintext key — shown once. Save it now.
      type: object
      required:
        - id
        - tenant_id
        - key_prefix
        - last4
        - label
        - client_type
        - environment
        - allowed_origins
        - scopes
        - rate_limit_rpm
        - is_active
        - expires_at
        - last_used_at
        - notes
        - created_at
        - revoked_at
        - plaintext
      title: ApiKeyCreateOut
    PaginationMeta:
      properties:
        page:
          type: integer
          title: Page
        page_size:
          type: integer
          title: Page Size
        total:
          type: integer
          title: Total
        total_pages:
          type: integer
          title: Total Pages
      type: object
      required:
        - page
        - page_size
        - total
        - total_pages
      title: PaginationMeta
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````

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