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

# Update a usage entry

> Use this API to update an existing usage entry.

<Info>
  To use this endpoint, ensure that you are using the `v2/usage` API endpoint:

  `https://api.salesbricks.com/api/v2/usage`
</Info>


## OpenAPI

````yaml PATCH /usage
openapi: 3.0.0
info:
  title: Salesbricks Usage Entry API
  description: >-
    Use this API to increment a final value counter, update an existing usage
    entry, or delete a usage entry for a customer.
  version: 1.0.0
servers:
  - url: https://api.salesbricks.com/api/v2
security:
  - salesbricksAuth: []
paths:
  /usage:
    patch:
      summary: Update an existing usage entry
      description: >-
        Modify an existing usage entry by providing the transaction ID and new
        values for `value`, `count`, or `properties`.
      operationId: updateUsageEntry
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                transaction_id:
                  type: string
                  description: The unique identifier for this usage entry transaction.
                  example: '12345'
                value:
                  type: integer
                  description: The new value to set for the brick.
                properties:
                  type: object
                  description: New or updated properties for the usage entry.
                  example:
                    source: api
                    notes: Updated notes
                    region: US
      responses:
        '200':
          description: Usage entry updated successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Usage entry updated successfully.
        '400':
          description: Bad Request. Validation errors or missing fields.
        '404':
          description: Not Found. Usage entry does not exist.
components:
  securitySchemes:
    salesbricksAuth:
      type: apiKey
      in: header
      name: X-SALESBRICKS-KEY
      description: Use your Salesbricks API key to authenticate requests.

````