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

# Update project



## OpenAPI

````yaml https://api.specular.dev/openapi.json patch /projects/{id}
openapi: 3.0.0
info:
  title: Specular API
  description: Backend-as-a-Service API for managing projects and branches
  version: 1.0.0
servers:
  - url: https://api.specular.dev
    description: Production server
  - url: http://localhost:3000
    description: Development server
security:
  - bearerAuth: []
paths:
  /projects/{id}:
    patch:
      tags:
        - Projects
      summary: Update project
      parameters:
        - schema:
            type: string
          in: path
          name: id
          required: true
          description: Project ID
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: New project name
                git:
                  type: object
                  nullable: true
                  description: >-
                    Git repository configuration. Provided fields are merged
                    with existing config. Set to null to remove git
                    configuration.
                  properties:
                    remoteUrl:
                      type: string
                      description: >-
                        Git repository URL (HTTPS or S3 format like
                        s3://bucket-name/path)
                    username:
                      type: string
                      description: >-
                        Git username for authentication (required for HTTPS
                        URLs)
                    password:
                      type: string
                      description: Git password or access token (required for HTTPS URLs)
                    mainBranch:
                      type: string
                      description: >-
                        Main/default branch name in the Git repository (e.g.,
                        'main' or 'master')
                    path:
                      type: string
                      nullable: true
                      description: >-
                        Optional path within the repository where the backend
                        code should be placed. Set to null to remove.
      responses:
        '200':
          description: Project updated successfully
          content:
            application/json:
              schema:
                description: Project updated successfully
                type: object
                properties:
                  project:
                    type: object
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                      state:
                        type: string
                        enum:
                          - creating
                          - active
                          - deleting
                          - deleted
                          - failed
                          - archived
                        description: >-
                          Project state: creating (initial creation), active
                          (ready to use), deleting (being deleted), deleted
                          (soft deleted), failed (creation failed), archived
                          (due to inactivity)
                      productionUrl:
                        type: string
                        nullable: true
                        description: Production API URL (available after first merge)
                      openApiSpec:
                        type: string
                        nullable: true
                        description: >-
                          OpenAPI spec in YAML format (available after first
                          merge)
                      createdAt:
                        type: string
                        format: date-time
                      updatedAt:
                        type: string
                        format: date-time
                      git:
                        type: object
                        nullable: true
                        properties:
                          remoteUrl:
                            type: string
                          username:
                            type: string
                            nullable: true
                          mainBranch:
                            type: string
                          path:
                            type: string
                            nullable: true
                  propagationErrors:
                    type: array
                    items:
                      type: string
                    description: >-
                      List of branches where git config propagation to sandboxes
                      failed. Only present if there were failures.
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                description: Bad request
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                description: Authentication required
                type: object
                properties:
                  error:
                    type: string
        '404':
          description: Project not found
          content:
            application/json:
              schema:
                description: Project not found
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                description: Internal server error
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 'Bearer authentication with API key (format: Bearer sk_xxx)'

````