Back to Docs

API Keys

Access the RequestBin API programmatically. Create bins, list interactions, and replay requests from your scripts, CI pipelines, or AI agents. Free on every plan — up to 5 keys per account.

Create an API Key

  1. Go to requestbin.net/api-keys
  2. Click "Create New Key" and give it a descriptive name
  3. Copy the key immediately — it is only shown once
  4. Store it securely in your environment variables

Using Your API Key

Include your API key in the Authorization header as a Bearer token:

cURL

curl https://requestbin.net/api/bins \
  -H "Authorization: Bearer rb_your_api_key_here"

Python

import requests

headers = {"Authorization": "Bearer rb_your_api_key_here"}
response = requests.get("https://requestbin.net/api/bins", headers=headers)
bins = response.json()
print(bins)

Node.js

const response = await fetch("https://requestbin.net/api/bins", {
  headers: { Authorization: "Bearer rb_your_api_key_here" },
});
const bins = await response.json();
console.log(bins);

Use with AI Agents (MCP Server)

API keys work with the RequestBin MCP Server — let Claude Code, Cursor, or Windsurf manage your bins directly.

Setup MCP Server →

Security Best Practices

  • Never commit API keys to source control
  • Use environment variables or a secrets manager
  • Create separate keys for different environments (dev, staging, production)
  • Rotate keys periodically and revoke unused ones
  • Each key is scoped to your account — do not share keys across team members

Revoking a Key

Go to requestbin.net/api-keys and click the delete icon next to any key. The key is immediately invalidated and all API calls using it will return a 401 error.

RequestBin
© Copyright 2026 RequestBin.