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

# Put v1projects source

> Upload source locale file. Computes diff against previous version (added/modified/deleted keys). Marks target locales as "behind" if changes detected. Supports flat or nested JSON with optional __context__ annotations.



## OpenAPI

````yaml https://hidden-wildcat-614.convex.site/v1/openapi put /v1/projects/{projectId}/source
openapi: 3.0.0
info:
  version: 2.0.0
  title: LazyLocales API
  description: >-
    AI-powered translation management REST API with CLI-first workflow.


    ## Authentication

    All endpoints require `Authorization: Bearer <token>`. Two token types:

    - **Access token** — from `lazylocales login` or user session

    - **Project API token** — prefixed `ll_`, created in project settings for
    CI/CD


    ## Workflow

    Translations are managed via the CLI using local AI translation with models
    like GPT-4o, Claude, Gemini, or Mistral. The dashboard provides read-only
    monitoring and project configuration.


    ## Error Format

    All errors follow: `{ "error": { "code": "ERROR_CODE", "message": "..." } }`
servers:
  - url: https://{deployment}.convex.site
    description: Convex deployment
    variables:
      deployment:
        default: your-deployment
        description: Your Convex deployment name
security: []
tags:
  - name: Projects
    description: Project management endpoints
  - name: Source Files
    description: Source locale file operations
  - name: Locales
    description: Locale status and management
  - name: CLI
    description: CLI config and reporting endpoints
  - name: API Tokens
    description: API token management
paths:
  /v1/projects/{projectId}/source:
    put:
      tags:
        - Source Files
      description: >-
        Upload source locale file. Computes diff against previous version
        (added/modified/deleted keys). Marks target locales as "behind" if
        changes detected. Supports flat or nested JSON with optional __context__
        annotations.
      parameters:
        - schema:
            type: string
            minLength: 1
            example: proj_abc123
          required: true
          name: projectId
          in: path
      requestBody:
        description: Raw JSON locale object (flat or nested)
        content:
          application/json:
            schema:
              type: object
              example:
                greeting: Hello
                auth:
                  login: Log in
      responses:
        '200':
          description: Source file updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SaveSourceResponse'
components:
  schemas:
    SaveSourceResponse:
      type: object
      properties:
        version:
          type: number
        diff:
          $ref: '#/components/schemas/Diff'
        keyCount:
          type: number
        needsTranslation:
          type: boolean
      required:
        - version
        - diff
        - keyCount
        - needsTranslation
    Diff:
      type: object
      nullable: true
      properties:
        added:
          type: array
          items:
            type: string
        modified:
          type: array
          items:
            type: string
        deleted:
          type: array
          items:
            type: string
      required:
        - added
        - modified
        - deleted

````