POST/trees
Plant one or more trees.
Creates a request to plant a specified number of trees in a chosen project. This is the primary endpoint for initiating tree planting.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| project_id* | body | string | The ID of the planting project. Find project IDs on our Projects page or via a future API endpoint. |
| quantity* | body | integer | The number of trees to plant. Must be a positive integer. |
| user_identifier | body | string | An optional identifier for the user or entity on whose behalf the tree is planted (e.g., customer ID, employee ID). |
| metadata | body | object | Optional. A flat object for storing custom key-value pairs related to this planting request (e.g., order_id, campaign_name). Max 5 keys. |
Example Request
{
"project_id": "amazon_regeneration_project_xyz",
"quantity": 1,
"user_identifier": "customer_12345",
"metadata": {
"order_id": "ORD-2023-ABC",
"campaign": "EarthMonth2023"
}
}Example Response (200 OK)
{
"success": true,
"message": "Tree planting request received successfully.",
"planting_request_id": "pr_1a2b3c4d5e6f7g8h9i",
"trees_requested": 1,
"project_id": "amazon_regeneration_project_xyz",
"status": "pending_verification"
}