Skip to content

API Keys

API keys let you access the badges.ninja REST API programmatically. Use them to automate badge creation, awarding, and management from your own applications.

API Keys — empty state

Creating an API Key

  1. Open the API Keys page from the sidebar.
  2. Click Create API Key. An inline form opens:

Create key — name form

  1. Give the key a name and click Create. The full key is revealed once on a green banner:

Newly created key revealed once

  1. Copy the key immediately — it is only shown once. If you lose it, you will need to create a new one. After you dismiss the banner, only the prefix is stored:

Keys list showing the masked prefix

Key Format

API keys use the bws_ prefix followed by a 32-character hex string:

bws_a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6

Using API Keys in Requests

Include the API key in the X-Api-Key header of every API request:

bash
curl -X GET https://api.badges.ninja/issuers \
  -H "X-Api-Key: bws_your_api_key_here"

See the Authentication page for full details on API authentication.

Key Limits Per Plan

The number of API keys you can create depends on your plan:

PlanAPI Key Limit
Free1
Starter ($9/mo)5
Pro ($29/mo)20

Deleting a Key

  1. Open the API Keys page.
  2. Find the key you want to delete.
  3. Click Delete.
  4. Confirm the deletion.

Delete key confirmation — revocation is immediate

Once deleted, the key immediately stops working. Any applications using that key will receive authentication errors.

badges.ninja Documentation