Skip to main content
Notices are short informational messages displayed to users in the sidebar notice panel and optionally on the login screen. They are commonly used for maintenance announcements, policy updates, and urgent alerts. All state-mutating requests require a CSRF token from GET /api/security/csrf-token.

List notices

GET /api/notices Returns all active notices visible to the authenticated user. The list is filtered by account type so each user only sees notices targeted at them. Required permission: api.system.notices.manage
curl -X GET "https://propops.yourcompany.com/api/notices" \
  -H "Authorization: Bearer <token>"
{
  "success": true,
  "data": [
    {
      "id": 1,
      "title": "Planned maintenance window",
      "body": "The system will be unavailable on Sunday 23rd June from 02:00–04:00 for a scheduled upgrade.",
      "type": "warning",
      "show_on_login": true,
      "target_account_types": [1, 2, 3, 4, 5],
      "created_by": "Admin",
      "created_at": "2024-06-14T09:00:00Z",
      "expires_at": "2024-06-24T04:00:00Z"
    }
  ],
  "count": 1,
  "message": "Operation completed successfully"
}
data
array
Array of notice objects.

Create a notice

POST /api/notices Creates a new notice. Staff only. Required permission: api.system.notices.manage
Account types: Staff only
Requires CSRF token.
title
string
required
Short headline (max 100 characters).
body
string
required
Full notice text.
type
string
required
Notice type: info, warning, error, or success.
show_on_login
boolean
default:"false"
Display this notice on the login screen.
target_account_types
array
Account type IDs to target (1 = Staff, 2 = Agent, 3 = Landlord, 4 = Tenant, 5 = Contractor). Omit to show to all types.
expires_at
string
ISO 8601 datetime when the notice should auto-expire. Omit for a permanent notice.
csrf_token
string
required
CSRF token from GET /api/security/csrf-token.
curl -X POST "https://propops.yourcompany.com/api/notices" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Planned maintenance window",
    "body": "The system will be unavailable on Sunday 23rd June from 02:00–04:00 for a scheduled upgrade.",
    "type": "warning",
    "show_on_login": true,
    "target_account_types": [1, 2, 3, 4, 5],
    "expires_at": "2024-06-24T04:00:00Z",
    "csrf_token": "<csrf-token>"
  }'
{
  "success": true,
  "data": { "id": 2 },
  "message": "Notice created"
}

Update a notice

PUT /api/notices Updates an existing notice. Only the fields you provide are changed. Required permission: api.system.notices.manage
Requires CSRF token.
id
integer
required
ID of the notice to update.
title
string
Updated title.
body
string
Updated body text.
type
string
Updated type.
show_on_login
boolean
Updated login-page visibility.
expires_at
string
Updated expiry datetime.
csrf_token
string
required
CSRF token.

Delete a notice

DELETE /api/notices Permanently removes a notice. Required permission: api.system.notices.manage
Requires CSRF token.
id
integer
required
ID of the notice to delete.
csrf_token
string
required
CSRF token from GET /api/security/csrf-token.
curl -X DELETE "https://propops.yourcompany.com/api/notices" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"id": 1, "csrf_token": "<csrf-token>"}'
{
  "success": true,
  "message": "Notice deleted"
}