Getting started

# Clients & SDKs

Talk to the Manza API from the terminal, a script, or your app. Every endpoint in these docs shows a request in all ten clients below — this page is how you install and authenticate each one.

## The official clients

Manza ships nine maintained clients plus plain `curl`. They all read the same `MANZA_API_KEY` / `MANZA_BASE_URL` environment variables and target the same REST API, so pick whichever fits your stack. Each is open source on GitHub:

- CLI — [GitHubgetmanza/cli](https://github.com/getmanza/cli)
- JavaScript / TypeScript — [GitHubgetmanza/manza-ts](https://github.com/getmanza/manza-ts)
- Ruby — [GitHubgetmanza/manza-ruby](https://github.com/getmanza/manza-ruby)
- Python — [GitHubgetmanza/manza-python](https://github.com/getmanza/manza-python)
- Go — [GitHubgetmanza/manza-go](https://github.com/getmanza/manza-go)
- Rust — [GitHubgetmanza/manza-rust](https://github.com/getmanza/manza-rust)
- Elixir — [GitHubgetmanza/manza-elixir](https://github.com/getmanza/manza-elixir)
- Crystal — [GitHubgetmanza/manza-crystal](https://github.com/getmanza/manza-crystal)
- PHP — [GitHubgetmanza/manza-php](https://github.com/getmanza/manza-php)

## Authentication

Every client authenticates with an API key you generate from **Settings → Developer → API Keys**. Keep it in the `MANZA_API_KEY` environment variable rather than hardcoding it — all eight SDKs read it automatically:

```shell
export MANZA_API_KEY="sk_live_..."
```

> **Sandbox first:** Start with a staging key against the sandbox base URL, then mint a production key and switch `MANZA_BASE_URL` when you go live. See the Sandbox & test cards guide.

## curl

No install — every request is a signed HTTP call. Pass your key as a `Bearer` token:

```shell
curl "https://ma.manza.dev/api/entity" \
  -H "Authorization: Bearer $MANZA_API_KEY"
```

## CLI

[GitHubView on GitHub](https://github.com/getmanza/cli)

A single self-contained binary (the Bun runtime is bundled — no Node, Bun, or Ruby needed). Install via Homebrew or npm:

```shell
# Homebrew (macOS / Linux)
brew install getmanza/tap/manza

# or npm (thin shim that fetches the platform binary)
npm install -g @getmanza/cli
```

Authenticate once, then call any endpoint:

```shell
# interactive login, or pipe a key in for CI:
printf '%s\n' "$MANZA_API_KEY" | manza login --api-key-stdin

manza accounts list
```

The login is stored in `~/.config/manza/config.json`. The CLI also reads `MANZA_API_KEY`, `MANZA_BASE_URL`, `MANZA_API_VERSION` (the `Manza-Version` header) and `MANZA_TIMEOUT_MS` (default 30000). Run `manza --help` or `manza <resource> --help` for the command list, or `manza request <method> <path>` to call any endpoint directly.

## JavaScript / TypeScript

[GitHubView on GitHub](https://github.com/getmanza/manza-ts)

Runtime-agnostic (Node 20+, Bun, Deno, browsers, Workers). Install `@getmanza/sdk` with your package manager:

```shell
bun add @getmanza/sdk    # or npm / pnpm / yarn
```

```javascript
import { Manza } from "@getmanza/sdk";

// Node/Bun: process.env is available. Browsers and Workers have no
// process.env, so pass apiKey explicitly there.
const manza = new Manza({ apiKey: process.env.MANZA_API_KEY });

const accounts = await manza.accounts.list();
```

## Ruby

[GitHubView on GitHub](https://github.com/getmanza/manza-ruby)

Published as `manza` on RubyGems. Add it to your Gemfile:

```ruby
gem "manza"
```

```ruby
require "manza"

manza = Manza.new(api_key: ENV["MANZA_API_KEY"])

accounts = manza.accounts.list
```

## Python

[GitHubView on GitHub](https://github.com/getmanza/manza-python)

Requires Python 3.11+. Install `manza` from PyPI:

```shell
pip install manza
```

```python
from manza import Manza

# Picks up MANZA_API_KEY from the environment by default.
client = Manza()

accounts = client.accounts.list()
```

## Go

[GitHubView on GitHub](https://github.com/getmanza/manza-go)

Requires Go 1.24+; no runtime dependencies outside the standard library. Install with `go get`:

```shell
go get github.com/getmanza/manza-go
```

```go
import manza "github.com/getmanza/manza-go"

// Reads MANZA_API_KEY from the environment by default.
client, err := manza.New()

accounts, err := client.Accounts.List(ctx, manza.AccountListParams{})
```

## Rust

[GitHubView on GitHub](https://github.com/getmanza/manza-rust)

Add the `manza` crate from crates.io:

```shell
cargo add manza
```

```rust
// Falls back to the MANZA_API_KEY env var when api_key isn't set.
let client = manza::Client::builder()
    .api_key(std::env::var("MANZA_API_KEY")?)
    .build()?;

let accounts = client.accounts().list(Default::default())?;
```

## Elixir

[GitHubView on GitHub](https://github.com/getmanza/manza-elixir)

Add `:manza` from Hex to the deps in your `mix.exs`:

```elixir
{:manza, "~> 1.0"}
```

```elixir
# :api_key defaults to the MANZA_API_KEY env var.
{:ok, client} = Manza.new(api_key: System.fetch_env!("MANZA_API_KEY"))

{:ok, accounts} = Manza.Accounts.list(client)
```

## Crystal

[GitHubView on GitHub](https://github.com/getmanza/manza-crystal)

Install `manza` as a GitHub dependency in your `shard.yml`:

```yaml
dependencies:
  manza:
    github: getmanza/manza-crystal
```

```crystal
require "manza"

client = Manza::Client.new # reads MANZA_API_KEY

accounts = client.accounts.list
```

## PHP

[GitHubView on GitHub](https://github.com/getmanza/manza-php)

Requires PHP 8.2+. Install `manza/manza-php` with Composer:

```shell
composer require manza/manza-php
```

```php
use Manza\Client;

// apiKey defaults to the MANZA_API_KEY env var.
$client = new Client(apiKey: getenv('MANZA_API_KEY'));

$accounts = $client->accounts->list();
```