Update fund
curl --request PUT \
--url https://api.endaoment.org/v1/funds/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Education Support Fund",
"description": "This fund supports educational initiatives...",
"type": "Community",
"logoUrl": "https://example.com/logo.png"
}
'import requests
url = "https://api.endaoment.org/v1/funds/{id}"
payload = {
"name": "Education Support Fund",
"description": "This fund supports educational initiatives...",
"type": "Community",
"logoUrl": "https://example.com/logo.png"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Education Support Fund',
description: 'This fund supports educational initiatives...',
type: 'Community',
logoUrl: 'https://example.com/logo.png'
})
};
fetch('https://api.endaoment.org/v1/funds/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Education Support Fund',
'description' => 'This fund supports educational initiatives...',
'type' => 'Community',
'logoUrl' => 'https://example.com/logo.png'
]),
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/{id}"
payload := strings.NewReader("{\n \"name\": \"Education Support Fund\",\n \"description\": \"This fund supports educational initiatives...\",\n \"type\": \"Community\",\n \"logoUrl\": \"https://example.com/logo.png\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.endaoment.org/v1/funds/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Education Support Fund\",\n \"description\": \"This fund supports educational initiatives...\",\n \"type\": \"Community\",\n \"logoUrl\": \"https://example.com/logo.png\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.endaoment.org/v1/funds/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Education Support Fund\",\n \"description\": \"This fund supports educational initiatives...\",\n \"type\": \"Community\",\n \"logoUrl\": \"https://example.com/logo.png\"\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"
},
"donor": {
"firstName": "John",
"lastName": "Doe",
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"status": "Active",
"managementMode": "Self",
"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",
"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>"
}Funds
Update fund
Updates an existing fund’s information. Permissioned users may edit a fund.
PUT
/
v1
/
funds
/
{id}
Update fund
curl --request PUT \
--url https://api.endaoment.org/v1/funds/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Education Support Fund",
"description": "This fund supports educational initiatives...",
"type": "Community",
"logoUrl": "https://example.com/logo.png"
}
'import requests
url = "https://api.endaoment.org/v1/funds/{id}"
payload = {
"name": "Education Support Fund",
"description": "This fund supports educational initiatives...",
"type": "Community",
"logoUrl": "https://example.com/logo.png"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Education Support Fund',
description: 'This fund supports educational initiatives...',
type: 'Community',
logoUrl: 'https://example.com/logo.png'
})
};
fetch('https://api.endaoment.org/v1/funds/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Education Support Fund',
'description' => 'This fund supports educational initiatives...',
'type' => 'Community',
'logoUrl' => 'https://example.com/logo.png'
]),
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/{id}"
payload := strings.NewReader("{\n \"name\": \"Education Support Fund\",\n \"description\": \"This fund supports educational initiatives...\",\n \"type\": \"Community\",\n \"logoUrl\": \"https://example.com/logo.png\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.endaoment.org/v1/funds/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Education Support Fund\",\n \"description\": \"This fund supports educational initiatives...\",\n \"type\": \"Community\",\n \"logoUrl\": \"https://example.com/logo.png\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.endaoment.org/v1/funds/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Education Support Fund\",\n \"description\": \"This fund supports educational initiatives...\",\n \"type\": \"Community\",\n \"logoUrl\": \"https://example.com/logo.png\"\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"
},
"donor": {
"firstName": "John",
"lastName": "Doe",
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"status": "Active",
"managementMode": "Self",
"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",
"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>"
}Authorizations
Path Parameters
Body
application/json
Response
Fund successfully updated
Was this page helpful?