DKBSignDocs

API reference

POSTPublic

Login

/api/v1/login

Exchange email and password for an access token. Use that token on every authenticated request.

Path parameters

This endpoint has no path parameters.

Query parameters

This endpoint has no query parameters.

Request body

FieldTypeDescription
email
Required
stringAccount email.
e.g. "user@acme.test"
password
Required
stringAccount password.
e.g. "P@ssw0rd!"

Responses

StatusMeaning
200See the example response.
403See the example response.
502See the example response.

Request

curl
curl -X POST 'https://api.dkbsigns.com/api/v1/login' \
  -H 'Content-Type: application/json' \
  -d '{"email":"user@acme.test","password":"P@ssw0rd!"}'

Response 200

json
{
  "message": "Logged in successfully",
  "data": {
    "user": {
      "id": 4,
      "role": "user",
      "email": "user@acme.test"
    },
    "access_token": "1|abcdefghijklmnopqrstuvwxyz"
  }
}