POST
/
v1
/
donation-pledges
/
crypto
curl --request POST \
  --url https://api.endaoment.org/v1/donation-pledges/crypto \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "cryptoGiven": {
    "inputAmount": "1000000000000000000",
    "tokenId": 1
  },
  "otcDonationTransactionHash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
  "receivingEntityType": "fund",
  "receivingEntityId": "123e4567-e89b-12d3-a456-426614174000",
  "recommendationId": "123e4567-e89b-12d3-a456-426614174000",
  "isRebalanceRequested": false,
  "donorName": "<string>",
  "donorIdentity": {
    "firstName": "John",
    "lastName": "Doe",
    "email": "john.doe@example.com",
    "address": {
      "line1": "123 Main Street",
      "line2": "Suite 100",
      "city": "San Francisco",
      "state": "CA",
      "zip": "94105",
      "country": "USA"
    }
  },
  "updateIdentity": false,
  "shareMyEmail": false
}'
{
  "id": "123e4567-e89b-12d3-a456-426614174000"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
cryptoGiven
object
required

Asset that was pledged to the entity

otcDonationTransactionHash
string
required

Transaction hash proving that the asset was sent to the entity

Example:

"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"

receivingEntityType
enum<string>
required

The type of the entity receiving the pledge

Available options:
org,
fund,
subproject
Example:

"fund"

receivingEntityId
string
required

The ID of the entity receiving the pledge

Example:

"123e4567-e89b-12d3-a456-426614174000"

recommendationId
string

The ID of the recommendation that led to the pledge

Example:

"123e4567-e89b-12d3-a456-426614174000"

isRebalanceRequested
boolean
default:false

Whether the fund needs it's investments rebalanced after the pledge is deemed fulfilled

Example:

false

donorName
string

Optional donor name the donor might want to expose to the receiving entity

donorIdentity
object

Optional identity information to be used in the donation receipt

updateIdentity
boolean

Inform if user wants to update their global identity based on the informed donation identity

Example:

false

shareMyEmail
boolean

Whether the donor wants to share their email with the org

Example:

false

Response

200
application/json
Crypto donation pledge successfully created
id
string
required

Unique identifier of the created donation pledge

Example:

"123e4567-e89b-12d3-a456-426614174000"