To notify all sub-users of a schedule change, an administrator can update the account’s global message. The notice appears at the top of the application. The same operation can change other shared options, such as the outgoing email sender.
Send an object containing the fields you want to change. For the notice in this example, supply the text in globalMessage. Omitted fields retain their values, and the response lets you check the resulting settings.
Request Details
HTTP method PATCH
Path /api/settings
Request Parameters
Send a JSON object containing the changes. Omitted or null fields retain their values, including within nested objects. An empty string clears a text field. The exception is smtp.password, where an empty string preserves the saved password.
advancedAvailable indicates whether the account’s licence capacity covers at least 100 devices and allows advanced settings to be changed. logoutPage, globalMessage, and smtp can also be changed below that threshold.
Request body parameters
| Parameter | Type | Required | Description |
|---|
companyNameStringOptional | String | No | Company name. |
primaryColorStringOptional | String | No | Primary colour, for example #206080. |
logoutPageStringOptional | String | No | HTTP or HTTPS address opened after sign-out. |
globalMessageStringOptional | String | No | Message displayed to subusers at the top of the application. |
contactEmail
contactInfoStringOptional | String | No | Contact email and contact information shown to users. |
smartsuppKey
tawkKeyStringOptional | String | No | Identifiers for the chat integrations. |
googleAnalytics
googleTagManagerStringOptional | String | No | Identifiers for Google Analytics and Google Tag Manager. |
domainStringOptional | String | No | Domain configured for the account. |
https
defaultStyles
darkModeBooleanOptional | Boolean | No | Settings for HTTPS, default styles and dark mode, respectively. |
stylesheetDesktop
stylesheetMobileStringOptional | String | No | Custom styles for desktop and mobile. |
loginHtmlStringOptional | String | No | Sign-in HTML. {{LoginBox}} represents the sign-in form. |
loginObjectOptional | Object | No | Sign-in page text, background colour and store links. |
smtpObjectOptional | Object | No | Server, sender and options for outgoing mail. |
mapsObjectOptional | Object | No | Map provider settings. |
pushObjectOptional | Object | No | Push notification settings. |
whatsAppObjectOptional | Object | No | WhatsApp integration settings. |
Fields in login
| Parameter | Type | Required | Description |
|---|
title
alertMessageStringOptional | String | No | Title and alert on the sign-in page. |
backgroundColorStringOptional | String | No | Background colour. |
upperMessage
lowerMessageStringOptional | String | No | Upper and lower messages. |
playStoreLink
appStoreLinkStringOptional | String | No | App store links. |
Fields in smtp
| Parameter | Type | Required | Description |
|---|
serverStringOptional | String | No | Outgoing mail server. |
portIntegerOptional | Integer | No | Server port. When configuring the server, use a port other than 25. |
tlsBooleanOptional | Boolean | No | Enables STARTTLS. |
userStringOptional | String | No | Mail server user name. |
fromStringOptional | String | No | Valid sender email address. |
maxDeviceNotificationsIntegerOptional | Integer | No | Per-device notification limit for the configured mail service. |
passwordStringOptional | String | No | Mail server password. An empty string keeps the saved password. |
Fields in maps
| Parameter | Type | Required | Description |
|---|
hereIdStringOptional | String | No | HERE ID. |
yandexBooleanOptional | Boolean | No | Enables Yandex maps. |
googleKey
bingKey
hereKey
mapboxKey
appleTokenStringOptional | String | No | Credential for the corresponding map provider. Write-only. |
Fields in push
| Parameter | Type | Required | Description |
|---|
firebaseKeyStringOptional | String | No | Firebase key for push notifications. Write-only. |
Fields in whatsApp
| Parameter | Type | Required | Description |
|---|
appId
accountId
phoneNumberIdStringOptional | String | No | App, account and phone number IDs for WhatsApp Business. |
templateNameStringOptional | String | No | WhatsApp template name. |
token
appSecretStringOptional | String | No | WhatsApp token and app secret. Write-only. |
Manage the logo, icon, backgrounds, email templates, and Telegram from the web.
Authentication Required
You need access to the settings page and must be an administrator of an account that is not licensed by another account. Demo users cannot save changes.
Send a valid bearer token in the Authorization header. See Authentication.
Example Request
PATCH /api/settings HTTP/1.1
Host: api.plaspy.com
Authorization: Bearer {token}
Content-Type: application/json
Example Request Body
{
"globalMessage": "Fleet maintenance on Monday"
}
Response Parameters
The Presence column describes an HTTP 200 response. Conditional fields are omitted when they have no value.
A successful update is recorded in the history and returns the saved settings in the same structure as GET /api/settings, with success: true.
| Field | Type | Presence | Description |
|---|
companyNameStringConditional | String | Conditional | Company name. |
primaryColorStringConditional | String | Conditional | Primary colour, for example #206080. |
logoutPageStringConditional | String | Conditional | HTTP or HTTPS address opened after sign-out. |
globalMessageStringConditional | String | Conditional | Message displayed to subusers at the top of the application. |
contactEmail
contactInfoStringConditional | String | Conditional | Contact email and contact information shown to users. |
smartsuppKey
tawkKeyStringConditional | String | Conditional | Identifiers for the chat integrations. |
googleAnalytics
googleTagManagerStringConditional | String | Conditional | Identifiers for Google Analytics and Google Tag Manager. |
domainStringConditional | String | Conditional | Domain configured for the account. |
https
defaultStyles
darkModeBooleanAlways | Boolean | Always | Settings for HTTPS, default styles and dark mode, respectively. |
stylesheetDesktop
stylesheetMobileStringConditional | String | Conditional | Custom styles for desktop and mobile. |
loginHtmlStringConditional | String | Conditional | Sign-in HTML. {{LoginBox}} represents the sign-in form. |
loginObjectAlways | Object | Always | Sign-in page text, background colour and store links. |
smtpObjectAlways | Object | Always | Server, sender and options for outgoing mail. |
mapsObjectAlways | Object | Always | Map provider settings. |
pushObjectAlways | Object | Always | Push notification settings. |
whatsAppObjectAlways | Object | Always | WhatsApp integration settings. |
logo
iconStringConditional | String | Conditional | Account logo and icon, when configured. |
telegramObjectAlways | Object | Always | Bot name and tokenSet indicator. Manage Telegram from the web. |
advancedAvailableBooleanAlways | Boolean | Always | Indicates whether licence capacity reaches 100 devices and advanced settings can be changed. |
successBooleanAlways | Boolean | Always | Set to true on success. |
apiUsageIntegerAlways | Integer | Always | Usage units for this request. |
apiDailyUsageIntegerAlways | Integer | Always | API units the user had used today before this request. |
Fields in login
| Field | Type | Presence | Description |
|---|
title
alertMessageStringConditional | String | Conditional | Title and alert on the sign-in page. |
backgroundColorStringConditional | String | Conditional | Background colour. |
upperMessage
lowerMessageStringConditional | String | Conditional | Upper and lower messages. |
playStoreLink
appStoreLinkStringConditional | String | Conditional | App store links. |
Fields in smtp
| Field | Type | Presence | Description |
|---|
serverStringConditional | String | Conditional | Outgoing mail server. |
portIntegerConditional | Integer | Conditional | Server port. When configuring the server, use a port other than 25. |
tlsBooleanAlways | Boolean | Always | Enables STARTTLS. |
userStringConditional | String | Conditional | Mail server user name. |
fromStringConditional | String | Conditional | Valid sender email address. |
maxDeviceNotificationsIntegerConditional | Integer | Conditional | Per-device notification limit for the configured mail service. |
passwordSetBooleanAlways | Boolean | Always | Whether a password is configured. |
Fields in maps
| Field | Type | Presence | Description |
|---|
hereIdStringConditional | String | Conditional | HERE ID. |
yandexBooleanAlways | Boolean | Always | Enables Yandex maps. |
googleKeySet
bingKeySet
hereKeySet
mapboxKeySet
appleTokenSetBooleanAlways | Boolean | Always | Each flag indicates whether credentials for that provider are configured. |
Fields in push
| Field | Type | Presence | Description |
|---|
firebaseKeySetBooleanAlways | Boolean | Always | Whether the Firebase key is configured. |
Fields in whatsApp
| Field | Type | Presence | Description |
|---|
appId
accountId
phoneNumberIdStringConditional | String | Conditional | App, account and phone number IDs for WhatsApp Business. |
templateNameStringConditional | String | Conditional | WhatsApp template name. |
tokenSet
appSecretSetBooleanAlways | Boolean | Always | Whether the token and app secret are configured. |
Fields in telegram
| Field | Type | Presence | Description |
|---|
botNameStringConditional | String | Conditional | Bot name. |
tokenSetBooleanAlways | Boolean | Always | Whether the token is configured. |
Example Successful Response
HTTP 200.
{
"success": true,
"apiUsage": 1,
"apiDailyUsage": 24,
"https": false,
"defaultStyles": false,
"darkMode": true,
"login": {},
"smtp": {
"tls": false,
"passwordSet": false
},
"maps": {
"googleKeySet": false,
"bingKeySet": false,
"hereKeySet": false,
"mapboxKeySet": false,
"appleTokenSet": false,
"yandex": false
},
"push": {
"firebaseKeySet": false
},
"whatsApp": {
"tokenSet": false,
"appSecretSet": false
},
"telegram": {
"tokenSet": false
},
"advancedAvailable": false,
"globalMessage": "Fleet maintenance on Monday"
}
Errors
| HTTP status | When it occurs |
|---|
| 400 | If a value is invalid, such as a malformed colour, an invalid contact email, or a domain already in use. Check the field named in errors. If the request quota has been reached, error contains the reason. |
| 401 | A valid bearer token is missing. |
| 403 | If permission is missing or if an advanced setting is changed without the necessary licence capacity. |
| 500 | An unexpected error occurred while processing the request. |
In an error response that includes success, its value is false and error contains the message. Field validation failures can appear in the errors object, with a list of messages for each field.
Example Error Response
{
"success": false,
"error": "These options are for accounts with 100 devices or more."
}