Do log in with email and password

POST /api/logins

Query parameters

  • iw-build-id string

    build id of the client

  • iw-package-id string

    package id of the client

  • tokenIdentifiers string

    JWTs to return with session

    Values are iw-external, iw-mqtt, iw-internal, firebase, or lanista.

application/json

Body Required

  • login object
    Hide login attributes Show login attributes object
    • username string
    • password string
    • token string

Responses

  • 200 application/json

    Do log in with email and password

    Hide response attributes Show response attributes object
    • id integer
    • sessionid string
    • selectedcustomer object
      Hide selectedcustomer attributes Show selectedcustomer attributes object
      • id integer
      • slackchannel string
      • displayname string
      • deleted boolean
      • created string(date-time)
      • updated string(date-time)
    • start string(date-time)
    • refreshed_start string(date-time)
    • ip string
    • valid boolean
    • is_api_key boolean
    • is_dg boolean
    • missing2fa boolean
    • start_in_vpn boolean
    • auth_by_credentials boolean
    • auth_by_google boolean
    • auth_by_microsoft boolean
    • auth_by_cloudflare boolean
POST /api/logins
curl \
 --request POST 'https://replace-with-own-host.iw-erp.de/api/logins' \
 --header "x-session-token: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"login":{"username":"string","password":"string","token":"string"}}'
Request examples
{
  "login": {
    "username": "string",
    "password": "string",
    "token": "string"
  }
}
Response examples (200)
{
  "id": 42,
  "sessionid": "string",
  "selectedcustomer": {
    "id": 42,
    "slackchannel": "string",
    "displayname": "string",
    "deleted": true,
    "created": "2025-05-04T09:42:00Z",
    "updated": "2025-05-04T09:42:00Z"
  },
  "start": "2025-05-04T09:42:00Z",
  "refreshed_start": "2025-05-04T09:42:00Z",
  "ip": "string",
  "valid": true,
  "is_api_key": true,
  "is_dg": true,
  "missing2fa": true,
  "start_in_vpn": true,
  "auth_by_credentials": true,
  "auth_by_google": true,
  "auth_by_microsoft": true,
  "auth_by_cloudflare": true
}