OpenAPI Specification
openapi: 3.1.0
info:
title: Wren Credits Portfolios API
description: The Wren API is a JSON REST API that lets you offset carbon dioxide through Wren's portfolio of verified carbon sequestration projects. Create offset orders by tonnage, fund specific projects by dollar amount, plant trees, manage a prepaid credit balance, and list portfolios, purchases, and donations. Most endpoints require an API token (team live token, wren_test_ sandbox token, or legacy personal token) via HTTP Basic or Bearer auth.
version: '2026-07-21'
contact:
name: Wren Support
email: support@wren.co
url: https://www.wren.co/faq
termsOfService: https://www.wren.co/terms-of-use
servers:
- url: https://www.wren.co
description: Production
security:
- basicAuth: []
- bearerAuth: []
tags:
- name: Portfolios
description: List available portfolios and their projects
paths:
/api/portfolios:
get:
operationId: listPortfolios
tags:
- Portfolios
summary: List available portfolios and projects
description: Returns all available portfolios and their project allocations. Works without authentication (preset portfolios only); with a token it may include the user's custom portfolio.
security: []
parameters:
- name: expanded
in: query
required: false
description: If present, returns full CamelCase portfolio objects instead of the public snake_case format.
schema:
type: string
responses:
'200':
description: Available portfolios
content:
application/json:
schema:
type: object
properties:
portfolios:
type: array
items:
$ref: '#/components/schemas/Portfolio'
examples:
live:
summary: Live response excerpt (fetched 2026-07-21)
value:
portfolios:
- id: 21
name: Trailblazer
description: A portfolio focused on cutting-edge carbon removal technology.
cost_per_ton: 401.71
image_url: https://projectwren.imgix.net/trailblazer/trailblazer-icon-square.png
projects:
- id: 18
name: Biochar carbon removal
cost_per_ton: 242.86
percentage: 0.2099
certification_status: standard 2023
components:
schemas:
Portfolio:
type: object
properties:
id:
type: integer
name:
type: string
description:
type: string
cost_per_ton:
type: number
description: Portfolio-level cost in USD per ton.
image_url:
type: string
projects:
type: array
items:
$ref: '#/components/schemas/Project'
Project:
type: object
properties:
id:
type: integer
name:
type: string
description:
type: string
cost_per_ton:
type: number
percentage:
type: number
description: Allocation fraction (e.g. 0.2 = 20%).
image_url:
type: string
certification_status:
type: string
securitySchemes:
basicAuth:
type: http
scheme: basic
description: 'Recommended for curl: pass the API token as the username with an empty password (-u [api_token]:). Token types: team live token (UUID), team test token (wren_test_ prefix, sandbox), legacy personal token (UUID).'
bearerAuth:
type: http
scheme: bearer
description: 'Authorization: Bearer [api_token] with the same token types as Basic auth.'
externalDocs:
description: Wren API Documentation
url: https://www.wren.co/docs/api
x-provenance:
generated: '2026-07-21'
method: derived
source:
- https://www.wren.co/docs/api
- https://www.wren.co/docs/api/wren-api.postman_collection.json
- https://www.wren.co/docs/api/offset-orders
- https://www.wren.co/docs/api/project-orders
- https://www.wren.co/docs/api/tree-orders
- https://www.wren.co/docs/api/portfolios
- https://www.wren.co/docs/api/purchases
- https://www.wren.co/docs/api/project-donations
- https://www.wren.co/docs/api/credits
note: Wren publishes complete REST reference documentation and a Postman collection but no OpenAPI document. This spec was derived faithfully from the published docs and collection by the API Evangelist enrichment pipeline; it is not an official Wren artifact.