REST API

Accounts API

List the bank accounts belonging to the authenticated entity. Read-only — accounts are provisioned during onboarding and cannot be created via the API.

Required scopes#

All account endpoints require the accounts:read scope.

Account object#

The response shape differs per deployment. You are viewing the MAD deployment, so accounts look like this:

account.json
{
  "id": "01964a3b-0000-7000-8000-ac6000000a01",
  "name": "Operations",
  "status": "open",
  "currency_code": "MAD",
  "balance": "15420.50",
  "rib": "007780000123456789012345",
  "created_at": "2026-01-15T09:00:00Z",
  "updated_at": "2026-04-01T14:22:00Z"
}

List accounts#

GET /api/accounts

Supports filtering by status and currency_code, plus cursor pagination.

request.sh
curl "https://ma.manza.dev/api/accounts?status=open" \
  -H "Authorization: Bearer sk_live_..."
manza
manza accounts list --status open
app.js
import { Manza } from "@getmanza/sdk";
const manza = new Manza({ apiKey: process.env.MANZA_API_KEY });

await manza.accounts.list({ status: "open" });
app.rb
require "manza"
manza = Manza.new(api_key: ENV["MANZA_API_KEY"])

manza.accounts.list(status: "open")
app.py
from manza import Manza
client = Manza()  # reads MANZA_API_KEY

client.accounts.list(status="open")
main.go
import manza "github.com/getmanza/manza-go/v2"

client, _ := manza.New(manza.WithAPIKey(os.Getenv("MANZA_API_KEY")))

page, err := client.Accounts.List(ctx, manza.AccountListParams{Status: "open"})
main.rs
let client = manza::Client::builder()
    .api_key(std::env::var("MANZA_API_KEY")?)
    .build()?;

let params = manza::AccountListParams { status: Some("open".into()), ..Default::default() };
let page = client.accounts().list(params)?;
app.exs
{:ok, client} = Manza.new(api_key: System.fetch_env!("MANZA_API_KEY"))

{:ok, page} = Manza.Accounts.list(client, status: "open")
app.cr
require "manza"

client = Manza::Client.new # reads MANZA_API_KEY

page = client.accounts.list(status: "open")
app.php
use Manza\Client;

$client = new Client(apiKey: getenv('MANZA_API_KEY'));

