Authentication
IceCore API uses API keys for authentication.
Authentication
IceCore API uses API keys for authentication.
Creating API Keys
Dashboard: Settings → API Keys → Create API Key
Request:
POST /api/api-keys
Content-Type: application/json
{
"workspaceId": "uuid",
"name": "Production API Key",
"mode": "live",
"permissions": {
"read": true,
"write": true,
"conversations": true,
"analytics": true,
"bulk_send": true
},
"expiresInDays": 365,
"rateLimitPerMinute": 100
}Mode Options:
live: Production API key (format:sk_live_...)test: Development/testing API key (format:sk_test_...)
Note: Default is live if not specified.
Response:
{
"key": "sk_live_a1b2c3d4e5f6...",
"keyData": {
"id": "key_uuid",
"key_prefix": "sk_live_...",
"permissions": {...}
},
"warning": "Save this key securely. You won't be able to see it again!"
}⚠️ Important: The full API key is shown only once. Store it securely!
Using API Keys
Include the API key in the Authorization header:
curl https://icecore.ai/api/v1/conversations \
-H "Authorization: Bearer sk_live_a1b2c3d4e5f6..."Key Types
Type | Format | Purpose |
|---|---|---|
Live |
| Production use |
Test |
| Development/testing |
Permissions
Permission | Description |
|---|---|
| Read conversations, analytics |
| Send messages, update data |
| Full conversation access |
| Access analytics endpoints |
| Manage WhatsApp templates (requires session cookie auth, not API key) |
| Send bulk campaigns (currently requires session cookie auth, API key support coming soon) |
Rate Limits
API keys have configurable rate limits:
Tier | Requests/Minute |
|---|---|
Default | 60 |
Pro | 100 |
Enterprise | Custom |
Headers returned:
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1635724800
When exceeded: 429 Too Many Requests
Security Best Practices
Never commit keys to version control
Use environment variables
Rotate keys regularly (every 90 days recommended)
Use minimum permissions needed
Set expiration dates for keys
Managing Keys
List Keys
GET /api/api-keys?workspaceId={id}Deactivate Key
PATCH /api/api-keys
{
"workspaceId": "uuid",
"keyId": "key_uuid",
"isActive": false
}Delete Key
DELETE /api/api-keys?workspaceId={id}&keyId={key_id}Error Responses
401 Unauthorized
{
"error": "Invalid or expired API key"
}429 Rate Limit Exceeded
{
"error": "Rate limit exceeded",
"retry_after": 30
}Next: REST API Reference