Getting started

The Bags API allows you to integrate Bags functionality into your applications. Get up and running in minutes.

Authentication

All API requests require authentication using an API key.

Get your API key

  1. Visit dev.bags.fm and sign in to your account
  2. Navigate to the API Keys section
  3. Create a new API key
Each user can create up to 10 API keys. Keep your keys secure and never share them publicly.

Using your API key

Include your API key in the x-api-key header with every request:
cURL
curl -X GET 'https://public-api-v2.bags.fm/api/v1/endpoint' \
  -H 'x-api-key: YOUR_API_KEY'
const response = await fetch('https://public-api-v2.bags.fm/api/v1/endpoint', {
  headers: {
    'x-api-key': 'YOUR_API_KEY'
  }
});

Managing API keys

You can revoke API keys at any time:
  1. Go to dev.bags.fm
  2. Find the key you want to revoke
  3. Click “Revoke” to permanently disable it
Revoking an API key immediately stops all requests using that key. Update your applications before revoking keys that are in use.

Rate limits

The Bags API implements rate limiting to ensure fair usage and system stability.
  • Rate limit: 1,000 requests per hour per user
  • Scope: Rate limits apply across all your API keys
  • Headers: Check X-RateLimit-Remaining and X-RateLimit-Reset in response headers
Distribute requests evenly throughout the hour to avoid hitting rate limits. Consider implementing exponential backoff for failed requests.

Core Principles

Get familiar with key concepts and best practices:

Explore the API