Work with this as data
Every API here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for apis
7 MCP tools reach this
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
This API
curl "https://apis.io/api/v1/apis/swift:swift-account-numbers-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
OpenAPI Specification
openapi: 3.2.0
info:
title: Swift Account Numbers API
version: '1.0'
description: 'Operations tagged Account Numbers across 3 of this provider''s published API definitions: swift-swiftref-api-openapi.yml, swift-swiftref-api-v4-openapi.yml, swift-swiftref-api-v4-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.swift.com/swiftrefdata
description: SWIFT SwiftRef Production API
- url: https://sandbox.swift.com/swiftrefdata
description: SWIFT SwiftRef Sandbox
- url: https://api.swift.com/swiftrefdata/v4
description: Live environment
- url: https://sandbox.swift.com/swiftrefdata/v4
description: Sandbox environment
- url: https://api-test.swift.com/swiftrefdata/v4
description: Test environment
tags:
- name: Account Numbers
description: Account number format validation
paths:
/v2/account_numbers/{account_number}/validity:
get:
operationId: validateAccountNumber
summary: Validate Account Number
description: Checks the validity of various account number formats including IBANs, checking account number format compliance.
tags:
- Account Numbers
parameters:
- name: account_number
in: path
required: true
schema:
type: string
description: Account number to validate
responses:
'200':
description: Account number validity result
content:
application/json:
schema:
$ref: '#/components/schemas/ValidityResult'
'400':
$ref: '#/components/responses/BadRequest'
security:
- OAuth2: []
servers:
- url: https://api.swift.com/swiftrefdata
description: SWIFT SwiftRef Production API
- url: https://sandbox.swift.com/swiftrefdata
description: SWIFT SwiftRef Sandbox
/account_numbers/{account_number}/validity:
get:
tags:
- Account Numbers
summary: Check validity of account number formats, including IBANs
description: Check validity of account number formats, including IBANs, issued in almost any country in the world.
operationId: getAccountNumberValidity
parameters:
- in: path
name: account_number
schema:
$ref: '#/components/schemas/FullAccountNumber'
required: true
description: Account number to validate
example: X0542811101000000123456
- in: query
name: country_code
schema:
$ref: '#/components/schemas/CountryCode'
required: false
description: ISO 2-letter country code of the country where the account is held
- in: query
name: is_iban
schema:
$ref: '#/components/schemas/BooleanAsString'
required: false
description: Whether the account number must be handled as an IBAN
- in: query
name: usage
schema:
type: string
enum:
- retail
- wholesale
required: false
description: How the account number is used (only for a few countries)
example: retail
- in: query
name: national_id
schema:
type: string
pattern: ^[0-9a-zA-Z]{2,20}$
required: false
description: National ID (bank ID, clearing code, sort code, routing number) of the account holding institution
example: 0542811101
- in: query
name: bic
schema:
$ref: '#/components/schemas/Bic'
required: false
description: BIC-8 or BIC-11 of the account holding institution
responses:
'200':
description: Valid account number
content:
application/json:
schema:
$ref: '#/components/schemas/AccountNumberValidity'
application/xml:
schema:
$ref: '#/components/schemas/AccountNumberValidity'
'400':
description: Invalid input
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
example:
errors:
- code: REDA.API.ANFI
severity: Fatal
text: The format of the account number is different from the allowed formats
user_message: Account number format is invalid
application/xml:
schema:
$ref: '#/components/schemas/Errors'
example: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <errors> <error> <code>REDA.API.ANFI</code> <severity>Fatal</severity> <text>The format of the account number is different from the allowed formats</text> <user_message>Account number format is invalid</user_message> </error> </errors>
'401':
$ref: '#/components/responses/Unallowed'
'404':
description: Invalid account format or invalid checksum or wrong URL format
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
example:
errors:
- code: REDA.API.ANCI
severity: Fatal
text: At least one checksum is different from the calculated checksum
user_message: 'At least one account number checksum is invalid: CHECKSUM'
application/xml:
schema:
$ref: '#/components/schemas/Errors'
example: '<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <errors> <error> <code>REDA.API.ANCI</code> <severity>Fatal</severity> <text>At least one checksum is different from the calculated checksum</text> <user_message>At least one account number checksum is invalid: CHECKSUM</user_message> </error> </errors>'
'405':
$ref: '#/components/responses/InvalidHttpMethod'
'406':
$ref: '#/components/responses/NotAcceptable'
default:
$ref: '#/components/responses/UnexpectedError'
security:
- oauthBearerToken: []
servers:
- url: https://api.swift.com/swiftrefdata/v4
description: Live environment
- url: https://sandbox.swift.com/swiftrefdata/v4
description: Sandbox environment
- url: https://api-test.swift.com/swiftrefdata/v4
description: Test environment
components:
schemas:
ValidityResult:
type: object
properties:
valid:
type: boolean
description: Whether the identifier is valid
errorCode:
type: string
description: Error code if invalid
errorDescription:
type: string
description: Human-readable description of validation failure
Bic:
type: string
description: Bank Identifier Code - ISO 9362
pattern: ^[A-Z]{6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3})?$
example: SWHTBEBBXXX
CountryCode:
type: string
pattern: ^[a-zA-Z]{2}$
description: 2-character ISO 3166-1 country code
example: DE
StringMax70:
description: Generic string definition, from 1 to 70 characters long
type: string
minLength: 1
maxLength: 70
FullAccountNumber:
$ref: '#/components/schemas/StringMax70'
Error:
description: Custom error schema to support detailed error message.
required:
- code
- severity
- text
type: object
properties:
severity:
description: Specifies the severity of the error.
type: string
enum:
- Fatal
- Transient
- Logic
code:
description: Specifies the custom error code as defined by the service provider.
type: string
minLength: 3
maxLength: 70
text:
$ref: '#/components/schemas/StringMax255'
user_message:
$ref: '#/components/schemas/StringMax255'
more_info:
description: Specifies an URL to find more information about the error.
type: string
format: uri
xml:
name: error
additionalProperties: false
example:
code: REDA.API.CODE
severity: Fatal
text: Error description
user_message: User-friendly error description
Errors:
type: object
required:
- errors
properties:
errors:
type: array
items:
$ref: '#/components/schemas/Error'
minItems: 1
xml:
name: errors
additionalProperties: false
StringMax255:
description: Generic string definition, from 1 to 255 characters long
type: string
minLength: 1
maxLength: 255
BooleanAsString:
type: string
enum:
- 'true'
- 'false'
example: 'true'
AccountNumberValidity:
type: object
required:
- account_number
- validity
properties:
account_number:
$ref: '#/components/schemas/FullAccountNumber'
validity:
type: string
enum:
- AVAL
description: The code AVAL if the account number is valid
xml:
name: validity
additionalProperties: false
example:
account_number: X0542811101000000123456
validity: AVAL
responses:
BadRequest:
description: Bad request - invalid identifier format
content:
application/json:
schema:
type: object
properties:
code:
type: string
message:
type: string
NotAcceptable:
description: The server does not support the format asked by the consumer
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
example:
errors:
- code: REDA.API.NOAC
severity: Fatal
text: Requested output format is not supported
UnexpectedError:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
application/xml:
schema:
$ref: '#/components/schemas/Errors'
InvalidHttpMethod:
description: Request HTTP method is not accepted
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
example:
errors:
- code: REDA.API.IREQ
severity: Fatal
text: Request performed with HTTP method other than GET
user_message: Invalid request
Unallowed:
description: You do not have sufficient privileges to execute this service
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
example:
errors:
- code: REDA.API.ILIC
severity: Fatal
text: You do not have sufficient privileges to execute this service
user_message: You do not have sufficient privileges to execute this service
securitySchemes:
OAuth2:
type: oauth2
flows:
password:
tokenUrl: https://api.swift.com/oauth2/v1/token
scopes:
urn:swiftref:external: External customer access to SwiftRef data
urn:swiftref:internal: Internal payment validation access
oauthBearerToken:
type: http
scheme: bearer
bearerFormat: opaque OAuth 2.0
description: "Use the access token obtained as a result of OAuth 2.0 flows. \n\nSWIFT supports two OAuth grant types depending on the API service.\n* JWT-Bearer grant type [RFC 7523](https://tools.ietf.org/html/rfc7523)\n* Password grant type\n\nThis API uses password grant type.\n\nPlease visit [SWIFT OAuth Token API](https://developer.swift.com/swift-oauth-token-api) for more information and examples.\n\nIn this declaration only the basic security element to transport the bearer token of an OAuth2 process is declared.\n"
externalDocs:
description: SWIFT SwiftRef API Documentation
url: https://developer.swift.com/apis/swiftref-api
x-refined-from:
- swift-swiftref-api-openapi.yml
- swift-swiftref-api-v4-openapi.yml
- swift-swiftref-api-v4-openapi.yml