Skip to content
Developer

Session

Login and sessions4 EndpointsSession / Session

This method will get the active Session Object

GET/api/sessions

Query parameters

tokenIdentifiersstringJWTs to return with sessionAllowed: iw-externaliw-mqttiw-internalfirebaselanista
validSecondsnumberJWT valid for duration in seconds

Responses

200This method will get the active Session ObjectSession2

Show fields (16)
  • idinteger

    Primary key of the session. Internal ID.

  • sessionidstring

    ID of the session.

  • userUser4

    User the session belongs to.

    Show fields (12)
    • idinteger

      Primary key of the user. Internal ID of the login user.

    • namestring

      Display name of the user. Shown in the UI and in audit entries.

    • usernamestring

      Login name of the user. Must be unique across all users.

    • emailstring

      E-mail address of the user. Used for login notifications, password resets and as a login alias.

    • user_access_groupUserAccessGroup3

      User access group of the user. Defines the rights of the user for all scopes.

    • positioningeneralstring

      Free text describing the position or role of the user.

    • crm_personCRMPerson10

      CRM person linked to this login user. Connects the login account with the person record.

    • profile_picture_urlstring

      URL of the profile picture of the user.

    • archivedboolean

      Marks the user as archived. Archived users are kept for history and are not active.

    • require2faboolean

      Two-factor authentication is required for this user.

    • user_frontend_dataUserFrontendData

      Saved UI settings and favorites of the user.

    • search_stringstring

      Text that the entity can be searched by.

  • selectedcustomerCustomerProfile

    Customer profile selected in the session.

    Show fields (6)
    • idinteger

      Primary key of the customer profile. Internal ID.

    • slackchannelstring

      Slack channel of the customer profile.

    • displaynamestring

      Name shown for the customer profile.

    • deletedboolean

      Whether the customer profile is deleted.

    • createdstring (date-time)

      Point in time the entity was created.

    • updatedstring (date-time)

      Point in time the entity was last updated.

  • startstring (date-time)

    Point in time the session started.

  • refreshed_startstring (date-time)

    Point in time the session was last refreshed.

  • ipstring

    IP address of the client.

  • validboolean

    Whether the session is valid.

  • is_api_keyboolean

    Whether the session was created with an API key.

  • is_dgboolean

    Whether the session is for the DG (member organization) context.

  • missing2faboolean

    Whether two-factor authentication is still missing.

  • start_in_vpnboolean

    Whether the session started in a VPN.

  • auth_by_credentialsboolean

    Whether the session was authenticated with user name and password.

  • auth_by_googleboolean

    Whether the session was authenticated with Google.

  • auth_by_microsoftboolean

    Whether the session was authenticated with Microsoft.

  • auth_by_cloudflareboolean

    Whether the session was authenticated with Cloudflare Access.

Request
curl --request GET \
  --url https://your-instance.iw-erp.de/api/sessions \
  --header 'x-iw-jwt-token: <TOKEN>'
Response 200 application/json
{
  "id": 42,
  "sessionid": "string",
  "user": {
    "id": 42,
    "name": "Beispiel",
    "username": "lena.hartmann@example.org",
    "email": "lena.hartmann@example.org",
    "profile_picture_url": "https://vynst.de",
    "positioningeneral": "string",
    "crm_person": {
      "id": 42,
      "first_name": "Lena",
      "last_name": "Hartmann",
      "title": "Beispiel",
      "language": "de",
      "support_description": "Text",
      "profile_picture_url": "https://vynst.de",
      "address_street": "Jakobistr. 39",
      "address_city": "Hannover",
      "address_zip": "30163"
    },
    "archived": true,
    "require2fa": true,
    "user_frontend_data": {
      "id": 42
    }
  },
  "selectedcustomer": {
    "id": 42,
    "slackchannel": "string",
    "displayname": "string",
    "deleted": true,
    "created": "2026-10-15T09:30:00+02:00",
    "updated": "2026-10-15T09:30:00+02:00"
  },
  "start": "2026-10-15T09:30:00+02:00",
  "refreshed_start": "2026-10-15T09:30:00+02:00",
  "ip": "string",
  "valid": true,
  "is_api_key": true,
  "is_dg": true
}

Update Customer Profile on User

POST/api/sessions

Request body application/json

  • switchcustomerprofileSwitchCustomerProfile
    Show fields (1)
    • customerprofilestring

