MARBIN← API referenceDevelopers
MARBIN · API guide

Keys and signing in

Every call but /v1/health and the documentation needs a key. Send it in the header, from your server:

curl -H "Authorization: Bearer $MARBIN_KEY" "https://api.marbin.co.uk/v1/universe"

A full key is refused in a web address (?key=): addresses end up in logs. Only a widget key, made for a web page, may ride there, and only from the websites listed on it.

KeyStartsUse
Fullmk_live_…your servers; every endpoint your plan and scopes allow
Widgetmk_pub_live_…a web page: screen, purification and zakat only, from its listed websites
Sandboxmk_sandbox_…every endpoint over fixed sample data; free

Scopes

A key may be limited to some groups of endpoints; a call outside them gets 403.

ScopeEndpoints
shariahShariah screen, purification, zakat, the universe, filings
signalssignals, the model portfolio, the track record
marketthe market and exchange rates
historythe daily history

Keeping keys safe

A key is shown once, when it is made; MARBIN keeps only a fingerprint of it. Keep it in your secrets store, never in code, a repository or a browser.

Every key change -- yours in the partner portal, or MARBIN's -- is in your bank's audit log.