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

# Update Project

> Update a project's name.

Platform JWT callers must be scoped to this exact project; the
``require_project_match`` dependency enforces JWT scope and
verifies the project exists in the caller's tenant namespace.

Returns:
    Updated project record.

Raises:
    ProjectNotFoundError: If project not found or belongs to
        another organization.
    CrossProjectAccessError: If a platform JWT is scoped to a
        different project than the URL path.



## OpenAPI

````yaml https://api.pragmatiks.io/openapi.json patch /projects/{project_id}
openapi: 3.1.0
info:
  title: Pragma API
  version: 0.1.0
servers: []
security: []
paths:
  /projects/{project_id}:
    patch:
      tags:
        - projects
      summary: Update Project
      description: |-
        Update a project's name.

        Platform JWT callers must be scoped to this exact project; the
        ``require_project_match`` dependency enforces JWT scope and
        verifies the project exists in the caller's tenant namespace.

        Returns:
            Updated project record.

        Raises:
            ProjectNotFoundError: If project not found or belongs to
                another organization.
            CrossProjectAccessError: If a platform JWT is scoped to a
                different project than the URL path.
      operationId: projects-update_project
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
            title: Project Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateProjectRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Project'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    UpdateProjectRequest:
      properties:
        name:
          type: string
          maxLength: 200
          minLength: 1
          title: Name
      type: object
      required:
        - name
      title: UpdateProjectRequest
      description: |-
        Request body for updating a project.

        Attributes:
            name: New project name.
    Project:
      properties:
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        project_id:
          type: string
          title: Project Id
        organization_id:
          type: string
          title: Organization Id
        name:
          type: string
          title: Name
        managed_by:
          anyOf:
            - type: string
              enum:
                - user
                - platform
            - type: 'null'
          title: Managed By
      type: object
      required:
        - project_id
        - organization_id
        - name
      title: Project
      description: |-
        Project record persisted in the tenant namespace.

        Projects group resources within an organization. Each resource
        belongs to exactly one project, enabling scoped access control and
        isolation. Project rows live in the per-tenant namespace alongside
        resources so that lifecycle operations on a project and its
        resources execute inside a single tenant-scoped transaction.

        Identity fields (frozen):
            project_id: Unique project identifier, used as the record ID.
            organization_id: Owning organization, set at creation and immutable.
                Denormalised onto the row so platform callers can reason about
                the owner without re-deriving it from the namespace binding.

        Metadata:
            name: Display name of the project.
            managed_by: Ownership tier. ``"platform"`` projects are seeded by
                the platform itself (e.g. the platform-default project used by
                platform agents). User-facing write paths reject mutations to
                platform-managed projects with HTTP 403. ``None`` or ``"user"``
                indicates an ordinary user-created project.

        Inherited from PragmaModel:
            created_at: Creation timestamp (frozen).
            updated_at: Last update timestamp (mutable).
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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

````