Skip to main content
POST
/
api
/
v1
/
auth
/
login
Login
curl --request POST \
  --url https://api.example.com/api/v1/auth/login \
  --header 'Content-Type: application/json' \
  --data '
{
  "account": "<string>",
  "email": "[email protected]",
  "password": "<string>"
}
'
{
  "token": "<string>",
  "refresh_token": "<string>",
  "expires_in": 123,
  "account": {
    "id": "<string>",
    "slug": "<string>",
    "name": "<string>",
    "created_at": "2023-11-07T05:31:56Z"
  },
  "user": {
    "id": "<string>",
    "email": "<string>",
    "role": "<string>",
    "is_active": true,
    "created_at": "2023-11-07T05:31:56Z"
  }
}

Body

application/json

Request body for user login.

account
string
required

Account identifier (slug or ID in XX#### format)

Minimum string length: 1
email
string<email>
required

User's email address

password
string
required

User's password

Minimum string length: 1

Response

Successful Response

Response for successful authentication (login).

token
string
required

JWT access token

refresh_token
string
required

JWT refresh token

expires_in
integer
required

Access token expiration time in seconds

account
AccountResponse · object
required

Account information

user
UserResponse · object
required

User information