Assemble Developer Portal

Login messages (3.0)

Download OpenAPI specification:Download

This documentation describes how to manage and acknowledge login messages.

This API requires the login message feature. Managing login messages is only available to users with the "Login Messages - Manage" administrator permission.

Manage Login Messages

List all login messages

Retrieve a paginated list of all login messages for the organisation.

Authorizations:
JWT
query Parameters
q
string
Example: q=Policy

Search login messages by title

status
string
Enum: "active" "inactive"
Example: status=active

Filter login messages by status

frequency_period
string or null
Enum: "once" "days" "weeks" "months" "always"
Example: frequency_period=days

Filter login messages by the frequency period. Use always for every login.

frequency_number
integer or null
Example: frequency_number=7

Filter login messages by the frequency number

created_by
integer
Example: created_by=123

Filter login messages by the user who created them (by user ID)

Responses

Response Schema: application/json
Array of objects (Login Message)
object

Response samples

Content type
application/json
{
  • "data": [
    • {
      • "id": 567,
      • "created_by": {
        • "id": 46485,
        • "display_name": "John Smith",
        • "title": "Mr",
        • "profile_photo_url": "http://example.com",
        • "can_manage": true,
        • "role_name": "Volunteer",
        • "team_name": "Kent",
        • "status": {
          • "id": "1",
          • "name": "Active",
          • "contactable": true
          }
        },
      • "disabled_by": {
        • "id": 46485,
        • "display_name": "John Smith",
        • "title": "Mr",
        • "profile_photo_url": "http://example.com",
        • "can_manage": true,
        • "role_name": "Volunteer",
        • "team_name": "Kent",
        • "status": {
          • "id": "1",
          • "name": "Active",
          • "contactable": true
          }
        },
      • "created_at": "2020-01-01 13:00:00",
      • "updated_at": "2020-01-01 13:00:00",
      • "title": "Compulsory training login message",
      • "message": "Lorem markdownum quae. Lapis adeo latices male Hyperione rapuere eminet,\nprohibent caeruleum, et glacialis, ait tua. A animoque vetus. Hunc dentes\nimplet! Itys secundo cuspide ausus, nec prodis artibus spectes conducit valeant\nquantum ora cum dolore.\n\n- Montano mirabile perire\n- Mota coniectos tractum retia quem caput indicat\n- Illud umeris\n\nQuam pellor vertit. Viget ramis est Ulixis postquam Amyntor in in inquit\nobscenae gratissime et invasit amores.",
      • "frequency_period": "days",
      • "frequency_number": 7,
      • "status": "active"
      }
    ],
  • "meta": {
    • "pagination": {
      • "total": "string",
      • "count": "string",
      • "per_page": "string",
      • "current_page": "string",
      • "total_pages": "string",
      • "links": {
        • "next": "string",
        • "previous": "string"
        }
      }
    }
}

Create a login message

Creates a new login message for the organisation.

Authorizations:
JWT
Request Body schema: application/json
title
required
string

Updated Safeguarding Policy

message
required
string

Login message (markdown)

frequency_period
required
string
Enum: "once" "days" "weeks" "months" "always"

Login message frequency period. Use always for every login.

frequency_number
required
integer or null

Login message frequency number. 0 for every login. null when frequency_period is once.

status
required
string
Enum: "active" "inactive"

Login message status

Responses

Response Schema: application/json
object (Login Message)

Request samples

Content type
application/json
Example
{
  • "title": "Updated Safeguarding Policy",
  • "message": "Lorem markdownum quae. Lapis adeo latic",
  • "frequency_period": "days",
  • "frequency_number": 7,
  • "status": "active",
  • "clear_logs": false
}

Response samples

