Developers
API referenceRecipients

Create a recipient

POST
/recipients

Assigns trees trees from your unassigned trees to a new recipient and issues a personal certificate. The trees come from the oldest unassigned allocation first, from project when given. Fails with 422 no_trees_available when your company has too few unassigned trees; pledge more trees at the Foundation first.

Requires an Idempotency-Key. Send external_reference (your order or customer number) so the same customer can never be created twice.

The certificate is generated right after the response; certificate is null until then and the certificate.created webhook tells you when it is ready. With send_email the recipient receives it by email in their language.

Scope: recipients:write.

Authorization

bearerAuth
AuthorizationBearer <token>

A Platform API token, wyc_live_... or wyc_test_..., created at Settings > API tokens in the dashboard.

In: header

Header Parameters

Idempotency-Key*string

Unique key per action (for example a UUID). The same key replays the stored response for 24 hours, see the Idempotency guide.

Lengthlength <= 255

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/recipients" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "first_name": "Jane",    "last_name": "Doe",    "email": "jane@example.com",    "language": "nl",    "trees": 1,    "external_reference": "ORDER-5012",    "message": "Thank you for your order.",    "send_email": true  }'
{  "id": "rcp_1vT9yN6pDmQ2xL7rCkZa8bW3",  "object": "recipient",  "livemode": true,  "first_name": "Jane",  "last_name": "Doe",  "email": "jane@example.com",  "language": "nl",  "external_reference": "ORDER-5012",  "trees": 1,  "project": "prj_9Lp3xW7mQv2kT8bZa4yR6cN1",  "message": "Thank you for your order.",  "source": "api",  "certificate": null,  "allocations": [    "alloc_6yN3pDmQ2xL7rCkZa8bW1vT9"  ],  "email_sent_at": null,  "claimed_at": null,  "created_at": "2026-09-28T09:15:00Z",  "updated_at": "2026-09-28T09:15:05Z"}