API reference
The Monerails REST API: base URL, authentication and every endpoint.
The Monerails API is a REST API. It accepts and returns JSON, uses standard HTTP status codes and authenticates with a secret key.
Base URL
https://api.monerails.com/v1Every request goes over HTTPS. The mode (test or live) comes from the key, not the URL.
Authentication
curl https://api.monerails.com/v1/balance \
-H "Authorization: Bearer mr_test_..."See Authentication for keys and roles.
Conventions
| Topic | Rule |
|---|---|
| Bodies | JSON, with Content-Type: application/json. Unknown parameters are rejected. |
| IDs | UUIDs, for example 3b8f6c1e-2a47-4d1b-9e35-7c0a9d2f4e61. |
| Amounts | Integers in minor units (details). |
| Dates | ISO 8601, UTC. |
| Lists | Cursor pagination (details). |
| POST requests | Accept an Idempotency-Key (details). |
| Errors | An error object with type, code, message (details). |
The OpenAPI 3.1 file of the API is available here: openapi.json. To try the API without writing code, import the Postman collection; to generate a typed client, see Client libraries.
Endpoints
Balance
Collections
POST
/v1/collectionsCreate a collectionGET/v1/collections/{id}Retrieve a collectionGET/v1/collectionsList collectionsPOST/v1/collections/{id}/authorizeAuthorize with a codePOST/v1/collections/{id}/resend_otpResend the codePayouts
Beneficiaries
POST
/v1/beneficiariesCreate a beneficiaryGET/v1/beneficiaries/{id}Retrieve a beneficiaryPOST/v1/beneficiaries/{id}Update a beneficiaryGET/v1/beneficiariesList beneficiariesDELETE/v1/beneficiaries/{id}Delete a beneficiarySettlements
POST
/v1/settlementsCreate a settlementGET/v1/settlements/{id}Retrieve a settlementGET/v1/settlementsList settlementsTransactions
Cardholders
POST
/v1/cardholdersCreate a cardholderPOST/v1/cardholders/{id}/verificationSubmit identity verificationGET/v1/cardholders/{id}Retrieve a cardholderGET/v1/cardholdersList cardholdersCards
POST
/v1/cardsCreate a cardGET/v1/cards/{id}Retrieve a cardGET/v1/cardsList cardsPOST/v1/cards/{id}/fundFund a cardPOST/v1/cards/{id}/withdrawWithdraw from a cardPOST/v1/cards/{id}/freezeFreeze a cardPOST/v1/cards/{id}/unfreezeUnfreeze a cardPOST/v1/cards/{id}/terminateTerminate a cardWebhook endpoints
POST
/v1/webhook_endpointsCreate a webhook endpointGET/v1/webhook_endpoints/{id}Retrieve a webhook endpointGET/v1/webhook_endpointsList webhook endpointsDELETE/v1/webhook_endpoints/{id}Delete a webhook endpointPOST/v1/webhook_endpoints/{id}/rotate_secretRotate the secretEvents
GET
/v1/eventsList eventsGET/v1/events/{id}Retrieve an eventPOST/v1/events/{id}/retryRedeliver an event