Create an API token

  1. Log into the Metronome App here.
  2. Navigate to Connections → API tokens & webhooks → Add.
  3. Create a new token and give it a descriptive name.
  4. Make sure to copy the token to a secure location before clicking Done.
Learn more about Metronome API authentication here.

Install the Metronome SDK

  1. Install the SDK in your environment.
pip install --pre metronome-sdk
  1. Configure the SDK by passing in your API key . By default, the SDK looks for the API key under the environment variable METRONOME_BEARER_TOKEN.
from metronome import Metronome

client = Metronome(
  # Defaults to os.environ.get("METRONOME_BEARER_TOKEN") if omitted
  bearer_token="My bearer token",
)
Learn more about the Metronome SDK here.

Test the API

  1. Make a test API call - for example, list the customers in your Metronome account. This will work even if your customer list is empty.
response = client.v1.customers.list()
print("✓ Connected to Metronome!")
if response.data:
    customer = response.data[0]
    print(f"  First customer: {customer.name}")
else:
    print("  No customers found.")
Success! You’re now connected to Metronome. Once connected, you can track usage, set pricing, and automate invoicing.

Next Steps