$page = $client->accounts->list(status: 'open');
response.json
{
  "data": [
    {
      "id": "01964a3b-0000-7000-8000-ac6000000a01",
      "name": "Operations",
      "status": "open",
      "currency_code": "MAD",
      "balance": "15420.50",
      "rib": "007780000123456789012345",
      "created_at": "2026-01-15T09:00:00Z",
      "updated_at": "2026-04-01T14:22:00Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}

Get account#

GET /api/accounts/:id

Returns the full account object. Responds 404 not_found_error if the account does not exist or belongs to another entity.

request.sh
curl "https://ma.manza.dev/api/accounts/01964a3b-0000-7000-8000-ac6000000a01" \
  -H "Authorization: Bearer sk_live_..."
manza
manza accounts get 01964a3b-0000-7000-8000-ac6000000a01
app.js
import { Manza } from "@getmanza/sdk";
const manza = new Manza({ apiKey: process.env.MANZA_API_KEY });

await manza.accounts.get("01964a3b-0000-7000-8000-ac6000000a01");
app.rb
require "manza"
manza = Manza.new(api_key: ENV["MANZA_API_KEY"])

manza.accounts.get("01964a3b-0000-7000-8000-ac6000000a01")
app.py
from manza import Manza
client = Manza()  # reads MANZA_API_KEY

client.accounts.get("01964a3b-0000-7000-8000-ac6000000a01")
main.go
import manza "github.com/getmanza/manza-go/v2"

client, _ := manza.New(manza.WithAPIKey(os.Getenv("MANZA_API_KEY")))

account, err := client.Accounts.Get(ctx, "01964a3b-0000-7000-8000-ac6000000a01")
main.rs
let client = manza::Client::builder()
    .api_key(std::env::var("MANZA_API_KEY")?)
    .build()?;

let account = client.accounts().get("01964a3b-0000-7000-8000-ac6000000a01")?;
app.exs
{:ok, client} = Manza.new(api_key: System.fetch_env!("MANZA_API_KEY"))

{:ok, account} = Manza.Accounts.get(client, "01964a3b-0000-7000-8000-ac6000000a01")
app.cr
require "manza"

client = Manza::Client.new # reads MANZA_API_KEY

account = client.accounts.get("01964a3b-0000-7000-8000-ac6000000a01")
app.php
use Manza\Client;

$client = new Client(apiKey: getenv('MANZA_API_KEY'));

$account = $client->accounts->get('01964a3b-0000-7000-8000-ac6000000a01');

Transactions#

GET /api/accounts/:account_id/transactions

Read-only records of money movement on an account, newest posted_at first, with cursor pagination so backfilled records don't reorder pages. The embedded account projection carries the same market identifier as the account object above.

request.sh
curl "https://ma.manza.dev/api/accounts/01964a3b-0000-7000-8000-ac6000000a01/transactions?limit=25" \
  -H "Authorization: Bearer sk_live_..."
manza
manza transactions list --account-id 01964a3b-0000-7000-8000-ac6000000a01
app.js
import { Manza } from "@getmanza/sdk";
const manza = new Manza({ apiKey: process.env.MANZA_API_KEY });

await manza.accounts.listTransactions("01964a3b-0000-7000-8000-ac6000000a01");
app.rb
require "manza"
manza = Manza.new(api_key: ENV["MANZA_API_KEY"])

manza.accounts.list_transactions("01964a3b-0000-7000-8000-ac6000000a01")
app.py
from manza import Manza
client = Manza()  # reads MANZA_API_KEY

client.accounts.list_transactions("01964a3b-0000-7000-8000-ac6000000a01")
main.go
import manza "github.com/getmanza/manza-go/v2"

client, _ := manza.New(manza.WithAPIKey(os.Getenv("MANZA_API_KEY")))

page, err := client.Accounts.ListTransactions(ctx,
    "01964a3b-0000-7000-8000-ac6000000a01", manza.TransactionListParams{})
main.rs
let client = manza::Client::builder()
    .api_key(std::env::var("MANZA_API_KEY")?)
    .build()?;

let page = client.accounts()
    .list_transactions("01964a3b-0000-7000-8000-ac6000000a01", Default::default())?;
app.exs
{:ok, client} = Manza.new(api_key: System.fetch_env!("MANZA_API_KEY"))

{:ok, page} = Manza.Accounts.list_transactions(client, "01964a3b-0000-7000-8000-ac6000000a01")
app.cr
require "manza"

client = Manza::Client.new # reads MANZA_API_KEY

page = client.accounts.list_transactions("01964a3b-0000-7000-8000-ac6000000a01")
app.php
use Manza\Client;

$client = new Client(apiKey: getenv('MANZA_API_KEY'));

$page = $client->accounts->listTransactions('01964a3b-0000-7000-8000-ac6000000a01');
transactions.json
{
  "data": [
    {
      "id": "01964a3b-7c8d-7000-8000-a10000000001",
      "account_id": "01964a3b-0000-7000-8000-ac6000000a01",
      "operation": "credit",
      "amount": "1500.00",
      "currency_code": "MAD",
      "account_balance_after": "15420.50",
      "internal_transfer": false,
      "other_name": "Acme Corp",
      "source_type": "transfer",
      "source_id": "01964a3b-0000-7000-8000-transfer001",
      "transaction_type": "External Transfer",
      "reference": "INV-000042",
      "transfer_id": "01964a3b-0000-7000-8000-transfer001",
      "posted_at": "2026-04-01T14:22:00Z",
      "value_date": "2026-04-01",
      "created_at": "2026-04-01T14:22:00Z",
      "updated_at": "2026-04-01T14:22:00Z",
      "account": {
        "id": "01964a3b-0000-7000-8000-ac6000000a01",
        "name": "Operations",
        "currency_code": "MAD",
        "rib": "007780000123456789012345"
      }
    }
  ],
  "has_more": false,
  "next_cursor": null
}

Source and type values#

source_type says what a transaction is about, and source_id names it. A fee or a reversal names its parent's source. Both fields are open sets: Manza adds values as it adds products, so handle one you do not know instead of failing on it.

source_typeThe transaction is about
transferA transfer; transfer_id is set
card_paymentA payment with a Manza card; card_payment_id is set
card_topupA card payment received (a payment link, checkout session or top-up); card_topup_id is set
bill_paymentA bill payment or a mobile top-up
postingNothing else, such as a balance adjustment; source_id is the posting

transaction_type is a display label: External Transfer, Internal Transfer, Card Payment, Card Refund, Card Reservation, Card Withdrawal, Card Top-up, Card Payment Refund (a card payment you received, refunded to the payer), Card Payment Reversed (one taken back from your account), Card Payment Reversal Undone (that money given back), Chargeback, Bill Payment, Mobile Top-up, and Unknown for most rows with no source.

Get transaction#

GET /api/accounts/:account_id/transactions/:id

Returns a single transaction. Responds 404 not_found_error if the account or transaction does not exist, or the transaction belongs to a different account.

transaction.json
{
  "id": "01964a3b-7c8d-7000-8000-a10000000001",
  "account_id": "01964a3b-0000-7000-8000-ac6000000a01",
  "operation": "credit",
  "amount": "1500.00",
  "currency_code": "MAD",
  "account_balance_after": "15420.50",
  "internal_transfer": false,
  "other_name": "Acme Corp",
  "source_type": "transfer",
  "source_id": "01964a3b-0000-7000-8000-transfer001",
  "transaction_type": "External Transfer",
  "reference": "INV-000042",
  "transfer_id": "01964a3b-0000-7000-8000-transfer001",
  "posted_at": "2026-04-01T14:22:00Z",
  "value_date": "2026-04-01",
  "created_at": "2026-04-01T14:22:00Z",
  "updated_at": "2026-04-01T14:22:00Z",
  "account": {
    "id": "01964a3b-0000-7000-8000-ac6000000a01",
    "name": "Operations",
    "currency_code": "MAD",
    "rib": "007780000123456789012345"
  }
}

Error responses#

ScenarioStatusType
Missing accounts:read scope403insufficient_scope
Unknown or cross-entity id404not_found_error
Invalid status value400invalid_request_error
Invalid cursor400invalid_request_error