Content type
application/json
{
  • "data": {
    • "id": 567,
    • "created_by": {
      • "id": 46485,
      • "display_name": "John Smith",
      • "title": "Mr",
      • "profile_photo_url": "http://example.com",
      • "can_manage": true,
      • "role_name": "Volunteer",
      • "team_name": "Kent",
      • "status": {
        • "id": "1",
        • "name": "Active",
        • "contactable": true
        }
      },
    • "disabled_by": {
      • "id": 46485,
      • "display_name": "John Smith",
      • "title": "Mr",
      • "profile_photo_url": "http://example.com",
      • "can_manage": true,
      • "role_name": "Volunteer",
      • "team_name": "Kent",
      • "status": {
        • "id": "1",
        • "name": "Active",
        • "contactable": true
        }
      },
    • "created_at": "2020-01-01 13:00:00",
    • "updated_at": "2020-01-01 13:00:00",
    • "title": "Compulsory training login message",
    • "message": "Lorem markdownum quae. Lapis adeo latices male Hyperione rapuere eminet,\nprohibent caeruleum, et glacialis, ait tua. A animoque vetus. Hunc dentes\nimplet! Itys secundo cuspide ausus, nec prodis artibus spectes conducit valeant\nquantum ora cum dolore.\n\n- Montano mirabile perire\n- Mota coniectos tractum retia quem caput indicat\n- Illud umeris\n\nQuam pellor vertit. Viget ramis est Ulixis postquam Amyntor in in inquit\nobscenae gratissime et invasit amores.",
    • "frequency_period": "days",
    • "frequency_number": 7,
    • "status": "active"
    }
}

Get a login messages

Retrieve an individual login message.

Authorizations:
JWT
path Parameters
id
required
integer
Example: 654

Login message ID

Responses

Response Schema: application/json
object (Login Message)

Response samples

Content type
application/json
{
  • "data": {
    • "id": 567,
    • "created_by": {
      • "id": 46485,
      • "display_name": "John Smith",
      • "title": "Mr",
      • "profile_photo_url": "http://example.com",
      • "can_manage": true,
      • "role_name": "Volunteer",
      • "team_name": "Kent",
      • "status": {
        • "id": "1",
        • "name": "Active",
        • "contactable": true
        }
      },
    • "disabled_by": {
      • "id": 46485,
      • "display_name": "John Smith",
      • "title": "Mr",
      • "profile_photo_url": "http://example.com",
      • "can_manage": true,
      • "role_name": "Volunteer",
      • "team_name": "Kent",
      • "status": {
        • "id": "1",
        • "name": "Active",
        • "contactable": true
        }
      },
    • "created_at": "2020-01-01 13:00:00",
    • "updated_at": "2020-01-01 13:00:00",
    • "title": "Compulsory training login message",
    • "message": "Lorem markdownum quae. Lapis adeo latices male Hyperione rapuere eminet,\nprohibent caeruleum, et glacialis, ait tua. A animoque vetus. Hunc dentes\nimplet! Itys secundo cuspide ausus, nec prodis artibus spectes conducit valeant\nquantum ora cum dolore.\n\n- Montano mirabile perire\n- Mota coniectos tractum retia quem caput indicat\n- Illud umeris\n\nQuam pellor vertit. Viget ramis est Ulixis postquam Amyntor in in inquit\nobscenae gratissime et invasit amores.",
    • "frequency_period": "days",
    • "frequency_number": 7,
    • "status": "active"
    }
}

Update a login message

Update an existing login message.

Authorizations:
JWT
path Parameters
id
required
integer
Example: 654

Login message ID

Request Body schema: application/json
title
string

Updated Safeguarding Policy

message
string

Login message (markdown)

frequency_period
string
Enum: "once" "days" "weeks" "months" "always"

Login message frequency period. Use always for every login.

frequency_number
integer or null

Login message frequency number. 0 for every login. null when frequency_period is once.

status
string
Enum: "active" "inactive"

Login message status

clear_logs
boolean
Default: false

Responses

Response Schema: application/json
object (Login Message)

Request samples

Content type
application/json
Example
{
  • "title": "Updated Safeguarding Policy",
  • "message": "Lorem markdownum quae. Lapis adeo latic",
  • "frequency_period": "days",
  • "frequency_number": 7,
  • "status": "active",
  • "clear_logs": false
}