Responses

200Update Customer Profile on UserSession2

Show fields (16)
  • idinteger

    Primary key of the session. Internal ID.

  • sessionidstring

    ID of the session.

  • userUser4

    User the session belongs to.

    Show fields (12)
    • idinteger

      Primary key of the user. Internal ID of the login user.

    • namestring

      Display name of the user. Shown in the UI and in audit entries.

    • usernamestring

      Login name of the user. Must be unique across all users.

    • emailstring

      E-mail address of the user. Used for login notifications, password resets and as a login alias.

    • user_access_groupUserAccessGroup3

      User access group of the user. Defines the rights of the user for all scopes.

    • positioningeneralstring

      Free text describing the position or role of the user.

    • crm_personCRMPerson10

      CRM person linked to this login user. Connects the login account with the person record.

    • profile_picture_urlstring

      URL of the profile picture of the user.

    • archivedboolean

      Marks the user as archived. Archived users are kept for history and are not active.

    • require2faboolean

      Two-factor authentication is required for this user.

    • user_frontend_dataUserFrontendData

      Saved UI settings and favorites of the user.

    • search_stringstring

      Text that the entity can be searched by.

  • selectedcustomerCustomerProfile

    Customer profile selected in the session.

    Show fields (6)
    • idinteger

      Primary key of the customer profile. Internal ID.

    • slackchannelstring

      Slack channel of the customer profile.

    • displaynamestring

      Name shown for the customer profile.

    • deletedboolean

      Whether the customer profile is deleted.

    • createdstring (date-time)

      Point in time the entity was created.

    • updatedstring (date-time)

      Point in time the entity was last updated.

  • startstring (date-time)

    Point in time the session started.

  • refreshed_startstring (date-time)

    Point in time the session was last refreshed.

  • ipstring

    IP address of the client.

  • validboolean

    Whether the session is valid.

  • is_api_keyboolean

    Whether the session was created with an API key.

  • is_dgboolean

    Whether the session is for the DG (member organization) context.

  • missing2faboolean

    Whether two-factor authentication is still missing.

  • start_in_vpnboolean

    Whether the session started in a VPN.

  • auth_by_credentialsboolean

    Whether the session was authenticated with user name and password.

  • auth_by_googleboolean

    Whether the session was authenticated with Google.

  • auth_by_microsoftboolean

    Whether the session was authenticated with Microsoft.

  • auth_by_cloudflareboolean

    Whether the session was authenticated with Cloudflare Access.

Request
curl --request POST \
  --url https://your-instance.iw-erp.de/api/sessions \
  --header 'content-type: application/json' \
  --header 'x-iw-jwt-token: <TOKEN>' \
  --data '
{
  "switchcustomerprofile": {
    "customerprofile": "string"
  }
}
'
Response 200 application/json
{
  "id": 42,
  "sessionid": "string",
  "user": {
    "id": 42,
    "name": "Beispiel",
    "username": "lena.hartmann@example.org",
    "email": "lena.hartmann@example.org",
    "profile_picture_url": "https://vynst.de",
    "positioningeneral": "string",
    "crm_person": {
      "id": 42,
      "first_name": "Lena",
      "last_name": "Hartmann",
      "title": "Beispiel",
      "language": "de",
      "support_description": "Text",
      "profile_picture_url": "https://vynst.de",
      "address_street": "Jakobistr. 39",
      "address_city": "Hannover",
      "address_zip": "30163"
    },
    "archived": true,
    "require2fa": true,
    "user_frontend_data": {
      "id": 42
    }
  },
  "selectedcustomer": {
    "id": 42,
    "slackchannel": "string",
    "displayname": "string",
    "deleted": true,
    "created": "2026-10-15T09:30:00+02:00",
    "updated": "2026-10-15T09:30:00+02:00"
  },
  "start": "2026-10-15T09:30:00+02:00",
  "refreshed_start": "2026-10-15T09:30:00+02:00",
  "ip": "string",
  "valid": true,
  "is_api_key": true,
  "is_dg": true
}

This method will get the sso link with a token - set query parameter durableJwt=1 to get a long-lasting token without the option to login as the user

GET/api/sessions/{serviceName}/sso

Path parameters

serviceNamerequiredstring

Responses

