This API is currently in closed beta and not publicly available

Introduction

Getting Started

This page will walk you through the basics of setting up and making your first request to the One Tribe Carbon Offset Projects API.

Prerequisites

  • A valid API key (contact One Tribe to request an API key)
  • Basic understanding of RESTful APIs
  • Ability to make HTTPS requests

Base URL

All API requests should be made to:

https://api.onetribe.com/v1

Any future versions will increment the version number (e.g. /v2) to maintain backwards compatibility.

Authentication

Include your API key in the Authorisation header with every request:

Authorisation: API-Key YOUR_API_KEY_HERE

Note: Keep your API key secure and never expose it publicly.

Example Requests

Using curl

curl "https://api.onetribe.com/v1/projects/offset" \
  -H "Authorisation: API-Key YOUR_API_KEY_HERE"

Using TypeScript

const API_KEY = 'YOUR_API_KEY_HERE'
const BASE_URL = 'https://api.onetribe.com/v1'

async function getProjects() {
  try {
    const response = await fetch(`${BASE_URL}/projects/offset`, {
      headers: {
        Authorisation: `API-Key ${API_KEY}`,
      },
    })

    if (!response.ok) {
      throw new Error(`HTTP error! status: ${response.status}`)
    }

    const data = await response.json()
    return data
  } catch (error) {
    console.error('Error fetching projects:', error)
    throw error
  }
}

Next Steps

Previous
Introduction