Response samples

Content type
application/json
{
  • "data": {
    • "id": 567,
    • "created_by": {
      • "id": 46485,
      • "display_name": "John Smith",
      • "title": "Mr",
      • "profile_photo_url": "http://example.com",
      • "can_manage": true,
      • "role_name": "Volunteer",
      • "team_name": "Kent",
      • "status": {
        • "id": "1",
        • "name": "Active",
        • "contactable": true
        }
      },
    • "disabled_by": {
      • "id": 46485,
      • "display_name": "John Smith",
      • "title": "Mr",
      • "profile_photo_url": "http://example.com",
      • "can_manage": true,
      • "role_name": "Volunteer",
      • "team_name": "Kent",
      • "status": {
        • "id": "1",
        • "name": "Active",
        • "contactable": true
        }
      },
    • "created_at": "2020-01-01 13:00:00",
    • "updated_at": "2020-01-01 13:00:00",
    • "title": "Compulsory training login message",
    • "message": "Lorem markdownum quae. Lapis adeo latices male Hyperione rapuere eminet,\nprohibent caeruleum, et glacialis, ait tua. A animoque vetus. Hunc dentes\nimplet! Itys secundo cuspide ausus, nec prodis artibus spectes conducit valeant\nquantum ora cum dolore.\n\n- Montano mirabile perire\n- Mota coniectos tractum retia quem caput indicat\n- Illud umeris\n\nQuam pellor vertit. Viget ramis est Ulixis postquam Amyntor in in inquit\nobscenae gratissime et invasit amores.",
    • "frequency_period": "days",
    • "frequency_number": 7,
    • "status": "active"
    }
}

List all logs for a login message

Retrieve a paginated list of all logs for a login message.

Authorizations:
JWT
path Parameters
id
required
integer
Example: 654

Login message ID

query Parameters
date
string
Example: date=2024-06-26T00:00:00.000Z

Filter logs by acknowledgement date

user
integer
Example: user=123

Filter logs by the user (user ID)

Responses

Response Schema: application/json
Array of objects (Login Message Log)
object

Response samples

Content type
application/json
{
  • "data": [
    • {
      • "id": 567,
      • "user": {
        • "id": 46485,
        • "display_name": "John Smith",
        • "title": "Mr",
        • "profile_photo_url": "http://example.com",
        • "can_manage": true,
        • "role_name": "Volunteer",
        • "team_name": "Kent",
        • "status": {
          • "id": "1",
          • "name": "Active",
          • "contactable": true
          }
        },
      • "created_at": "2020-01-01 13:00:00",
      • "updated_at": "2020-01-01 13:00:00"
      }
    ],
  • "meta": {
    • "pagination": {
      • "total": "string",
      • "count": "string",
      • "per_page": "string",
      • "current_page": "string",
      • "total_pages": "string",
      • "links": {
        • "next": "string",
        • "previous": "string"
        }
      }
    }
}

View/Acknowledge Login Messages

Get login messages for a user

Retrieve all login messages that a user has not acknowledged.

This endpoint can only retrieve login messages for the currently authenticated user.

Authorizations:
JWT
path Parameters
userId
required
integer
Example: 865

User ID

Responses

Response Schema: application/json
Array of objects (User Login Message)

Response samples

Content type
application/json
{
  • "data": [
    • {
      • "id": 567,
      • "title": "Daily notification",
      • "message": "Daily information that is of interested for the current logged user."
      }
    ]
}

Acknowledge a login message

Acknowledge a login message for a user.

This endpoint can only acknowledge login messages for the currently authenticated user.

Authorizations:
JWT
path Parameters
userId
required
integer
Example: 865

User ID

id
required
integer
Example: 654

Login message ID

Request Body schema: application/json
acknowledged
required
boolean

Acknowledge a message

Responses

Request samples

Content type
application/json
{
  • "acknowledged": true
}

Response samples

Content type
application/json
{
  • "message": "Unauthorized action",
  • "status_code": "403"
}