API Keys

Manage API keys for the Masumi Payment Service API

/api-key-status

This endpoint is used for checking the status of the existing API keys.

Get information about your current API key.

get

Gets api key status

Authorizations
Responses
200
API key status
application/json
get
GET / HTTP/1.1
Host: api-key-status
token: YOUR_API_KEY
Accept: */*
200

API key status

{
  "status": "success",
  "data": {
    "status": "Active",
    "token": "masumi_payment_api_key_secret",
    "permission": "Admin",
    "networkLimit": [
      "Preprod"
    ],
    "usageLimited": true,
    "RemainingUsageCredits": [
      {
        "unit": "",
        "amount": "10000000"
      }
    ]
  }
}

/api-key

These endpoints are used for managing API keys.

Get information about all API keys. (admin access required)

get

Gets api key status

Authorizations
Query parameters
limitnumber · min: 1 · max: 100Optional

The number of API keys to return

Default: 10
cursorTokenstring · max: 550Optional

Used to paginate through the API keys

Responses
200
Api key status
application/json
get
GET / HTTP/1.1
Host: api-key
token: YOUR_API_KEY
Accept: */*
{
  "data": {
    "ApiKeys": [
      {
        "id": "unique_cuid_v2_of_entry",
        "token": "masumi_payment_api_key_secret",
        "permission": "Admin",
        "usageLimited": true,
        "RemainingUsageCredits": [
          {
            "unit": "",
            "amount": "10000000"
          }
        ],
        "status": "Active",
        "networkLimit": [
          "Mainnet"
        ]
      }
    ]
  },
  "status": "success"
}

Create a new API key. (admin access required)

post

Creates a API key

Authorizations
Body
usageLimitedstringOptional

Whether the API key is usage limited. Meaning only allowed to use the specified credits or can freely spend

Default: true
permissionstring · enumOptional

The permission of the API key

Default: ReadPossible values:
Responses
200
API key deleted
application/json
post
POST / HTTP/1.1
Host: api-key
token: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 93

{
  "usageLimited": "true",
  "UsageCredits": [
    {
      "unit": "",
      "amount": "10000000"
    }
  ],
  "permission": "Admin"
}
{
  "status": "success",
  "data": {
    "id": "unique_cuid_v2_of_entry_to_delete",
    "token": "masumi_payment_api_key_secret",
    "permission": "Admin",
    "usageLimited": true,
    "networkLimit": [
      "Preprod"
    ],
    "status": "Active"
  }
}

Update an existing API key. (admin access required)

patch

Creates a API key

Authorizations
Body
idstring · max: 150Required

The id of the API key to update. Provide either id or apiKey

tokenstring · min: 15 · max: 550Optional

To change the api key token

usageLimitedbooleanOptional

Whether the API key is usage limited

Default: true
statusstring · enumOptional

The status of the API key

Default: ActivePossible values:
Responses
200
API key deleted
application/json
patch
PATCH / HTTP/1.1
Host: api-key
token: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 210

{
  "id": "unique_cuid_v2_of_entry_to_update",
  "token": "api_key_to_change_to",
  "UsageCreditsToAddOrRemove": [
    {
      "unit": "",
      "amount": "10000000"
    },
    {
      "unit": "usdm_policy_and_asset_id",
      "amount": "-10000000"
    }
  ],
  "status": "Active"
}
{
  "status": "success",
  "data": {
    "id": "unique_cuid_v2_of_entry_to_delete",
    "token": "masumi_payment_api_key_secret",
    "permission": "Admin",
    "usageLimited": true,
    "networkLimit": [
      "Preprod",
      "Mainnet"
    ],
    "status": "Active"
  }
}

Delete an existing API key. (admin access required)

delete

Removes a API key

Authorizations
Body
idstring · max: 150Required

The id of the API key to be (soft) deleted.

Responses
200
API key deleted
application/json
delete
DELETE / HTTP/1.1
Host: api-key
token: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 55

{
  "id": "id_or_apiKey_unique_cuid_v2_of_entry_to_delete"
}
{
  "status": "success",
  "data": {
    "id": "unique_cuid_v2_of_entry_to_delete",
    "token": "masumi_registry_api_key_secret",
    "status": "Revoked",
    "permission": "Admin",
    "usageLimited": true,
    "networkLimit": [
      "Preprod",
      "Mainnet"
    ],
    "deletedAt": "1970-01-20T20:00:36.260Z"
  }
}

/rpc-api-keys

List Blockfrost API keys. (admin access required)

get

Gets rpc api keys, currently only blockfrost is supported (internal)

Authorizations
Query parameters
cursorIdstring · min: 1 · max: 250Optional

Used to paginate through the rpc provider keys

limitnumber · min: 1 · max: 100Optional

The number of rpc provider keys to return

Default: 100
Responses
200
Blockfrost keys
application/json
get
GET / HTTP/1.1
Host: rpc-api-keys
token: YOUR_API_KEY
Accept: */*
200

Blockfrost keys

{
  "RpcProviderKeys": [
    {
      "network": "Preprod",
      "id": "unique_cuid_v2",
      "rpcProviderApiKey": "blockfrost_api_key",
      "rpcProvider": "Blockfrost",
      "createdAt": "1970-01-20T20:00:36.260Z",
      "updatedAt": "1970-01-20T20:00:36.260Z"
    }
  ]
}

Last updated

Was this helpful?