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

# Update transaction hash for a crypto donation pledge

> 
    Updates the transaction hash for an existing crypto donation pledge.
    
    Authorization rules:
    - When a pledge was created by an authenticated user, only the user who created the pledge can update it
    - When the pledge was created by an anonymous user, anyone can update the hash of the pledge. But that update can only occur once.
    - For pledges created by authenticated users, the hash can be updated multiple times
    - Transaction hash must be unique across all active pledges for the same token
    



## OpenAPI

````yaml https://api.endaoment.org/oas-json patch /v1/donation-pledges/{id}/transaction-hash
openapi: 3.0.0
info:
  title: Endaoment API
  description: The official Endaoment API endpoints
  version: 0.0.1
  contact: {}
servers:
  - url: https://api.endaoment.org
    description: Production
security: []
tags: []
paths:
  /v1/donation-pledges/{id}/transaction-hash:
    patch:
      tags:
        - Donation Pledges
      summary: Update transaction hash for a crypto donation pledge
      description: |2-

            Updates the transaction hash for an existing crypto donation pledge.
            
            Authorization rules:
            - When a pledge was created by an authenticated user, only the user who created the pledge can update it
            - When the pledge was created by an anonymous user, anyone can update the hash of the pledge. But that update can only occur once.
            - For pledges created by authenticated users, the hash can be updated multiple times
            - Transaction hash must be unique across all active pledges for the same token
            
      operationId: DonationPledgesController_updateTransactionHash
      parameters:
        - name: id
          required: true
          in: path
          description: The unique identifier of the donation pledge
          example: 123e4567-e89b-12d3-a456-426614174000
          schema: {}
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTransactionHashDto'
      responses:
        '200':
          description: Transaction hash successfully updated
        '400':
          description: >-
            Transaction hash already exists or a pledge with this hash already
            exists
        '401':
          description: User is not authenticated
        '403':
          description: User is not authorized to update this pledge
        '404':
          description: Pledge not found
      security:
        - bearer: []
components:
  schemas:
    UpdateTransactionHashDto:
      type: object
      properties:
        transactionHash:
          type: string
          description: Transaction hash proving that the asset was sent to the entity
          example: '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef'
      required:
        - transactionHash
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````