The tree planting API — add verified impact in one call.
Plant trees and rescue ocean-bound plastic. REST API with synchronous confirmation and verified impact data in every response. Ship in an afternoon, not a quarter.
curl -X POST https://app.thegoodapi.com/plant/trees \
-H "Authorization: test_sk_your_key" \
-H "Content-Type: application/json" \
-d '{
"count": 3,
"attribution": "order_8294",
"metadata": {"customer": "cus_k29f"}
}' {
"total_planted_trees": 4847,
"total_planted_trees_month": 312,
"tree_details": [{
"id": "tr_8f3k2m9x",
"count": 3,
"created_at": "2026-05-19T14:32:07Z",
"attribution": "order_8294",
"metadata": {"customer": "cus_k29f"},
"refunded": false
}]
} // Plant trees on every order
const response = await fetch("https://app.thegoodapi.com/plant/trees", {
method: "POST",
headers: {
"Authorization": process.env.GOODAPI_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
count: 3,
attribution: order.id,
metadata: { customer: order.customer_id },
idempotency_key: `trees_${order.id}`,
}),
});
const { tree_details } = await response.json();
console.log(tree_details[0].id); // "tr_8f3k2m9x" Developer-first by design.
No SDKs to install, no webhooks to configure, no dashboard you have to click through. One endpoint, one response, verified impact.
REST + JSON
Standard HTTP. No proprietary SDK, no GraphQL, no SOAP. POST JSON, get JSON back. Works with any language, any framework.
Synchronous response
Planting confirmation in the response body. No polling, no async callbacks. Your checkout flow doesn't wait on a webhook.
Idempotent by design
Pass an idempotency_key on any POST. Retries are safe. Duplicate calls return the original response without double-billing.
Test mode
Separate test and production keys. Test calls are free, hit the real API surface, and never generate charges. Ship with confidence.
Verification in the payload
Every response includes a registration ID, timestamp, and running totals. The /evidence endpoint returns GPS coordinates, project regions, and photo/video proof.
Refunds built in
Customer refund? POST /refund/trees or /refund/plastic_bottles with the registration ID. Supports partial refunds. Billing adjusts automatically.
One pattern. Every impact type.
Trees and plastic follow the same REST conventions. Learn one, you know them both.
/plant/trees Plant trees. Returns confirmed registration with ID, count, and running totals.
/plant/trees List plantings. Filter by attribution, date range, metadata, or registration ID.
/refund/trees Refund a registration (full or partial). Adjusts billing automatically.
/rescue/plastic_bottles Rescue ocean-bound plastic bottles. Same request shape as /plant/trees.
/rescue/plastic_bottles List bottle rescues. Same filters as tree listings.
/refund/plastic_bottles Refund a bottle rescue (full or partial). Adjusts billing automatically.
/evidence Aggregated verification data: GPS regions, countries, photo/video evidence, carbon stats.
/evidence/tree/{id} Full tree lifecycle timeline: registration, funds, allocation, planting — with GPS, crew, and photo proof.
/dashboard_url Get your public impact dashboard URL. Embed it or link to it from your app.
What developers build with it.
Checkout flows
Plant trees or rescue plastic on every order. One POST per transaction.
Employee milestones
Plant a tree for every performance review, work anniversary, or promotion.
Impact dashboards
Pull planting totals and evidence data into your own UI. White-label it all.
In-game events
Plant real trees during seasonal events. Give players tangible impact.
Onboarding gifts
Welcome every new user with a planted tree. Memorable and zero logistics.
Checkout flows
Plant trees or rescue plastic on every order. One POST per transaction.
Employee milestones
Plant a tree for every performance review, work anniversary, or promotion.
Impact dashboards
Pull planting totals and evidence data into your own UI. White-label it all.
In-game events
Plant real trees during seasonal events. Give players tangible impact.
Onboarding gifts
Welcome every new user with a planted tree. Memorable and zero logistics.
Loyalty programs
Let customers redeem points for trees or ocean cleanup instead of discounts.
Event registrations
Plant a tree for every conference attendee or webinar signup.
Newsletter signups
Plant a tree for every new subscriber. Show the running total in your emails.
Community milestones
Plant a tree every 250 messages, 1,000 posts, or hit a custom goal.
Brand campaigns
"We plant a tree for every signup this week." Run it with one endpoint.
Loyalty programs
Let customers redeem points for trees or ocean cleanup instead of discounts.
Event registrations
Plant a tree for every conference attendee or webinar signup.
Newsletter signups
Plant a tree for every new subscriber. Show the running total in your emails.
Community milestones
Plant a tree every 250 messages, 1,000 posts, or hit a custom goal.
Brand campaigns
"We plant a tree for every signup this week." Run it with one endpoint.
What comes back in the API.
GoodAPI partners with Veritree for tree planting and Plastic Bank for ocean plastic. Here's what you can surface to your users from API data alone.
- ✓Registration ID — unique, permanent reference for the impact event.
- ✓Count — exact trees planted or bottles rescued, with fractional support.
- ✓Timestamp — RFC 3339, so you know exactly when it was recorded.
- ✓Running totals — lifetime and current-month counts for your org.
- ✓Your metadata — attribution and custom fields echoed back for reconciliation.
- ✓Lifecycle status — registered, funds distributed, allocated, or planted.
- ✓Partner order ID — Veritree invoice reference for audit trails.
- ✓Planting site — GPS coordinates, site name, and local partner org.
- ✓Crew details — team leader, planting method, team size, women members.
- ✓Field media — geotagged photos and videos from the actual planting event.
- ✓GPS-tagged regions — named planting sites with country and project data.
- ✓Photo & video evidence — URLs to verification media from planting sessions.
- ✓Carbon offset estimate — total CO₂ tonnes sequestered across your plantings.
- ✓Area restored — hectares of habitat restored, aggregated across projects.
- ✓Public dashboard — embeddable URL from /dashboard_url for customer-facing proof.
Pay per impact. Nothing else.
No monthly fee. No seat-based pricing. No minimum commit. You pay for the impact you create.
POST /plant/trees and POST /rescue/plastic_bottles is metered as usage and reported to Stripe asynchronously. You're billed monthly. Refunds within the current billing cycle adjust your invoice automatically. Need volume pricing? Email saif@thegoodapi.com.
Common questions.
Is there a minimum volume or commitment? +
How fast is the API? +
What authentication does it use? +
Do you support idempotency? +
Can I attach metadata to each action? +
What about refunds? +
Can I track individual tree lifecycle? +
Get your API key.
Sign up, grab your test key, plant your first tree or rescue your first bottle in under five minutes. Production keys go live the same day.
$0.43 per tree · $0.05 per bottle · No monthly fee · Test mode included