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

# Send a message to registered users.

Creates a message that can be sent as a push, in-app, email or any combination of sending types. Single language support. Version v3 only.

# 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": {
    "/account/messages": {
      "post": {
        "servers": [
          {
            "url": "https://api.getbright.se/v3"
          }
        ],
        "deprecated": true,
        "summary": "Send a message to registered users.",
        "operationId": "account-messages",
        "description": "Creates a message that can be sent as a push, in-app, email or any combination of sending types. Single language support. Version v3 only.",
        "tags": [
          "messages"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MessageSingleLanguage"
              },
              "examples": {
                "newInvoice": {
                  "$ref": "#/components/examples/NewInvoice"
                }
              }
            }
          },
          "description": "Configure your message criteria and sending options."
        },
        "responses": {
          "200": {
            "description": "Message send request processed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "success": {
                          "type": "boolean"
                        },
                        "sentTo": {
                          "type": "array",
                          "minItems": 1,
                          "items": {
                            "type": "string"
                          },
                          "description": "A list of accountId's the message was sent to."
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "success": {
                    "$ref": "#/components/examples/MessageSuccess"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          }
        }
      }
    }
  },
  "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"
            ]
          }
        }
      },
      "MessageSingleLanguage": {
        "title": "MessageSingleLanguage",
        "description": "Fields used in a single language message.",
        "type": "object",
        "required": [
          "subject",
          "showInApp",
          "body"
        ],
        "allOf": [
          {
            "$ref": "#/components/schemas/MessageBase"
          },
          {
            "type": "object",
            "properties": {
              "organisation": {
                "type": "string",
                "minLength": 1
              },
              "title": {
                "type": "string",
                "minLength": 1
              },
              "body": {
                "type": "string",
                "minLength": 1
              },
              "type": {
                "type": "string",
                "minLength": 1,
                "enum": [
                  "information",
                  "warning",
                  "invoice",
                  "iot"
                ],
                "default": "information",
                "examples": [
                  "iot"
                ]
              },
              "pushType": {
                "type": "string",
                "minLength": 1,
                "enum": [
                  "information",
                  "daily",
                  "newInvoice",
                  "overdueInvoice",
                  "paidInvoice"
                ],
                "default": "information",
                "examples": [
                  "daily"
                ]
              },
              "subject": {
                "type": "string",
                "minLength": 1,
                "examples": [
                  "You have a new invoice available."
                ]
              },
              "content": {
                "type": "string",
                "minLength": 1
              },
              "url": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "target": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              },
              "showInApp": {
                "type": "boolean",
                "default": false
              },
              "sendNotification": {
                "type": "boolean",
                "default": false
              },
              "sendEmail": {
                "type": "boolean",
                "default": false
              }
            }
          }
        ]
      },
      "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"
            ]
          }
        ]
      },
      "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"
            ]
          }
        }
      }
    },
    "examples": {
      "MessageSuccess": {
        "summary": "MessageSuccess",
        "description": "Object returned for message requests that are processed successfuly.",
        "value": {
          "status": 0,
          "data": {
            "success": true,
            "sentTo": [
              "customer1",
              "customer2",
              "..."
            ]
          }
        }
      },
      "NewInvoice": {
        "summary": "NewInvoice",
        "description": "A generic message to inform users that last month's invoice is available to be handled.",
        "value": {
          "organisation": "my-organisation-name",
          "subject": "New invoice available.",
          "body": "You have a new invoice for the previous month available to view in My Pages",
          "to": {
            "all": true
          },
          "showInApp": true
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Pre-generated token given during initial onboarding. Tokens are environemnt specific."
      }
    },
    "responses": {
      "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"
  }
}
```