PlatformXeDocs
Get API Key

SDKs & Tools

Official SDKs for TypeScript, Python, and Go, plus Terraform provider

SDKs & Tools

PlatformXe provides official SDKs for three languages plus a Terraform provider for infrastructure-as-code.

TypeScript SDK

npm install @caldera/platformxe-sdk
import { PlatformXeClient } from '@caldera/platformxe-sdk';

const px = new PlatformXeClient({
  apiKey: 'pxk_live_your_key_here',
  // retries: 2,        // default
  // timeoutMs: 10000,  // default
  // failOpen: true,    // default — returns error envelope instead of throwing
});

// Send email
const result = await px.sendEmail({
  to: ['user@example.com'],
  subject: 'Welcome',
  html: '<h1>Hello!</h1>',
});

// Verify the key and the environment
const me = await px.whoami.get();

// Resolve identity (NG / KE / GH / ZA — engine dispatches per country)
// The key must name identity:resolve; purpose is required.
const profile = await px.identity.resolve({
  type: 'BVN',
  value: '22012345678',
  purpose: 'tenant onboarding',
  consent: { granted: true, reference: 'ref_123' },
});

103 methods across all services. Includes retry with exponential backoff, configurable timeout, and circuit breaker (failOpen mode).

Python SDK

pip install "platformxe @ git+https://github.com/calderaxe/platformxe-python@v1.7.0"
from platformxe import PlatformXeClient

client = PlatformXeClient(
    api_key="pxk_live_your_key_here",
    # timeout=10.0,     # default
    # retries=2,        # default
    # fail_open=True,   # default
)

# Send email
client.messaging.send_email(
    to="user@example.com",
    subject="Welcome",
    html="<h1>Hello!</h1>",
    from_="Your App <hello@yourapp.com>",
)

# Verify the key and the environment
me = client.whoami.get()

# Resolve identity
profile = client.identity.resolve(
    "BVN",
    "22012345678",
    purpose="tenant onboarding",
    consent_reference="ref_123",
)

105 methods mirroring the TypeScript SDK (plus accept_federation_membership and pdf.rasterize, both pending in the TypeScript SDK). Uses httpx for HTTP with retry and circuit breaker.

Go SDK

go get github.com/calderaxe/platformxe-go
package main

import (
    "fmt"
    px "github.com/calderaxe/platformxe-go"
)

func main() {
    client := px.NewClient(px.ClientConfig{
        APIKey: "pxk_live_your_key_here",
        // Timeout:  10,    // seconds, default
        // Retries:  2,     // default
        // FailOpen: true,  // default
    })

    // Verify the key and the environment
    me, err := client.Whoami.Get()
    if err != nil {
        panic(err)
    }
    fmt.Println(me)
}

105 methods with zero external dependencies (stdlib net/http only).

Terraform Provider

terraform {
  required_providers {
    platformxe = {
      source = "calderaxe/platformxe"
    }
  }
}

provider "platformxe" {
  api_key = var.platformxe_api_key
}

See the Terraform Provider Guide for full documentation.

SDK Comparison

FeatureTypeScriptPythonGo
Methods103 (105 pending -- pdf.rasterize and accept_federation_membership not yet in TS SDK)105105
RetryExponential backoffExponential backoffExponential backoff
TimeoutConfigurable (10s default)Configurable (10s default)Configurable (10s default)
Circuit BreakerfailOpen modefail_open modeFailOpen mode
DependenciesNone (fetch)httpxNone (stdlib)
Package@caldera/platformxe-sdkplatformxeplatformxe-go