---
updatedAt: 2026-08-28T15:01:11.000Z
agentTools:
  projectIndex: https://developer.getbright.se/llms.txt
---

# Send a message to registered users. Multi-language support.

Creates a message that can be sent as a push, in-app, email or any combination of sending types.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Bright-API",
    "version": "v1.0",
    "contact": {
      "name": "Bright Energy",
      "url": "https://www.getbright.se",
      "email": "support@getbright.se"
    },
    "description": "<br>\n<img src=\"https://bright-documentation-assets.s3.eu-north-1.amazonaws.com/bright-API-logo.svg\" width=\"300\">\n\nThis API is intended to allow Bright clients the ability to trigger events in the Bright backend.\n",
    "license": {
      "url": "https://opensource.org/licenses/MIT",
      "name": "MIT"
    },
    "summary": "Bright API"
  },
  "servers": [
    {
      "url": "https://api.getbright.se/{brightAPIbasePath}",
      "description": "Variable based url structure.\n`brightAPIbasePath` is the version of the API you are using.",
      "variables": {
        "brightAPIbasePath": {
          "enum": [
            "v4"
          ],
          "default": "v4"
        }
      }
    }
  ],
  "paths": {
    "/{organisation}/account/messages": {
      "post": {
        "summary": "Send a message to registered users. Multi-language support.",
        "operationId": "account-organisation-messages",
        "responses": {
          "200": {
            "$ref": "#/components/responses/OK"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          }
        },
        "description": "Creates a message that can be sent as a push, in-app, email or any combination of sending types.",
        "parameters": [
          {
            "in": "path",
            "name": "organisation",
            "example": [
              "my-organisation-name"
            ],
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true,
            "description": "The name of the organisation the account belongs to."
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MessageMultiLanguage"
              },
              "examples": {
                "In-app and push to all": {
                  "value": {
                    "to": {
                      "all": true
                    },
                    "title": {
                      "en": "English title",
                      "sv": "Svensk titel"
                    },
                    "body": {
                      "en": "English body text",
                      "sv": "Svensk body text"
                    },
                    "app": {
                      "type": "INFORMATION"
                    },
                    "push": {
                      "type": "info"
                    },
                    "priority": "default"
                  }
                },
                "Push only to select customers": {
                  "value": {
                    "to": {
                      "customerIds": [
                        "customer-1",
                        "customer-2"
                      ]
                    },
                    "title": "Title for all",
                    "body": {
                      "en": "English body",
                      "sv": "Svensk body"
                    },
                    "push": {
                      "type": "info"
                    },
                    "priority": "high"
                  }
                },
                "In-app only to all": {
                  "value": {
                    "to": {
                      "all": true
                    },
                    "title": "Title for all",
                    "body": "Body for all",
                    "app": {
                      "type": "INFORMATION",
                      "secondaryTitle": {
                        "en": "English title",
                        "sv": "Svensk titel"
                      },
                      "secondaryBody": {
                        "en": "English body",
                        "sv": "Svensk body"
                      }
                    },
                    "priority": "default"
                  }
                }
              }
            }
          },
          "description": "This endpoint is designed to be a generic message POST allowing you to send a single message request for all your supported langauages, removing the need to send a single message request for each language.\n\nYou can target all users, specific customerIds or specific userIds.\n\nIf you want to send the same content for all languages, use a string for [`title`, `body`, `app.secondaryTitle`, `app.secondaryBody`]."
        },
        "tags": [
          "messages"
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "MessageBase": {
        "title": "MessageBase",
        "description": "The standard fields used in all messages.",
        "type": "object",
        "required": [
          "to"
        ],
        "properties": {
          "to": {
            "$ref": "#/components/schemas/MessageTo"
          },
          "priority": {
            "description": "The level of priority the message has.",
            "type": "string",
            "minLength": 1,
            "enum": [
              "high",
              "normal",
              "default"
            ],
            "default": "default",
            "examples": [
              "default"
            ]
          }
        }
      },
      "MessageMultiLanguage": {
        "title": "MessageMultiLanguage",
        "description": "Fields used in a multilanguage message.",
        "type": "object",
        "required": [
          "title",
          "priority",
          "body"
        ],
        "allOf": [
          {
            "$ref": "#/components/schemas/MessageBase"
          },
          {
            "type": "object",
            "properties": {
              "title": {
                "$ref": "#/components/schemas/LanguageCopy"
              },
              "body": {
                "$ref": "#/components/schemas/LanguageCopy"
              },
              "app": {
                "$ref": "#/components/schemas/MessageApp"
              },
              "push": {
                "$ref": "#/components/schemas/MessagePush"
              }
            }
          }
        ]
      },
      "LanguageCopy": {
        "title": "LanguageCopy",
        "description": "A flexible entity allowing for use of the multilangauge object or a single string.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/LanguageCopyObject"
          },
          {
            "$ref": "#/components/schemas/LanguageCopyString",
            "description": "Use for same content across all langauages."
          }
        ],
        "examples": [
          {
            "en": "English text",
            "sv": "Svensk text",
            "fi": "Suomenkielinen teksti",
            "nn": "Norsk tekst",
            "nb": "Norsk tekst"
          },
          "General text for all users"
        ]
      },
      "LanguageCopyObject": {
        "title": "LanguageCopyObject",
        "type": "object",
        "description": "A single object that allows for language specific strings to be sent together for localisation purposes.",
        "minProperties": 1,
        "properties": {
          "en": {
            "$ref": "#/components/schemas/LanguageCopyString"
          },
          "sv": {
            "$ref": "#/components/schemas/LanguageCopyString"
          },
          "fi": {
            "$ref": "#/components/schemas/LanguageCopyString"
          },
          "nn": {
            "$ref": "#/components/schemas/LanguageCopyString"
          },
          "nb": {
            "$ref": "#/components/schemas/LanguageCopyString"
          }
        }
      },
      "LanguageCopyString": {
        "title": "LanguageCopyString",
        "description": "A standard string localised for messaging.",
        "type": "string",
        "minLength": 1,
        "examples": [
          "This is a message for a specific language.",
          "This is a different message for a different language.",
          "This is a thrid message for a third language."
        ]
      },
      "MessageUrl": {
        "title": "MessageUrl",
        "description": "A flexible object allowing for use of the multilangauge object or a string.",
        "oneOf": [
          {
            "type": "object",
            "description": "A message url. If you submit a string the same url will be used for all languages.",
            "required": [
              "name",
              "target"
            ],
            "properties": {
              "name": {
                "$ref": "#/components/schemas/LanguageCopyObject"
              },
              "target": {
                "$ref": "#/components/schemas/LanguageCopyObject"
              }
            }
          },
          {
            "type": "string",
            "description": "To use same url for all languages.",
            "format": "uri",
            "minLength": 3,
            "pattern": "/[(http(s)?):\\/\\/(www\\.)?a-zA-Z0-9@:%._\\+~#=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%_\\+.~#?&//=]*)/",
            "examples": [
              "https://example.com/blogpost"
            ]
          }
        ]
      },
      "MessageTo": {
        "title": "MessageTo",
        "description": "Message recipiants. Send only customerIds or userids if the messsage should be sent to specific individuals.",
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "all": {
                "type": "boolean"
              }
            }
          },
          {
            "type": "object",
            "properties": {
              "customerIds": {
                "description": "These are the accountId's you would like to target for messaging.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "examples": [
          {
            "customerIds": [
              "test-id",
              "test-id2"
            ]
          }
        ]
      },
      "MessageApp": {
        "title": "MessageApp",
        "type": "object",
        "description": "Data for the in-app message.\n\n`secondaryTitle` and `secondaryBody` are used in the app to display further information. These properties will be display on the message page when selecting a message for further information.\n\n`url` can be used to redirect the user to a webpage. `url.name` will be the text displayed on the button the user presses to open the webview and `url.target` will be the url the user is redirected to.",
        "examples": [
          {
            "type": "INFORMATION",
            "secondaryTitle": {
              "en": "English title",
              "sv": "Svensk titel"
            },
            "url": {
              "name": {
                "en": "Read more",
                "sv": "Läs mer"
              },
              "target": {
                "en": "https://www.english.example",
                "sv": "https://www.swedish.example"
              }
            }
          },
          {
            "type": "INFORMATION",
            "secondaryTitle": "Title for all",
            "secondaryBody": "Body text for all"
          }
        ],
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "minLength": 1,
            "enum": [
              "INFORMATION",
              "WARNING",
              "WASTE",
              "BADGES",
              "INVOICE",
              "MONTHLY_REPORT",
              "IOT"
            ],
            "default": "INFORMATION"
          },
          "secondaryTitle": {
            "$ref": "#/components/schemas/LanguageCopy"
          },
          "secondaryBody": {
            "$ref": "#/components/schemas/LanguageCopy"
          },
          "url": {
            "$ref": "#/components/schemas/MessageUrl"
          }
        }
      },
      "MessagePush": {
        "title": "MessagePush",
        "description": "Data for the push notification.",
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "deprecated": true,
            "description": "DEPRECIATED. Use the `navigation` property instead.\n\nDetermines where in the app the push notification should link to.\n",
            "minLength": 1,
            "enum": [
              "info",
              "daily",
              "newInvoice",
              "overdueInvoice",
              "paidInvoice",
              "clean",
              "dirty",
              "highPrice",
              "lowPrice",
              "actionError",
              "monthlyReport"
            ],
            "default": "information"
          },
          "navigation": {
            "type": "object",
            "minProperties": 1,
            "properties": {
              "target": {
                "type": "string",
                "description": "Defines an app navigation target.\n\nIf `APP_MESSAGE`, it will navigate to the Message feed/inbox in the app or if an **app** message is defined along side the push message. The push message will navigate to the created in app message.\n",
                "minLength": 1,
                "default": "HOME_TAB",
                "enum": [
                  "HOME_TAB",
                  "SPOTPRICE_TAB",
                  "INSIGHTS_TAB",
                  "CONTROL_TAB",
                  "SETTINGS_TAB",
                  "APP_MESSAGE"
                ],
                "examples": [
                  "HOME_TAB"
                ]
              }
            }
          }
        },
        "examples": [
          {
            "type": "information"
          }
        ]
      },
      "Success": {
        "title": "Success",
        "description": "The standard success object used in API responses",
        "type": "object",
        "properties": {}
      },
      "Error": {
        "title": "Error",
        "description": "The standard error object used in API responses",
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "examples": [
              "GenericError"
            ]
          },
          "message": {
            "type": "string",
            "examples": [
              "An error of some origin has occurred."
            ]
          },
          "status": {
            "type": "number",
            "format": "int32",
            "minimum": 400,
            "maximum": 600,
            "examples": [
              400
            ]
          },
          "error": {
            "type": "boolean",
            "examples": [
              true
            ]
          },
          "key": {
            "type": "string",
            "examples": [
              "GenericError"
            ]
          },
          "uid": {
            "type": "string",
            "examples": [
              "25198069-6171-410c-bfed-5e0666402c08"
            ]
          }
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Pre-generated token given during initial onboarding. Tokens are environemnt specific."
      }
    },
    "responses": {
      "OK": {
        "description": "Success",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Success"
            }
          }
        }
      },
      "BadRequest": {
        "description": "Bad Request",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "name": "BadRequestError",
              "message": "The request was malformed.",
              "status": 400,
              "error": true,
              "key": "BadRequestError",
              "uid": "y9g1f21f-a740-4346-9a79-3800fe8c8644"
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "messages",
      "description": "Messages (in-app, push, email).",
      "externalDocs": {
        "description": "Learn about which message types exist and how they are viewed by the user.",
        "url": "https://www.getbright.se/docs/inkorgen/"
      }
    }
  ],
  "externalDocs": {
    "description": "Bright Energy Developer Hub",
    "url": "https://developer.getbright.se"
  }
}
```