GET /v1/credits — Get Your Organization’s Tree Credit Balance

Retrieves the current tree credit balance for the authenticated organization.

Base URL

https://api.bloomy.earth

Endpoint

/v1/credits

Authentication & Headers

Authentication uses HTTP Basic Auth with your Bloomy Earth API credentials. You must use your Bloomy Earth platform username and application password.

You can find and manage these credentials in your Bloomy Earth dashboard, in the Integration API section:
👉 https://www.bloomy.earth/dashboard/#bloomy-integration-api

Headers

Header Value Required Description
Authorization Basic BASE64(username:pwd) Yes Basic Auth using your Bloomy Earth username and application password.
Accept application/json Optional Specifies JSON format for the response.

Example Request

curl -X GET "https://api.bloomy.earth/v1/credits" \
  -u YOUR_BLOOMY_USERNAME:YOUR_APPLICATION_PASSWORD \
  -H "Accept: application/json"


JSON Response (200)

{
  "credits": 19,
  "organizationId": 12345
}

Response Fields

Field Type Description
credits integer Number of available tree credits for the organization.
organizationId integer ID of the organization associated with the credit balance.

Errors

If the request is missing required data or contains invalid parameters, the API returns a JSON object with an error code and a short message.

HTTP Error code Message Description
400 invalid_request Bad request. The request is malformed.
401 unauthorized Authentication required. The Authorization header was missing or invalid.
403 forbidden Authentication failed. The provided credentials are invalid or lack permissions.
500 server_error Internal server error. An unexpected error occurred on the server.

Error Format

{
  "error": "forbidden",
  "message": "Authentication failed."
}