Authenticate your API requests with NordicCDN.
The NordicCDN API uses token-based authentication. All API requests must include a valid API token in the request headers.
{warning} Copy your token immediately. For security, tokens are only shown once.
Include your API token in the Authorization header:
curl "https://nordiccdn.com/api/v1/zones" \
-H "Authorization: Bearer YOUR_API_TOKEN"
Authorization: Bearer YOUR_API_TOKEN
Tokens can be scoped to specific permissions:
| Permission | Description |
|---|---|
zones:read |
List and view zones |
zones:write |
Create, update, delete zones |
purge |
Purge cache |
analytics:read |
View analytics data |
settings:write |
Modify zone settings |
Leave permissions empty for full access to your account.
Create a token that can only purge cache:
purge onlyAll API requests use this base URL:
https://nordiccdn.com/api/v1
All requests should include:
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json
Accept: application/json
For POST/PUT/PATCH requests, send JSON:
curl -X POST "https://nordiccdn.com/api/v1/zones" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"origin_url": "https://example.com"}'
All responses are JSON:
{
"data": {
"uuid": "abc123",
"origin_url": "https://example.com",
"cdn_hostname": "abc123.cdn.nordiccdn.com"
}
}
{
"data": [
{"uuid": "abc123", "origin_url": "https://example.com"},
{"uuid": "def456", "origin_url": "https://other.com"}
],
"meta": {
"current_page": 1,
"total": 25,
"per_page": 15
}
}
{
"message": "The given data was invalid.",
"errors": {
"origin_url": ["The origin url field is required."]
}
}
API requests are rate limited:
| Endpoint Type | Limit |
|---|---|
| Read (GET) | 60 requests/minute |
| Write (POST/PUT/DELETE) | 30 requests/minute |
| Purge | 10 requests/minute |
Responses include rate limit information:
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1640995200
If you exceed the limit, you'll receive:
HTTP 429 Too Many Requests
Wait until X-RateLimit-Reset timestamp before retrying.
# Good: Use environment variable
export NORDICCDN_TOKEN="your-token"
curl -H "Authorization: Bearer $NORDICCDN_TOKEN" ...
Create tokens with only the permissions needed:
purge onlyanalytics:read onlyDelete and recreate tokens periodically, especially after team changes.
Check API logs for unusual activity:
Revoked tokens are immediately invalidated.
use NordicCDN\Client;
$client = new Client('YOUR_API_TOKEN');
$zones = $client->zones()->list();
import { NordicCDN } from 'nordiccdn';
const client = new NordicCDN('YOUR_API_TOKEN');
const zones = await client.zones.list();
Contact support for official SDK availability.
Verify your token works:
curl "https://nordiccdn.com/api/v1/user" \
-H "Authorization: Bearer YOUR_API_TOKEN"
Success response:
{
"data": {
"id": 123,
"name": "Your Name",
"email": "you@example.com"
}
}
Invalid token response:
{
"message": "Unauthenticated."
}