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

# Update commit message

> Update a commit message. Can only be called on commits authored by the current user.



## OpenAPI

````yaml patch /repos/{repo_id}/commits/{commit_id}
openapi: 3.0.3
info:
  title: Diversion Core API
  description: >-
    Definition of the Core API used to access low-level functionality of
    Diversion
  version: 0.2.0
servers:
  - url: https://api.diversion.dev/v0
    description: Base endpoint
security: []
paths:
  /repos/{repo_id}/commits/{commit_id}:
    parameters:
      - $ref: '#/components/parameters/RepoParam'
      - $ref: '#/components/parameters/CommitParam'
    patch:
      tags:
        - Repository Commit Manipulation
      summary: Update commit message
      description: >-
        Update a commit message. Can only be called on commits authored by the
        current user.
      operationId: src.handlersv2.commit.patch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CommitMessage'
      responses:
        '200':
          $ref: '#/components/responses/OKEmptyObject'
        default:
          $ref: '#/components/responses/Error'
      security:
        - OAuth2:
            - coreapi/write
components:
  parameters:
    RepoParam:
      in: path
      name: repo_id
      required: true
      schema:
        type: string
        example: example_id
        minLength: 3
        maxLength: 128
      description: >-
        The repo ID of the repository. Repo _name_ can be used instead of the
        ID, but usage of ID for permanent linking and API requests is preferred.
    CommitParam:
      in: path
      name: commit_id
      schema:
        type: string
        example: dv.commit.350e1bc3-52dc-4659-9817-7ce8f3fdf628
        minLength: 3
        maxLength: 128
      required: true
      description: A commit ID
  schemas:
    CommitMessage:
      type: object
      properties:
        commit_message:
          type: string
          maxLength: 16384
      required:
        - commit_message
    Error:
      type: object
      properties:
        status:
          type: integer
          description: HTTP status code
        detail:
          type: string
        title:
          type: string
        type:
          type: string
      required:
        - status
        - detail
  responses:
    OKEmptyObject:
      description: Request completed successfully
      content:
        application/json:
          schema:
            type: object
    Error:
      description: An error occurred
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    OAuth2:
      type: oauth2
      x-tokenInfoFunc: src.token_info.token_auth
      description: This API uses OAuth 2 with the implicit grant flow
      flows:
        implicit:
          authorizationUrl: https://auth.diversion.dev/oauth2/authorize
          scopes:
            coreapi/read: Operations with no possible side-effects
            coreapi/write: Modifying operations
            coreapi/admin: >-
              Organizational operations like adding a repo or changing repo
              properties

````