Authentication

MorisBox exposes two key types according to account type.

AccountKey prefixUsage
Partnersk_… (excluding sk_dev_)Complete Partner API (/messages, bots, templates, and more)
Developersk_dev_…Developer API only (/dev/*) - MorisBox templates

Do not use end-user JWTs in a partner or developer backend.


Common header

Authorization: Bearer <api_key>
Content-Type: application/json

Developer keys also accept X-Api-Key: sk_dev_….


Partner keys

PropertyDescription
FormatOpaque (sk_…)
StorageServer-side hash; the secret is displayed only once
Scopessend, read, templates, full, and others
IP allowlistOptional, per key

Create a key (Partner Hub)

  1. Sign in to Partner Hub
  2. Open Administration → API Keys → Create
  3. Copy the secret immediately

Programmatic creation

POST /api/v1/settings/api-keys
Authorization: Bearer <existing_key>
{
  "name": "Backend production",
  "scopes": "send"
}

Partner Hub sign-in (UI)

EndpointPurpose
POST /api/v1/auth/partner/loginLogin and password → session key
POST /api/v1/auth/partner/logoutRevoke the session key
OnboardingRequest a partner account

Server integrations should use dedicated API keys, not the UI session.


Developer keys

See the complete guide: Developer Accounts.

EndpointPurpose
POST /api/v1/auth/developer/registerCreate an account and first key
POST /api/v1/auth/developer/loginDashboard session
GET/POST /api/v1/dev/api-keysManage keys
DELETE /api/v1/dev/api-keys/{id}Revoke a key

Developers do not use the partner /api/v1/messages endpoint. They use /api/v1/dev/messages with template_code.


Security checklist

  • Use HTTPS in production and the public sandbox
  • Rotate keys after a leak
  • Apply least-privilege scopes
  • Never embed a key in a public mobile app
  • Verify webhook signatures (Webhooks)

Unauthorized responses

{
  "error": {
    "code": "unauthorized",
    "message": "Invalid or expired API key."
  }
}

Statuses: 401 for an invalid key, or 403 for a disallowed scope, IP, or role.