API reference / Banks
/v1/banks/{id}/import-historyImport bank history
Requires history:import. Resource restrictions also apply. Import history.
Requires whole-bank access. Work runs in the background; inspect the returned job state.
Request examples
These examples use HTTP directly. Keep API keys on your server.
curl -X POST 'https://api.bankmcp.app/v1/banks/RESOURCE_ID/import-history' \
-H "Authorization: Bearer $BANKING_API_KEY" \
-H 'Content-Type: application/json' \
--data '{}'
const response = await fetch('https://api.bankmcp.app/v1/banks/RESOURCE_ID/import-history', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.BANKING_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({}),
});
if (!response.ok) throw new Error(`Banking returned ${response.status}`);
const data = await response.json();
Parameters
idpathrequiredstring — Bank ID from list_banks, e.g. "DE:N26" (country code and bank name).
Request body
Content-Type: application/json
object
Response
200 · application/json
Option 1: object
status"complete"requiredsincestring | nullrequiredShow since schema
Option 1: string
string — Calendar date (YYYY-MM-DD)
Option 2: null
null
messagestringrequiredOption 2: object
status"running"requireddoneintegerrequiredRange: 0 – unbounded
totalintegerrequiredRange: 0 – unbounded
Option 3: object
status"consent_required"requiredurlstringrequiredThe bank's connect page in the portal: give it to the user to open.
bankobjectrequiredShow bank schema
namestringrequiredcountrystring | nullrequiredShow country schema
Option 1: string
string — ISO 3166-1 alpha-2 country code, e.g. DE
Option 2: null
null
psu_type"personal" | "business" | nullrequiredShow psu_type schema
Option 1: "personal" | "business"
"personal" | "business"
Option 2: null
null
optionsarray<object>Show options schema
countrystringrequiredISO 3166-1 alpha-2 country code, e.g. DE
countriesarray<string>requiredShow countries schema
string — ISO 3166-1 alpha-2 country code, e.g. DE
bicstring | nullrequiredShow bic schema
Option 1: string
string
Option 2: null
null
instructionsstringrequiredmessagestringrequiredErrors
Errors contain error, code and an optional action. Read the error and retry guide.
| Status | Code |
|---|---|
| 400 | INVALID_INPUT |
| 401 | INVALID_API_KEY |
| 403 | INSUFFICIENT_PERMISSION |
| 404 | NOT_FOUND |
| 409 | CONFLICT |
| 413 | REQUEST_TOO_LARGE |
| 429 | rate_limit.feature |
| 500 | REQUEST_FAILED |
| 502 | INVALID_RESPONSE |
| 503 | UNAVAILABLE |
Try this request
Sent directly to https://api.bankmcp.app. Your key stays in this page’s memory and is never saved.