Understanding API Keys
API Keys in Paygentic are:- User-specific: Each API key belongs to a specific user within your organization
- Permission-based: Keys inherit the permissions of the user they belong to
- Format: All keys follow the pattern
sk_live_...
for live environment - Bearer tokens: Used in the Authorization header of API requests
Creating API Keys
To create a new API key:- Log into your Paygentic Dashboard
- Navigate to Settings → API Keys
- Click Create New Key
- Provide a descriptive name for the key
- Copy the generated key immediately (it won’t be shown again)
Store your API key securely immediately after creation. For security reasons, the full key value is only shown once.
Managing API Keys
Viewing API Keys
In the API Keys section, you can:- View all active API keys
- See the creation date and last used date
- Identify keys by their descriptive names
- View partial key values (last 4 characters)
Revoking API Keys
To revoke an API key:- Navigate to Settings → API Keys
- Find the key you want to revoke
- Click the Revoke button
- Confirm the action
Revoking an API key immediately invalidates it. Any applications using the revoked key will start receiving authentication errors.
Best Practices
Security
- Never commit API keys to version control
- Use environment variables or secure secret management systems
- Rotate keys regularly
- Revoke unused or compromised keys immediately
- Use different keys for different environments (development, staging, production)
Organization
- Use descriptive names for your API keys
- Create separate keys for different applications or services
- Monitor key usage to identify inactive keys
- Document which keys are used by which applications
Using API Keys
Include your API key in the Authorization header:Troubleshooting
Invalid API Key
If you receive authentication errors:- Verify the key is correctly formatted
- Check that the key hasn’t been revoked
- Ensure you’re using the correct key for your environment
Permissions Issues
If you receive permission errors:- Verify the user associated with the API key has the required permissions
- Check that the key is being used for the correct organization
- Contact your organization administrator if you need additional permissions