Skip to main content
POST
/
auth
/
login
User login
curl --request POST \
  --url https://api-message.nativehub.live/api/v1/auth/login \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "username": "john.doe",
  "password": "SecureP@ssw0rd",
  "tenant_id": "c3d4e5f6-a7b8-9012-cdef-123456789012"
}
'
{
  "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "user": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "account_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
    "tenant_id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
    "username": "john.doe",
    "email": "[email protected]",
    "role": "admin",
    "permissions": [
      "messages.send",
      "campaigns.manage"
    ],
    "status": "active",
    "created_at": "2026-01-15T10:30:00Z",
    "updated_at": "2026-02-10T14:22:00Z"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
username
string
required
password
string
required
tenant_id
string

Response

Login successful

access_token
string
refresh_token
string
user
object
Example:
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"account_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"tenant_id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"username": "john.doe",
"email": "[email protected]",
"role": "admin",
"permissions": [
"messages.send",
"campaigns.manage",
"contacts.manage"
],
"status": "active",
"created_at": "2026-01-15T10:30:00Z",
"updated_at": "2026-02-10T14:22:00Z"
}