200This method will get the sso link with a token - set query parameter durableJwt=1 to get a long-lasting token without the option to login as the userOpenDataRedirect

Request
curl --request GET \
  --url https://your-instance.iw-erp.de/api/sessions/42/sso \
  --header 'x-iw-jwt-token: <TOKEN>'
Response 200 application/json
{}

Verify 2FA code for this session

GET/api/session/verify2fa/{id}/{code}

Path parameters

idrequiredstring
coderequiredstring

Responses

200Verify 2FA code for this sessionSession2

Show fields (16)
  • idinteger

    Primary key of the session. Internal ID.

  • sessionidstring

    ID of the session.

  • userUser4

    User the session belongs to.

    Show fields (12)
    • idinteger

      Primary key of the user. Internal ID of the login user.

    • namestring

      Display name of the user. Shown in the UI and in audit entries.

    • usernamestring

      Login name of the user. Must be unique across all users.

    • emailstring

      E-mail address of the user. Used for login notifications, password resets and as a login alias.

    • user_access_groupUserAccessGroup3

      User access group of the user. Defines the rights of the user for all scopes.

    • positioningeneralstring

      Free text describing the position or role of the user.

    • crm_personCRMPerson10

      CRM person linked to this login user. Connects the login account with the person record.

    • profile_picture_urlstring

      URL of the profile picture of the user.

    • archivedboolean

      Marks the user as archived. Archived users are kept for history and are not active.

    • require2faboolean

      Two-factor authentication is required for this user.

    • user_frontend_dataUserFrontendData

      Saved UI settings and favorites of the user.

    • search_stringstring

      Text that the entity can be searched by.

  • selectedcustomerCustomerProfile

    Customer profile selected in the session.

    Show fields (6)
    • idinteger

      Primary key of the customer profile. Internal ID.

    • slackchannelstring

      Slack channel of the customer profile.

    • displaynamestring

      Name shown for the customer profile.

    • deletedboolean

      Whether the customer profile is deleted.

    • createdstring (date-time)

      Point in time the entity was created.

    • updatedstring (date-time)

      Point in time the entity was last updated.

  • startstring (date-time)

    Point in time the session started.

  • refreshed_startstring (date-time)

    Point in time the session was last refreshed.

  • ipstring

    IP address of the client.

  • validboolean

    Whether the session is valid.

  • is_api_keyboolean

    Whether the session was created with an API key.

  • is_dgboolean

    Whether the session is for the DG (member organization) context.

  • missing2faboolean

    Whether two-factor authentication is still missing.

  • start_in_vpnboolean

    Whether the session started in a VPN.

  • auth_by_credentialsboolean

    Whether the session was authenticated with user name and password.

  • auth_by_googleboolean

    Whether the session was authenticated with Google.

  • auth_by_microsoftboolean

    Whether the session was authenticated with Microsoft.

  • auth_by_cloudflareboolean

    Whether the session was authenticated with Cloudflare Access.

Request
curl --request GET \
  --url https://your-instance.iw-erp.de/api/session/verify2fa/42/42 \
  --header 'x-iw-jwt-token: <TOKEN>'
Response 200 application/json
{
  "id": 42,
  "sessionid": "string",
  "user": {
    "id": 42,
    "name": "Beispiel",
    "username": "lena.hartmann@example.org",
    "email": "lena.hartmann@example.org",
    "profile_picture_url": "https://vynst.de",
    "positioningeneral": "string",
    "crm_person": {
      "id": 42,
      "first_name": "Lena",
      "last_name": "Hartmann",
      "title": "Beispiel",
      "language": "de",
      "support_description": "Text",
      "profile_picture_url": "https://vynst.de",
      "address_street": "Jakobistr. 39",
      "address_city": "Hannover",
      "address_zip": "30163"
    },
    "archived": true,
    "require2fa": true,
    "user_frontend_data": {
      "id": 42
    }
  },
  "selectedcustomer": {
    "id": 42,
    "slackchannel": "string",
    "displayname": "string",
    "deleted": true,
    "created": "2026-10-15T09:30:00+02:00",
    "updated": "2026-10-15T09:30:00+02:00"
  },
  "start": "2026-10-15T09:30:00+02:00",
  "refreshed_start": "2026-10-15T09:30:00+02:00",
  "ip": "string",
  "valid": true,
  "is_api_key": true,
  "is_dg": true
}