πŸ”Authentication

How to authenticate with the API


API Key

All requests require the x-replenit-auth-key header:

POST /customers/{tenantId}
Host: api.replen.it
Content-Type: application/json
x-replenit-auth-key: YOUR_BASE64_API_KEY

Get Your API Key

  1. Login to your Replenit panel. Reach out to Customer Success Manager if you didnt have invitation email

  2. Go to Settings β†’ API Keys

  3. Click Generate New Key

  4. Copy the key (it won't be shown again)


Secure Storage

Use environment variables:

Python:

Node.js:


Best Practices

  1. Never commit keys to version control

  2. Use different keys for dev/staging/production

  3. Don't expose keys in client-side code (browsers, mobile apps)

  4. Rotate keys periodically (e.g. every 6 months)


Common Mistakes

❌ Keys in Source Code

❌ Keys in Version Control

❌ Client-Side Exposure


Troubleshooting

401 Unauthorized:

  • Check x-replenit-auth-key header is present

  • Verify API key is correct (no extra spaces)

  • Ensure key hasn't been revoked

403 Forbidden:

  • Verify tenant ID matches your organization

  • Check key permissions in panel


Need Help?

Contact support@replen.itenvelope

Last updated