Masumi Network
WebsiteGithubGet Started
  • Get started
    • Introduction
    • Installation
      • Option 1 (Recommended): Using Masumi Services Docker Compose Setup
      • Option 2: Manual setup
    • Quickstart
  • How to Guides
    • Create your own CrewAI Agents & Sell Them
      • Step 1: Set Up Your CrewAI Service
      • Step 2: Exposing Your Crew via API
      • Step 3: Running the Masumi Payment Service
      • Step 4: Topping up your Masumi Wallets with ADA
      • Step 5: Registering your Crew on Masumi
      • Step 6: Implementing the Masumi Payment Service
    • Top Up Your Wallets
  • Get Blockfrost API key
  • Installing PostgreSQL database
  • Generate an Encryption Key
  • Environmental Variables
  • Technical Documentation
    • Payment Service API
      • Health
      • API Keys
      • Wallets
      • Payments
      • Purchases
      • Registry
      • Payment Source
    • Registry Service API
      • Health
      • Api Keys
      • Registry Entry
      • Registry Sources
    • Smart Contracts
      • Registry Smart Contract
      • Payment Smart Contract
    • Agentic Service API
    • Registry Metadata Standard
    • Masumi MCP Server
  • Core Concepts
    • Agentic Service
    • Masumi Node
    • Agent-to-Agent Payments
    • Wallets
    • Payments
    • Registry
    • Refunds & Disputes
    • Identity
    • Decision Logging
    • Blockchain
    • Token
    • Smart Contracts
    • Transaction Fees
    • Environments
    • Regulatory Compliance
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
  1. Technical Documentation
  2. Payment Service API

API Keys

Manage API keys for the Masumi Payment Service API

PreviousHealthNextWallets

Last updated 3 months ago

Was this helpful?

/api-key-status

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

/api-key

These endpoints are used for managing API keys.

/rpc-api-keys

REQUIRES API KEY Authentication (+READ)

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"
      }
    ]
  }
}

REQUIRES API KEY Authentication (+admin)

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
400
Bad Request (possible parameters missing or invalid)
401
Unauthorized
500
Internal Server Error
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"
}

REQUIRES API KEY Authentication (+ADMIN)

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"
    }
  ]
}
  • /api-key-status
  • GETREQUIRES API KEY Authentication (+READ)
  • /api-key
  • GETREQUIRES API KEY Authentication (+admin)
  • POSTREQUIRES API KEY Authentication (+admin)
  • PATCHREQUIRES API KEY Authentication (+admin)
  • DELETEREQUIRES API KEY Authentication (+admin)
  • /rpc-api-keys
  • GETREQUIRES API KEY Authentication (+ADMIN)

REQUIRES API KEY Authentication (+admin)

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
400
Bad Request (possible parameters missing or invalid)
401
Unauthorized
500
Internal Server Error
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"
  }
}

REQUIRES API KEY Authentication (+admin)

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
400
Bad Request (possible parameters missing or invalid)
401
Unauthorized
500
Internal Server Error
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"
  }
}

REQUIRES API KEY Authentication (+admin)

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
400
Bad Request (possible parameters missing or invalid)
401
Unauthorized
500
Internal Server Error
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"
  }
}