Authentication
The 4N NextDay API uses bearer tokens for authentication. Your token is provided by a NextDay system administrator — no login endpoint is needed.
Use the token in requests
Include the token in the Authorization header of every API request:
Authorization header format
Authorization: Bearer 1|abc123def456...
GET
/orderscurl https://api.4nortes.app/api/v1/orders \
-H "Authorization: Bearer 1|abc123def456..." \
-H "Content-Type: application/json"
Headers to include
Every request needs these headers:
| Header | Value | Description |
|---|---|---|
Authorization | Bearer {token} | Your bearer token provided by your NextDay administrator |
Content-Type | application/json | Required for POST/PUT requests |
Accept | application/json | Recommended for all requests |
If authentication fails
You'll get a 401 Unauthorized response:
401 Unauthorized Response
{
"success": false,
"message": "Unauthenticated.",
"errors": null
}
This usually happens because:
- Missing header: You forgot to include
Authorization - Wrong format: Make sure it's
Bearer {token}(with the space) - Revoked token: Contact your NextDay administrator for a new token
Keep your token safe
- Use environment variables: Don't hardcode the token
- Token renewal: Contact your NextDay administrator if your token is revoked or needs to be replaced
- Separate tokens: Use different tokens for testing vs production
- Monitor usage: Check your panel for unexpected activity
Using environment variables
# Set your token as an environment variable
export NEXTDAY_TOKEN="1|abc123def456..."
# Use it in your requests
curl https://api.4nortes.app/api/v1/orders \
-H "Authorization: Bearer $NEXTDAY_TOKEN"