Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/blindpaylabs/blindpay-node/llms.txt

Use this file to discover all available pages before exploring further.

List API Keys

Retrieve a list of all API keys for your instance.
const response = await blindpay.apiKeys.list();

Response

data
array
Array of API key objects
{
  "data": [
    {
      "id": "key_1234567890",
      "name": "Production API Key",
      "permission": "full_access",
      "token": "bp_live_***",
      "ip_whitelist": ["192.168.1.1", "10.0.0.1"],
      "unkey_id": "uk_1234567890",
      "last_used_at": "2024-03-01T15:30:00Z",
      "instance_id": "inst_1234567890",
      "created_at": "2024-01-15T10:30:00Z",
      "updated_at": "2024-01-15T10:30:00Z"
    }
  ],
  "error": null
}

Create API Key

Create a new API key for your instance.
The API key token is only shown once during creation. Make sure to save it securely.
const response = await blindpay.apiKeys.create({
  name: "Production API Key",
  permission: "full_access",
  ip_whitelist: ["192.168.1.1", "10.0.0.1"]
});

Parameters

name
string
required
A descriptive name for the API key
permission
string
required
Permission level for the API key. Currently only full_access is supported
ip_whitelist
array
Optional array of IP addresses that are allowed to use this API key. If not provided, the key can be used from any IP address

Response

data
object
{
  "data": {
    "id": "key_1234567890",
    "token": "bp_live_abcdefghijklmnopqrstuvwxyz123456"
  },
  "error": null
}

Get API Key

Retrieve details about a specific API key.
const response = await blindpay.apiKeys.get("key_1234567890");

Parameters

id
string
required
The ID of the API key to retrieve

Response

data
object
{
  "data": {
    "id": "key_1234567890",
    "name": "Production API Key",
    "permission": "full_access",
    "token": "bp_live_***",
    "ip_whitelist": ["192.168.1.1", "10.0.0.1"],
    "unkey_id": "uk_1234567890",
    "last_used_at": "2024-03-01T15:30:00Z",
    "instance_id": "inst_1234567890",
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z"
  },
  "error": null
}

Delete API Key

Permanently delete an API key.
Deleting an API key will immediately revoke access. Any applications using this key will no longer be able to authenticate.
const response = await blindpay.apiKeys.delete("key_1234567890");

Parameters

id
string
required
The ID of the API key to delete

Response

Returns a success response with no data on successful deletion.
{
  "data": null,
  "error": null
}

Best Practices

Follow these best practices when working with API keys:
  • Use descriptive names - Name your keys based on their purpose or application
  • Implement IP whitelisting - Restrict key usage to specific IP addresses when possible
  • Rotate keys regularly - Create new keys and delete old ones periodically
  • Store securely - Never commit API keys to version control or expose them in client-side code
  • Monitor usage - Check the last_used_at field to identify unused or suspicious keys

Build docs developers (and LLMs) love