Skip to main content

Authentication

The Zeplo API supports two authentication methods depending on your use case.

API Key Authentication

Use API keys for external integrations and the REST API v1 endpoints. Every request must include your API key and channel ID.

Getting Your API Key

1

Open API Keys Settings

Navigate to Settings > API Keys in your Zeplo dashboard at app.zeplo.ai.
2

Create a New Key

Click Create Key, enter a descriptive name, select the required permissions, and set your rate and monthly limits.
3

Copy Your Credentials

Copy the API key (zeplo_ak_...) and secret (zeplo_as_...). The secret is shown only once.
4

Store Securely

Save both values in your environment variables or a secrets manager. Never commit them to source control.

Using Your API Key

Required Headers

Never expose your API key in client-side JavaScript or mobile apps. All API calls should be made from your backend server. Use environment variables to store credentials.

Session-Based Authentication

Use session-based auth for internal dashboard operations. Login via POST /api/auth/login to receive a session cookie.
The response sets a connect.sid cookie used for subsequent requests.

Environment Variables

Create a .env file:
Access in your code:

Rate Limiting

Rate limit headers are included in every API response: X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset.

Error Handling

When authentication fails, the API returns a 401 status code:
Response