Create fund
curl --request POST \
--url https://api.endaoment.org/v1/funds \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fundInput": {
"name": "Doe Family Foundation",
"advisor": {
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com",
"address": {
"line1": "123 Main Street",
"city": "San Francisco",
"line2": "Suite 100",
"state": "CA",
"zip": "94105",
"country": "USA"
}
},
"description": "A family foundation dedicated to supporting educational initiatives",
"type": "Private"
},
"deploymentTransactionHash": "0xf89f7da1e5d79dcb1b8863d0926fe41204785b443ce2d1dca4bf50070c492567",
"referralSource": "partner_website",
"fundSalt": "0x7189b9ff31064f2bbc98ad4e92e5562c00000000000000000000000000000000",
"chainId": 1
}
'import requests
url = "https://api.endaoment.org/v1/funds"
payload = {
"fundInput": {
"name": "Doe Family Foundation",
"advisor": {
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com",
"address": {
"line1": "123 Main Street",
"city": "San Francisco",
"line2": "Suite 100",
"state": "CA",
"zip": "94105",
"country": "USA"
}
},
"description": "A family foundation dedicated to supporting educational initiatives",
"type": "Private"
},
"deploymentTransactionHash": "0xf89f7da1e5d79dcb1b8863d0926fe41204785b443ce2d1dca4bf50070c492567",
"referralSource": "partner_website",
"fundSalt": "0x7189b9ff31064f2bbc98ad4e92e5562c00000000000000000000000000000000",
"chainId": 1
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
fundInput: {
name: 'Doe Family Foundation',
advisor: {
firstName: 'John',
lastName: 'Doe',
email: 'john.doe@example.com',
address: {
line1: '123 Main Street',
city: 'San Francisco',
line2: 'Suite 100',
state: 'CA',
zip: '94105',
country: 'USA'
}
},
description: 'A family foundation dedicated to supporting educational initiatives',
type: 'Private'
},
deploymentTransactionHash: '0xf89f7da1e5d79dcb1b8863d0926fe41204785b443ce2d1dca4bf50070c492567',
referralSource: 'partner_website',
fundSalt: '0x7189b9ff31064f2bbc98ad4e92e5562c00000000000000000000000000000000',
chainId: 1
})
};
fetch('https://api.endaoment.org/v1/funds', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.endaoment.org/v1/funds",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'fundInput' => [
'name' => 'Doe Family Foundation',
'advisor' => [
'firstName' => 'John',
'lastName' => 'Doe',
'email' => 'john.doe@example.com',
'address' => [
'line1' => '123 Main Street',
'city' => 'San Francisco',
'line2' => 'Suite 100',
'state' => 'CA',
'zip' => '94105',
'country' => 'USA'
]
],
'description' => 'A family foundation dedicated to supporting educational initiatives',
'type' => 'Private'
],
'deploymentTransactionHash' => '0xf89f7da1e5d79dcb1b8863d0926fe41204785b443ce2d1dca4bf50070c492567',
'referralSource' => 'partner_website',
'fundSalt' => '0x7189b9ff31064f2bbc98ad4e92e5562c00000000000000000000000000000000',
'chainId' => 1
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.endaoment.org/v1/funds"
payload := strings.NewReader("{\n \"fundInput\": {\n \"name\": \"Doe Family Foundation\",\n \"advisor\": {\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"email\": \"john.doe@example.com\",\n \"address\": {\n \"line1\": \"123 Main Street\",\n \"city\": \"San Francisco\",\n \"line2\": \"Suite 100\",\n \"state\": \"CA\",\n \"zip\": \"94105\",\n \"country\": \"USA\"\n }\n },\n \"description\": \"A family foundation dedicated to supporting educational initiatives\",\n \"type\": \"Private\"\n },\n \"deploymentTransactionHash\": \"0xf89f7da1e5d79dcb1b8863d0926fe41204785b443ce2d1dca4bf50070c492567\",\n \"referralSource\": \"partner_website\",\n \"fundSalt\": \"0x7189b9ff31064f2bbc98ad4e92e5562c00000000000000000000000000000000\",\n \"chainId\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.endaoment.org/v1/funds")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fundInput\": {\n \"name\": \"Doe Family Foundation\",\n \"advisor\": {\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"email\": \"john.doe@example.com\",\n \"address\": {\n \"line1\": \"123 Main Street\",\n \"city\": \"San Francisco\",\n \"line2\": \"Suite 100\",\n \"state\": \"CA\",\n \"zip\": \"94105\",\n \"country\": \"USA\"\n }\n },\n \"description\": \"A family foundation dedicated to supporting educational initiatives\",\n \"type\": \"Private\"\n },\n \"deploymentTransactionHash\": \"0xf89f7da1e5d79dcb1b8863d0926fe41204785b443ce2d1dca4bf50070c492567\",\n \"referralSource\": \"partner_website\",\n \"fundSalt\": \"0x7189b9ff31064f2bbc98ad4e92e5562c00000000000000000000000000000000\",\n \"chainId\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.endaoment.org/v1/funds")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"fundInput\": {\n \"name\": \"Doe Family Foundation\",\n \"advisor\": {\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"email\": \"john.doe@example.com\",\n \"address\": {\n \"line1\": \"123 Main Street\",\n \"city\": \"San Francisco\",\n \"line2\": \"Suite 100\",\n \"state\": \"CA\",\n \"zip\": \"94105\",\n \"country\": \"USA\"\n }\n },\n \"description\": \"A family foundation dedicated to supporting educational initiatives\",\n \"type\": \"Private\"\n },\n \"deploymentTransactionHash\": \"0xf89f7da1e5d79dcb1b8863d0926fe41204785b443ce2d1dca4bf50070c492567\",\n \"referralSource\": \"partner_website\",\n \"fundSalt\": \"0x7189b9ff31064f2bbc98ad4e92e5562c00000000000000000000000000000000\",\n \"chainId\": 1\n}"
response = http.request(request)
puts response.read_body{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Doe Family Foundation",
"type": "Private",
"manager": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"walletAddress": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
},
"chainId": 1,
"advisor": {
"firstName": "John",
"lastName": "Doe"
},
"featuredIndex": 1,
"usdcBalance": "20500000",
"availableBalance": "21000000",
"description": "A family foundation dedicated to supporting educational initiatives",
"createdAtUtc": "2024-01-01T00:00:00Z",
"updatedAtUtc": "2024-03-14T12:00:00Z",
"lifetimeDonationsUsdc": "1000000000",
"inboundFeeBps": 25,
"outboundFeeBps": 50,
"grantsGiven": 10,
"inTransitBuyUsdcAmount": "5000000",
"inTransitSellUsdcAmount": "3000000",
"investedUsdc": "50000000",
"totalGrantedUsdc": "25000000",
"processingTransfersTotalUsdc": "1000000",
"illiquidBalance": "10000000",
"poolDetails": {
"eligibleEntities": "Organizations",
"algorithmType": "QuadraticFunding",
"distributionSchedule": "Quarterly",
"distributionPercentage": 0.25,
"eligibleVotes": "GrantsAndDonations",
"voteWeight": "UsdcValue"
},
"expectedDeploymentInfo": {
"expectedManagerAddress": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"expectedSalt": "0x0000000000000000000000000000000000000000000000000000000000000123",
"expectedComputedAddress": "0x1234567890123456789012345678901234567890",
"expectedChainId": 1
},
"deploymentTransactionHash": "0xf89f7da1e5d79dcb1b8863d0926fe41204785b443ce2d1dca4bf50070c492567",
"contractAddress": "0x1234567890123456789012345678901234567890",
"lastBalanceSyncUtc": "2024-03-14T12:00:00Z",
"shortDescription": "Supporting education",
"vanityUrl": "doe-family-foundation",
"paypalId": "123e4567-e89b-12d3-a456-426614174000",
"logo": "https://example.com/logo.png",
"category": "Education",
"customFeeDetail": "Special Community Fund Agreement",
"v2ContractAddress": "<string>"
}{
"statusCode": 400,
"message": [
"fundInput.advisor.firstName must be a non-empty string",
"fundInput.advisor.lastName must be a non-empty string",
"fundInput.advisor.email must be an email",
"fundInput.advisor.address.zip must be shorter than or equal to 255 characters",
"fundInput.advisor.address.zip must be a string",
"\"1\" is not a chain id supported by the system"
],
"error": "Bad Request"
}Funds
Create fund
This operation allows you to create a new fund with or without an associated deployment transaction hash. A deployment transaction hash is only required for integrations that handle on-chain deployments themselves.
POST
/
v1
/
funds
Create fund
curl --request POST \
--url https://api.endaoment.org/v1/funds \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fundInput": {
"name": "Doe Family Foundation",
"advisor": {
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com",
"address": {
"line1": "123 Main Street",
"city": "San Francisco",
"line2": "Suite 100",
"state": "CA",
"zip": "94105",
"country": "USA"
}
},
"description": "A family foundation dedicated to supporting educational initiatives",
"type": "Private"
},
"deploymentTransactionHash": "0xf89f7da1e5d79dcb1b8863d0926fe41204785b443ce2d1dca4bf50070c492567",
"referralSource": "partner_website",
"fundSalt": "0x7189b9ff31064f2bbc98ad4e92e5562c00000000000000000000000000000000",
"chainId": 1
}
'import requests
url = "https://api.endaoment.org/v1/funds"
payload = {
"fundInput": {
"name": "Doe Family Foundation",
"advisor": {
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com",
"address": {
"line1": "123 Main Street",
"city": "San Francisco",
"line2": "Suite 100",
"state": "CA",
"zip": "94105",
"country": "USA"
}
},
"description": "A family foundation dedicated to supporting educational initiatives",
"type": "Private"
},
"deploymentTransactionHash": "0xf89f7da1e5d79dcb1b8863d0926fe41204785b443ce2d1dca4bf50070c492567",
"referralSource": "partner_website",
"fundSalt": "0x7189b9ff31064f2bbc98ad4e92e5562c00000000000000000000000000000000",
"chainId": 1
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
fundInput: {
name: 'Doe Family Foundation',
advisor: {
firstName: 'John',
lastName: 'Doe',
email: 'john.doe@example.com',
address: {
line1: '123 Main Street',
city: 'San Francisco',
line2: 'Suite 100',
state: 'CA',
zip: '94105',
country: 'USA'
}
},
description: 'A family foundation dedicated to supporting educational initiatives',
type: 'Private'
},
deploymentTransactionHash: '0xf89f7da1e5d79dcb1b8863d0926fe41204785b443ce2d1dca4bf50070c492567',
referralSource: 'partner_website',
fundSalt: '0x7189b9ff31064f2bbc98ad4e92e5562c00000000000000000000000000000000',
chainId: 1
})
};
fetch('https://api.endaoment.org/v1/funds', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.endaoment.org/v1/funds",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'fundInput' => [
'name' => 'Doe Family Foundation',
'advisor' => [
'firstName' => 'John',
'lastName' => 'Doe',
'email' => 'john.doe@example.com',
'address' => [
'line1' => '123 Main Street',
'city' => 'San Francisco',
'line2' => 'Suite 100',
'state' => 'CA',
'zip' => '94105',
'country' => 'USA'
]
],
'description' => 'A family foundation dedicated to supporting educational initiatives',
'type' => 'Private'
],
'deploymentTransactionHash' => '0xf89f7da1e5d79dcb1b8863d0926fe41204785b443ce2d1dca4bf50070c492567',
'referralSource' => 'partner_website',
'fundSalt' => '0x7189b9ff31064f2bbc98ad4e92e5562c00000000000000000000000000000000',
'chainId' => 1
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.endaoment.org/v1/funds"
payload := strings.NewReader("{\n \"fundInput\": {\n \"name\": \"Doe Family Foundation\",\n \"advisor\": {\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"email\": \"john.doe@example.com\",\n \"address\": {\n \"line1\": \"123 Main Street\",\n \"city\": \"San Francisco\",\n \"line2\": \"Suite 100\",\n \"state\": \"CA\",\n \"zip\": \"94105\",\n \"country\": \"USA\"\n }\n },\n \"description\": \"A family foundation dedicated to supporting educational initiatives\",\n \"type\": \"Private\"\n },\n \"deploymentTransactionHash\": \"0xf89f7da1e5d79dcb1b8863d0926fe41204785b443ce2d1dca4bf50070c492567\",\n \"referralSource\": \"partner_website\",\n \"fundSalt\": \"0x7189b9ff31064f2bbc98ad4e92e5562c00000000000000000000000000000000\",\n \"chainId\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.endaoment.org/v1/funds")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fundInput\": {\n \"name\": \"Doe Family Foundation\",\n \"advisor\": {\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"email\": \"john.doe@example.com\",\n \"address\": {\n \"line1\": \"123 Main Street\",\n \"city\": \"San Francisco\",\n \"line2\": \"Suite 100\",\n \"state\": \"CA\",\n \"zip\": \"94105\",\n \"country\": \"USA\"\n }\n },\n \"description\": \"A family foundation dedicated to supporting educational initiatives\",\n \"type\": \"Private\"\n },\n \"deploymentTransactionHash\": \"0xf89f7da1e5d79dcb1b8863d0926fe41204785b443ce2d1dca4bf50070c492567\",\n \"referralSource\": \"partner_website\",\n \"fundSalt\": \"0x7189b9ff31064f2bbc98ad4e92e5562c00000000000000000000000000000000\",\n \"chainId\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.endaoment.org/v1/funds")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"fundInput\": {\n \"name\": \"Doe Family Foundation\",\n \"advisor\": {\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"email\": \"john.doe@example.com\",\n \"address\": {\n \"line1\": \"123 Main Street\",\n \"city\": \"San Francisco\",\n \"line2\": \"Suite 100\",\n \"state\": \"CA\",\n \"zip\": \"94105\",\n \"country\": \"USA\"\n }\n },\n \"description\": \"A family foundation dedicated to supporting educational initiatives\",\n \"type\": \"Private\"\n },\n \"deploymentTransactionHash\": \"0xf89f7da1e5d79dcb1b8863d0926fe41204785b443ce2d1dca4bf50070c492567\",\n \"referralSource\": \"partner_website\",\n \"fundSalt\": \"0x7189b9ff31064f2bbc98ad4e92e5562c00000000000000000000000000000000\",\n \"chainId\": 1\n}"
response = http.request(request)
puts response.read_body{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Doe Family Foundation",
"type": "Private",
"manager": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"walletAddress": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
},
"chainId": 1,
"advisor": {
"firstName": "John",
"lastName": "Doe"
},
"featuredIndex": 1,
"usdcBalance": "20500000",
"availableBalance": "21000000",
"description": "A family foundation dedicated to supporting educational initiatives",
"createdAtUtc": "2024-01-01T00:00:00Z",
"updatedAtUtc": "2024-03-14T12:00:00Z",
"lifetimeDonationsUsdc": "1000000000",
"inboundFeeBps": 25,
"outboundFeeBps": 50,
"grantsGiven": 10,
"inTransitBuyUsdcAmount": "5000000",
"inTransitSellUsdcAmount": "3000000",
"investedUsdc": "50000000",
"totalGrantedUsdc": "25000000",
"processingTransfersTotalUsdc": "1000000",
"illiquidBalance": "10000000",
"poolDetails": {
"eligibleEntities": "Organizations",
"algorithmType": "QuadraticFunding",
"distributionSchedule": "Quarterly",
"distributionPercentage": 0.25,
"eligibleVotes": "GrantsAndDonations",
"voteWeight": "UsdcValue"
},
"expectedDeploymentInfo": {
"expectedManagerAddress": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"expectedSalt": "0x0000000000000000000000000000000000000000000000000000000000000123",
"expectedComputedAddress": "0x1234567890123456789012345678901234567890",
"expectedChainId": 1
},
"deploymentTransactionHash": "0xf89f7da1e5d79dcb1b8863d0926fe41204785b443ce2d1dca4bf50070c492567",
"contractAddress": "0x1234567890123456789012345678901234567890",
"lastBalanceSyncUtc": "2024-03-14T12:00:00Z",
"shortDescription": "Supporting education",
"vanityUrl": "doe-family-foundation",
"paypalId": "123e4567-e89b-12d3-a456-426614174000",
"logo": "https://example.com/logo.png",
"category": "Education",
"customFeeDetail": "Special Community Fund Agreement",
"v2ContractAddress": "<string>"
}{
"statusCode": 400,
"message": [
"fundInput.advisor.firstName must be a non-empty string",
"fundInput.advisor.lastName must be a non-empty string",
"fundInput.advisor.email must be an email",
"fundInput.advisor.address.zip must be shorter than or equal to 255 characters",
"fundInput.advisor.address.zip must be a string",
"\"1\" is not a chain id supported by the system"
],
"error": "Bad Request"
}Authorizations
Body
application/json
Transaction hash of the fund contract deployment:
- If provided, the fund will be created using the information from the deployment transaction provided.
- If not provided, creates the fund and delegates the blockchain logic to Endaoment.
- Must be a valid Ethereum transaction hash matching pattern: 0x followed by 64 hexadecimal characters (0-9, a-f)
Example:
"0xf89f7da1e5d79dcb1b8863d0926fe41204785b443ce2d1dca4bf50070c492567"
Random Bytes32 Hex Value used as an idempotency key for fund creation. If not provided, backend will generate one. Note: Off-chain creation requests without salt will not have idempotency guarantees on retries.
Example:
"0x7189b9ff31064f2bbc98ad4e92e5562c00000000000000000000000000000000"
Chain ID to process the fund deployment.
- If not provided, the API will process the fund deployment on the default chain.
- If provided, must be a valid Ethereum chain ID.
- Must be provided if a transaction hash is provided so the backend can fetch the correct deployment from the selected blockchain.
Example:
1
Response
The fund has been successfully created and processed.
Was this page helpful?