Authentication
Sinas uses email-based OTP authentication, with API keys available for programmatic access.
OTP Authentication
Client sends email to
POST /auth/loginSinas sends a 6-digit code to that email (valid for 10 minutes by default)
Client submits code to
POST /auth/verify-otpSinas returns an access token (short-lived JWT, default 15 min) and a refresh token (long-lived, default 30 days)
Use the access token in the
Authorization: Bearer <token>headerWhen the access token expires, use
POST /auth/refreshto get a new one
Endpoints:
API Keys
For programmatic access (scripts, CI/CD, integrations), create API keys instead of using short-lived JWT tokens. Each key has its own set of permissions (a subset of the creating user's permissions).
API keys can be used via Authorization: Bearer <key> or X-API-Key: <key> headers. Keys can have optional expiration dates.