> ## 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 DAF migration pledge

> 
    Creates a new donation pledge for migrating funds from an external Donor-Advised Fund (DAF) to Endaoment.

    Authentication is required:
    - Only authenticated users can create DAF migration pledges
    - The pledge will be associated with the authenticated user's account

    This endpoint allows users to:
    - Register their intention to migrate funds from an external DAF
    - Specify the amount and receiving fund
    - Provide necessary donor information for the migration
    



## OpenAPI

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

            Creates a new donation pledge for migrating funds from an external Donor-Advised Fund (DAF) to Endaoment.

            Authentication is required:
            - Only authenticated users can create DAF migration pledges
            - The pledge will be associated with the authenticated user's account

            This endpoint allows users to:
            - Register their intention to migrate funds from an external DAF
            - Specify the amount and receiving fund
            - Provide necessary donor information for the migration
            
      operationId: DonationPledgesController_createDafMigrationPledge
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CashDonationPledgeInputDto'
      responses:
        '200':
          description: DAF migration pledge successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateDonationPledgeResponseDto'
        '400':
          description: Invalid input data provided
        '401':
          description: User is not authenticated
      security:
        - bearer: []
components:
  schemas:
    CashDonationPledgeInputDto:
      type: object
      properties:
        pledgedAmountMicroDollars:
          type: string
          description: >-
            The amount to donate in microdollars (1 USD = 1,000,000
            microdollars)
          example: '5000000'
          minimum: 1
        receivingFundId:
          type: string
          description: The UUID of the fund that will receive the donation
          example: 123e4567-e89b-12d3-a456-426614174000
        idempotencyKey:
          type: string
          description: Client-generated UUID to ensure idempotency of the request
          example: 123e4567-e89b-12d3-a456-426614174000
        isRebalanceRequested:
          type: boolean
          description: >-
            Whether the fund should be rebalanced after the donation is
            fulfilled
          example: false
          default: false
        donorIdentity:
          description: Donor identity information to be used in the donation receipt
          allOf:
            - $ref: '#/components/schemas/IdentityInputDto'
      required:
        - pledgedAmountMicroDollars
        - receivingFundId
        - idempotencyKey
    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
    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

````