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

> Creates a recommendation for donating cryptocurrency.



## OpenAPI

````yaml https://api.endaoment.org/oas-json post /v1/recommendations/donation
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/recommendations/donation:
    post:
      tags:
        - Recommendations
      summary: Create a crypto donation recommendation
      description: Creates a recommendation for donating cryptocurrency.
      operationId: RecommendationsController_createDonationRecommendation
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDonationRecommendationInputDto'
      responses:
        '200':
          description: Donation recommendation successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RecommendationCreatedResponseDto'
        '400':
          description: Invalid input data provided
      security:
        - bearer: []
components:
  schemas:
    CreateDonationRecommendationInputDto:
      type: object
      properties:
        donorName:
          type: string
          description: >-
            Optional donor name to expose to the receiving entity. Not to be
            confused with `donorIdentity` which is the PII/tax receipt
            information of the donor
          example: Anonymous Donor
        donorIdentity:
          description: Optional identity information for the donation receipt.
          allOf:
            - $ref: '#/components/schemas/IdentityInputDto'
        updateIdentity:
          type: boolean
          description: >-
            Whether to update the user's global identity with the provided
            donation identity.
          example: true
        shareMyEmail:
          type: boolean
          description: Whether the donor wants to share their email with the org.
          example: false
        collaboratingFundId:
          type: string
          description: ID of the fund that the advisor is collaborating with
          format: uuid
        tokenId:
          type: number
          description: Recommended token to be donated
          example: 1
        chainId:
          type: number
          description: The chain ID where the donation should occur.
          example: 1
        inputAmount:
          type: string
          description: >-
            Amount of input token used by the donation, denominated in its
            smallest currency unit
          example: '1000000000000000000'
        offsetFee:
          type: boolean
          description: Whether the advisor wants to offset the donation fee
          example: true
        uuid:
          type: string
          description: >-
            Unique identifier for the recommendation. Generated on the client
            side to ensure idempotency.
          format: uuid
      required:
        - tokenId
        - chainId
        - inputAmount
        - offsetFee
        - uuid
    RecommendationCreatedResponseDto:
      type: object
      properties:
        id:
          type: string
          description: The recommendation id
          example: 123e4567-e89b-12d3-a456-426614174000
      required:
        - id
    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

````