Skip to main content
All API endpoints (except signup and Stripe webhooks) require authentication via API key.

Using Your API Key

Pass the key in the Authorization header:
Authorization: Bearer pdg_your_api_key_here

Managing API Keys

Generate a New Key

curl -X POST https://api.pedge.xyz/v1/auth/keys \
  -H "Authorization: Bearer pdg_existing_key" \
  -H "Content-Type: application/json" \
  -d '{"name": "my-bot"}'

List Your Keys

curl https://api.pedge.xyz/v1/auth/keys \
  -H "Authorization: Bearer pdg_your_key"

Revoke a Key

curl -X DELETE https://api.pedge.xyz/v1/auth/keys/KEY_ID \
  -H "Authorization: Bearer pdg_your_key"

Error Responses

StatusMeaning
401Missing or invalid API key
402Insufficient credits
The 402 response includes credits_required and credits_remaining so you know exactly how much you need.