Authentication
You will need to authenticate your requests to access any of the endpoints in the Moon Banking API. In this guide, we will look at how authentication works.
API Key with bearer token
To authenticate with the Moon Banking API, use your API key. Your API key should be prepended with Bearer and added to the Authorization header.
Example request with bearer token
curl -G https://api.moonbanking.local/v1/world \
-H "Authorization: Bearer {your_api_key}" \
-H "Moon-Banking-Version: 2025-07-11" \
--data-urlencode "include=scores"Always keep your token safe and reset it if you suspect it has been compromised.
Free and Pro endpoints
Every endpoint requires an API key, but not every endpoint requires a paid plan. Endpoints are labelled with a Free or Pro badge beside their method and path.
Pro is the default and covers the bulk of the API — bank records, scores, votes, stories, markets, stocks, and search.
Free endpoints work with an API key from any account, with no subscription, at up to 60 requests per minute. These are the endpoints a bank uses to maintain its own profile. We would rather have your product data current than charge you for the privilege of keeping it that way, so if you are a verified representative of a bank you can automate your catalog without a Pro plan.
| Endpoint | What it does |
|---|---|
POST /banks/{bankId}/products | Add a product to the bank's profile. |
GET /banks/{bankId}/managed-products | Retrieve every product on the bank's profile, including drafts and archived entries that the public list omits. |
PUT /banks/{bankId}/products/{id} | Replace a product's details. |
DELETE /banks/{bankId}/products/{id} | Permanently remove a product from the bank's profile. |
PUT /banks/{bankId}/products/{id}/status | Move a product between draft, published, and archived without resubmitting its details. |
Claiming a bank profile is not part of the API. A representative claims their bank in the Moon Banking web app, and once the claim is approved the endpoints above will accept that account’s API key for that bank.
Using an SDK
If you use one of our official SDKs, you will not have to worry about any of the above. Take a look at the documentation for any of the resources to see how your chosen SDK handles authentication.