The Foreman API lets your own systems read miner data and take the same actions you take in Foreman, such as rebooting miners, changing pools, creating tickets and managing power events. This guide covers the basics and walks you through your first request. The full, interactive reference is on SwaggerHub.
Before You Start
- Client ID: most endpoints include the client ID in the path. Find it in My Account > API Information. See How To: Find The Client ID.
- API key: for anything long-running, create a service account and use its token, so the integration doesn't depend on one person's account. See How To: Create A Service Account. For quick testing you can use the personal API key shown in My Account.
- The key can do whatever its roles allow. Give a service account only the permissions the integration needs.
Basics
| Item | Value |
|---|---|
| Base URL | https://api.foreman.mn/api/v2 |
| Authentication | Header Authorization: Token <API key>
|
| Format | JSON |
| Paging | List endpoints use limit (up to 500) and offset. To get the next page, increase offset by limit. |
| Rate limits | Some endpoints, such as the miner list and miner summary, can be called at most once per second. Throttled requests get HTTP 429. |
| Errors |
401: no or invalid key. 403: the key can't access that client. 404: the item doesn't exist. |
Your First Request
- Check that you can reach the API (no key needed):
curl https://api.foreman.mn/api/v2/ping
- Check that your key works for your client:
curl -H "Authorization: Token <API key>" https://api.foreman.mn/api/v2/ping/<client ID>
- List your first 100 miners:
curl -H "Authorization: Token <API key>" "https://api.foreman.mn/api/v2/clients/<client ID>/miners?limit=100&offset=0"
The miner list can be filtered, for example by Pickaxe, miner type, IP or IP range, MAC, serial, tag, power mode, pool, worker, Site Map location or miner state. To get retired or in-storage miners, filter by that miner state.
What You Can Do
| Area | Examples |
|---|---|
| Clients | List the clients your key can access, and get or update a client. |
| Miners | List miners, get one miner's full details (including power mode and state), get fleet summaries, add, enable, disable, move or delete miners. |
| Actions | Reboot, change pools (one miner or in bulk), change power mode, change password, set a static IP, blink LEDs, fetch logs. Each returns a command ID you can check with /actions/status/{commandId}, which includes a failure reason if the command fails. |
| Pickaxes | List your Pickaxes and their status. |
| Site Map | Read groups and racks, and set a miner's location. |
| Custom fields and tags | Read custom miner fields and set values, and read tags. |
| Tickets | List, create and delete tickets. You can attach miners, external devices, inventory and assets when creating a ticket. |
| Assets and inventory | List, create, update and delete assets and inventory items, and read their types. Assets include the linked miner's state. |
| Power | Create and run curtailment plans and one-off curtailments, see and cancel runs, and manage dispatches (Dispatches is an add-on). |
| Reports and logs | Run reports and get results, and read miner logs. |
| Reference data | Supported ASICs, firmware, fiat exchange rates and pool keys. |
Power Partners
Utilities and demand response providers use a separate Power Partner API to send dispatches to the Foreman sites they work with, and to list those clients and whether curtailment opt-in is on. If you're a power partner, contact us to get set up.
Staying Up to Date
API changes are announced in the Release Notes. The SwaggerHub reference always shows the current endpoints and fields.
Last verified: November 19, 2026