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

# Upsert Override

> Create or replace the tenant's override for `(key, locale)`.

Rejects unknown keys, non-editable keys, unsupported locales, and Jinja
syntax errors (422) before writing. tenant_id is set explicitly.



## OpenAPI

````yaml https://api.vellaro.io/openapi.json put /api/v1/admin/email-templates/{key}/{locale}
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/email-templates/{key}/{locale}:
    put:
      tags:
        - admin:email-templates
      summary: Upsert Override
      description: |-
        Create or replace the tenant's override for `(key, locale)`.

        Rejects unknown keys, non-editable keys, unsupported locales, and Jinja
        syntax errors (422) before writing. tenant_id is set explicitly.
      operationId: upsert_override_api_v1_admin_email_templates__key___locale__put
      parameters:
        - name: key
          in: path
          required: true
          schema:
            type: string
            title: Key
        - name: locale
          in: path
          required: true
          schema:
            type: string
            title: Locale
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpsertIn'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_LocaleState_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    UpsertIn:
      properties:
        subject:
          type: string
          maxLength: 500
          minLength: 1
          title: Subject
        body_html:
          type: string
          minLength: 1
          title: Body Html
        body_text:
          anyOf:
            - type: string
            - type: 'null'
          title: Body Text
      type: object
      required:
        - subject
        - body_html
      title: UpsertIn
    ApiResponse_LocaleState_:
      properties:
        data:
          anyOf:
            - $ref: '#/components/schemas/LocaleState'
            - 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[LocaleState]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    LocaleState:
      properties:
        locale:
          type: string
          title: Locale
        default:
          anyOf:
            - $ref: '#/components/schemas/TemplateSource'
            - type: 'null'
        override:
          anyOf:
            - $ref: '#/components/schemas/TemplateSource'
            - type: 'null'
        is_override:
          type: boolean
          title: Is Override
        updated_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Updated At
      type: object
      required:
        - locale
        - default
        - override
        - is_override
      title: LocaleState
    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
    TemplateSource:
      properties:
        subject:
          type: string
          title: Subject
        body_html:
          type: string
          title: Body Html
        body_text:
          anyOf:
            - type: string
            - type: 'null'
          title: Body Text
      type: object
      required:
        - subject
        - body_html
      title: TemplateSource
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````