Guide

Make the first Atlas API request

Start with read-only discovery, then create a sandbox preview session before any live customer workflow. Do not send organization_id in requests; Mirai derives tenant identity from the authenticated app, service account, or session.

1. Get a scoped bearer token

Create an org-owned app grant or service account in the Developer Console. Grant only the scopes needed for this guide: atlas.knowledge.read, atlas.knowledge.write,atlas.sessions.write, and atlas.sessions.read.

Auth model

2. Discover available Atlas tools

The generated contract lists /v1/atlas/tools/manifest for capability discovery. Treat MCP/well-known discovery as staged unless your environment exposes deployed backend evidence.

curl https://api.usemirai.app/v1/atlas/tools/manifest   -H "authorization: Bearer $ATLAS_TOKEN"

3. Upload test knowledge

Atlas Knowledge is org-owned grounding material for Mirai-hosted and external agents. Keep test content non-sensitive until production credentials and retention rules are approved.

curl -X POST https://api.usemirai.app/v1/atlas/knowledge   -H "authorization: Bearer $ATLAS_TOKEN"   -H "content-type: application/json"   -d '{"source_type":"text","title":"Sandbox FAQ","text":"Opening hours are 10am to 9pm."}'

4. Create a sandbox preview session

Use sandbox sessions to test replies and grounding before live traffic. Production sends and risky mutations should remain gated by scopes, policy, and approvals.

curl -X POST https://api.usemirai.app/v1/atlas/sessions   -H "authorization: Bearer $ATLAS_TOKEN"   -H "content-type: application/json"   -d '{"mode":"sandbox","channel":"whatsapp","customer":{"phone_number":"+6590000000"}}'

Next path