Skip to main content

Authentication

Every request needs an API key passed in the X-API-Key header.

Get your API key

Sign up at developers.influship.com and find your API key in the dashboard under Settings > API Keys.

Set it as an environment variable

Or add it to your .env file:
.env
Never commit API keys to version control. Use environment variables or a secrets manager.

Pass it in requests

The SDK reads from the INFLUSHIP_API_KEY environment variable automatically, so you can also omit the constructor argument entirely if the variable is set.

When authentication fails

A missing or invalid key returns a 401 response:
If you receive this unexpectedly, check that the key is correctly set and has not been revoked.

Key rotation

Generate a new key from the dashboard at any time. Old keys are revoked immediately when a new one is created — update your environment variables before generating a replacement if you have live traffic.

Organization and billing

Each API key belongs to one organization. Rate limits and billing are tracked per key.