API Credentials
Atlas uses two developer credentials. They are separate on purpose. Do not swap them.
| Credential | Prefix | Use for |
|---|---|---|
| API key | nl_api_ | Decode API + programmatic explore reads |
| Publish token | nl_live_ | Publishing SEP-0048 schemas (POST /v1/schemas, CLI) |
API keys
Send your key on every server-to-server request:
Authorization: Bearer nl_api_...Endpoints that require an API key
| Endpoint | Required |
|---|---|
POST /v1/decode | Yes |
POST /v1/decode/batch | Yes |
GET /v1/events, /v1/contracts, /v1/stats, … | Recommended for production integrations |
The public explorer UI reads through the site BFF without a key. Apps and scripts should call Atlas directly with an API key.
Common errors
| Status | Code | Meaning |
|---|---|---|
| 401 | UNAUTHORIZED | Missing or invalid API key |
| 404 | API_KEY_NOT_FOUND | Key revoked or unknown |
Publish tokens
Schema publishing uses nl_live_… publish tokens, not API keys.
Typical CLI flow:
naralabs auth nl_live_...
cd my-schema
naralabs registry publishOr pass the token as Authorization: Bearer nl_live_… on POST /v1/schemas.
Example
export NARALABS_API_KEY="nl_api_..."
curl -H "Authorization: Bearer $NARALABS_API_KEY" \
"http://localhost:8080/v1/events?network=testnet&page_size=5"OpenAPI
Full request schemas live in Atlas Scalar docs at http://localhost:8080/docs (local) or your deployed Atlas /docs URL.
Last updated on