> ## 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.

# Create a crypto donation pledge

> 
    Creates a new donation pledge for a cryptocurrency donation to Endaoment.

    **Minimum Donation Requirements:**
    Please note we enforce a minimum on all donations of assets in this manner as they require manual processing. All sub-$250 donations are re-routed to Endaoment's operating fund.

    By proceeding, you accept our [disclaimer](https://docs.endaoment.org/governance/documentation/terms-and-conditions#11-a-over-the-counter-donation-disclaimer) for over-the-counter donations.

    Authentication is optional:
    - Authenticated users will have the pledge associated with their account
    - Unauthenticated users can still create pledges but won't have them linked to any account

    This endpoint allows users to:
    - Register their crypto donation with Endaoment, alongside the transaction hash proving the donation happened on-chain
    - Specify the amount and receiving fund
    - Optionally provide donor identity information for the donation receipt

    If you are donating crypto via the Endaoment smart contract functions, please use the 'donations' endpoint instead to register your donation.
    



## OpenAPI

````yaml https://api.endaoment.org/oas-json post /v1/donation-pledges/crypto
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/crypto:
    post:
      tags:
        - Donation Pledges
      summary: Create a crypto donation pledge
      description: |2-

            Creates a new donation pledge for a cryptocurrency donation to Endaoment.

            **Minimum Donation Requirements:**
            Please note we enforce a minimum on all donations of assets in this manner as they require manual processing. All sub-$250 donations are re-routed to Endaoment's operating fund.

            By proceeding, you accept our [disclaimer](https://docs.endaoment.org/governance/documentation/terms-and-conditions#11-a-over-the-counter-donation-disclaimer) for over-the-counter donations.

            Authentication is optional:
            - Authenticated users will have the pledge associated with their account
            - Unauthenticated users can still create pledges but won't have them linked to any account

            This endpoint allows users to:
            - Register their crypto donation with Endaoment, alongside the transaction hash proving the donation happened on-chain
            - Specify the amount and receiving fund
            - Optionally provide donor identity information for the donation receipt

            If you are donating crypto via the Endaoment smart contract functions, please use the 'donations' endpoint instead to register your donation.
            
      operationId: DonationPledgesController_createCryptoPledge
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CryptoPledgeInputDto'
      responses:
        '200':
          description: Crypto donation pledge successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateDonationPledgeResponseDto'
        '400':
          description: >-
            Invalid input data provided or USA address fields are
            missing/invalid
      security:
        - bearer: []
components:
  schemas:
    CryptoPledgeInputDto:
      type: object
      properties:
        cryptoGiven:
          description: Asset that was pledged to the entity
          allOf:
            - $ref: '#/components/schemas/CryptoGivenDto'
        otcDonationTransactionHash:
          type: string
          description: Transaction hash proving that the asset was sent to the entity
          example: '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef'
        receivingEntityType:
          type: string
          description: The type of the entity receiving the pledge
          enum:
            - org
            - fund
            - subproject
          example: fund
        receivingEntityId:
          type: string
          description: The ID of the entity receiving the pledge
          format: uuid
          example: 123e4567-e89b-12d3-a456-426614174000
        recommendationId:
          type: string
          description: The ID of the recommendation that led to the pledge
          format: uuid
          example: 123e4567-e89b-12d3-a456-426614174000
        isRebalanceRequested:
          type: boolean
          description: >-
            Whether the fund needs it's investments rebalanced after the pledge
            is deemed fulfilled
          example: false
          default: false
        donorName:
          type: string
          description: >-
            Optional donor name the donor might want to expose to the receiving
            entity
        donorIdentity:
          description: Optional identity information to be used in the donation receipt
          allOf:
            - $ref: '#/components/schemas/IdentityInputDto'
        updateIdentity:
          type: boolean
          description: >-
            Inform if user wants to update their global identity based on the
            informed donation identity
          example: false
        shareMyEmail:
          type: boolean
          description: Whether the donor wants to share their email with the org
          example: false
      required:
        - cryptoGiven
        - receivingEntityType
        - receivingEntityId
    CreateDonationPledgeResponseDto:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the created donation pledge
          example: 123e4567-e89b-12d3-a456-426614174000
          format: uuid
      required:
        - id
    CryptoGivenDto:
      type: object
      properties:
        inputAmount:
          type: string
          description: >-
            The input amount of the token that was given, in its smallest unit
            of a token
          example: '1000000000000000000'
        tokenId:
          type: number
          description: >-
            The ID of the token that was given. The full list of tokens and
            their IDs can be found in the GET /v2/tokens endpoint.
          example: 1
      required:
        - inputAmount
        - tokenId
    IdentityInputDto:
      type: object
      properties:
        firstName:
          type: string
          description: First name of the donor
          example: John
          maxLength: 255
        lastName:
          type: string
          description: Last name of the donor
          example: Doe
          maxLength: 255
        email:
          type: string
          description: Email address of the donor
          example: john.doe@example.com
          format: email
        address:
          description: Physical address of the donor
          allOf:
            - $ref: '#/components/schemas/AddressInputDto'
      required:
        - firstName
        - lastName
        - email
        - address
    AddressInputDto:
      type: object
      properties:
        line1:
          type: string
          description: First line of the address
          example: 123 Main Street
          maxLength: 255
        line2:
          type: object
          description: Second line of the address (optional)
          example: Suite 100
          maxLength: 255
          nullable: true
        city:
          type: string
          description: City name
          example: San Francisco
          maxLength: 255
        state:
          type: object
          description: State/Province/Region. Required if country is USA
          example: CA
          maxLength: 255
          nullable: true
        zip:
          type: string
          description: Postal/ZIP code. Required if country is USA
          example: '94105'
          maxLength: 255
          nullable: true
        country:
          type: string
          description: Three-letter ISO country code. Defaults to USA
          example: USA
          enum:
            - ABW
            - AFG
            - AGO
            - AIA
            - ALA
            - ALB
            - AND
            - ARE
            - ARG
            - ARM
            - ASM
            - ATA
            - ATF
            - ATG
            - AUS
            - AUT
            - AZE
            - BDI
            - BEL
            - BEN
            - BES
            - BFA
            - BGD
            - BGR
            - BHR
            - BHS
            - BIH
            - BLM
            - BLR
            - BLZ
            - BMU
            - BOL
            - BRA
            - BRB
            - BRN
            - BTN
            - BVT
            - BWA
            - CAF
            - CAN
            - CCK
            - CHE
            - CHL
            - CHN
            - CIV
            - CMR
            - COD
            - COG
            - COK
            - COL
            - COM
            - CPV
            - CRI
            - CUB
            - CUW
            - CXR
            - CYM
            - CYP
            - CZE
            - DEU
            - DJI
            - DMA
            - DNK
            - DOM
            - DZA
            - ECU
            - EGY
            - ERI
            - ESH
            - ESP
            - EST
            - ETH
            - FIN
            - FJI
            - FLK
            - FRA
            - FRO
            - FSM
            - GAB
            - GBR
            - GEO
            - GGY
            - GHA
            - GIB
            - GIN
            - GLP
            - GMB
            - GNB
            - GNQ
            - GRC
            - GRD
            - GRL
            - GTM
            - GUF
            - GUM
            - GUY
            - HKG
            - HMD
            - HND
            - HRV
            - HTI
            - HUN
            - IDN
            - IMN
            - IND
            - IOT
            - IRL
            - IRN
            - IRQ
            - ISL
            - ISR
            - ITA
            - JAM
            - JEY
            - JOR
            - JPN
            - KAZ
            - KEN
            - KGZ
            - KHM
            - KIR
            - KNA
            - KOR
            - KWT
            - LAO
            - LBN
            - LBR
            - LBY
            - LCA
            - LIE
            - LKA
            - LSO
            - LTU
            - LUX
            - LVA
            - MAC
            - MAF
            - MAR
            - MCO
            - MDA
            - MDG
            - MDV
            - MEX
            - MHL
            - MKD
            - MLI
            - MLT
            - MMR
            - MNE
            - MNG
            - MNP
            - MOZ
            - MRT
            - MSR
            - MTQ
            - MUS
            - MWI
            - MYS
            - MYT
            - NAM
            - NCL
            - NER
            - NFK
            - NGA
            - NIC
            - NIU
            - NLD
            - NOR
            - NPL
            - NRU
            - NZL
            - OMN
            - PAK
            - PAN
            - PCN
            - PER
            - PHL
            - PLW
            - PNG
            - POL
            - PRI
            - PRK
            - PRT
            - PRY
            - PSE
            - PYF
            - QAT
            - REU
            - ROU
            - RUS
            - RWA
            - SAU
            - SDN
            - SEN
            - SGP
            - SGS
            - SHN
            - SJM
            - SLB
            - SLE
            - SLV
            - SMR
            - SOM
            - SPM
            - SRB
            - SSD
            - STP
            - SUR
            - SVK
            - SVN
            - SWE
            - SWZ
            - SXM
            - SYC
            - SYR
            - TCA
            - TCD
            - TGO
            - THA
            - TJK
            - TKL
            - TKM
            - TLS
            - TON
            - TTO
            - TUN
            - TUR
            - TUV
            - TWN
            - TZA
            - UGA
            - UKR
            - UMI
            - URY
            - USA
            - UZB
            - VAT
            - VCT
            - VEN
            - VGB
            - VIR
            - VNM
            - VUT
            - WLF
            - WSM
            - XKX
            - YEM
            - ZAF
            - ZMB
            - ZWE
          default: USA
      required:
        - line1
        - city
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````