API Quickstart

Get up and running with the Open Ledger API in minutes.

Prerequisites:
  • Node.js v16+ for React integration
  • React v18+ for React Hooks
  • Package manager (npm, yarn, or pnpm)
  • Open Ledger account with API credentials
1

Request an API Key

Contact our team at openledger.com/contact to request API credentials for your integration.

Your API secret will only be provided once. Make sure to store it securely. If lost, you’ll need to contact us for a new key.

Open Ledger provides different environments for development and production:

EnvironmentBase URLPurpose
Staginghttps://api-staging.openledger.comPre-production testing with your actual data
Productionhttps://api.openledger.comLive production environment
2

Authenticate with the API

First, you’ll need to generate an access token using your developer credentials:

$curl -X POST https://api.openledger.com/v1/developers/auth/generate-token \
> -H "Content-Type: application/json" \
> -d '{
> "developerId": "your-developer-id",
> "apiKey": "your-api-key"
> }'

The response will contain your access token:

1{
2 "access_token": "eyJhbGciOiJIUzI1NiIs...",
3 "token_type": "Bearer",
4 "expires_in": 3600
5}

Save this token - you’ll need it for all subsequent API calls in the Authorization header as Bearer {access_token}.

3

Create Your First Entity

An “entity” in Open Ledger represents a set of financial records for your business. Create one using the access token:

$curl -X POST https://api.openledger.com/v1/entities \
> -H "Authorization: Bearer your-access-token" \
> -H "Content-Type: application/json" \
> -d '{
> "externalId": "acme-123",
> "tin": "123456789",
> "us_stdate": "DC",
> "entityType": "LLC",
> "phoneNumber": "555-123-4567",
> "status": "ACTIVE",
> "developer_id": "your-developer-id"
> }'

The response will include your new entity’s ID, which you’ll need for future API calls.

4

Explore the API with Postman

We provide a Postman collection to help you explore all available endpoints:

  1. Download the Open Ledger API Postman Collection
  2. Import the collection into Postman
  3. Create a new environment with these variables:
    • bearerToken: Your access token
    • developerId: Your developer ID
    • apiKey: Your API key
    • entityId: The ID of the entity you just created
  4. Start exploring the API endpoints

The Postman collection includes examples for all major API endpoints, including transactions, accounts, and reports.

Next Steps

Now that you’ve implemented Open Ledger, explore these resources to enhance your integration:

Support

For enterprise support and custom integrations, please contact our sales team.