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

# Sync Account

Sync an account outside of user interactions. Use the customerId and we will fetch the correct account to sync, then return the `accountId` after success.

# 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/accounts/sync": {
      "parameters": [
        {
          "$ref": "#/components/parameters/customerId"
        },
        {
          "$ref": "#/components/parameters/asynchronous"
        },
        {
          "schema": {
            "type": "string",
            "examples": [
              "my-organisation-name"
            ],
            "minLength": 1
          },
          "name": "organisation",
          "in": "path",
          "required": true,
          "description": "The name of the organisation the account belongs to."
        }
      ],
      "put": {
        "summary": "Sync Account",
        "operationId": "account-accounts-sync",
        "description": "Sync an account outside of user interactions. Use the customerId and we will fetch the correct account to sync, then return the `accountId` after success.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "accountId": {
                      "type": "string",
                      "examples": [
                        "7cd79c17-af02-4905-addc-853b23d33364"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "tags": [
          "account"
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "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"
            ]
          }
        }
      }
    },
    "parameters": {
      "customerId": {
        "in": "query",
        "name": "customerId",
        "required": true,
        "schema": {
          "type": "string",
          "minLength": 1,
          "examples": [
            "7188df3d-8c5b-4359-a3aa-411e667629b4"
          ]
        },
        "description": "The Id of the customer. Usually the accountId."
      },
      "asynchronous": {
        "in": "query",
        "name": "asynchronous",
        "required": false,
        "schema": {
          "type": "boolean",
          "default": false
        },
        "description": "If the synchronization should be put in the queue, set to *true*. Otherwise omit or set to false."
      }
    },
    "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"
            }
          }
        }
      },
      "Forbidden": {
        "description": "Forbidden",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "name": "ForbiddenError",
              "message": "Invalid Token.",
              "status": 401,
              "error": true,
              "key": "TOKEN_INVALID",
              "uid": "a9c1f21f-a740-4346-9a79-3800fe8c8652"
            }
          }
        }
      },
      "NotFound": {
        "description": "Resource Not Found",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "name": "NotFoundError",
              "message": "The resource was not found.",
              "status": 404,
              "error": true,
              "key": "NotFoundError",
              "uid": "a9c1f21f-a740-4346-9a79-3800fe8c8652"
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "account",
      "description": "Account specific endpoints."
    }
  ],
  "externalDocs": {
    "description": "Bright Energy Developer Hub",
    "url": "https://developer.getbright.se"
  }
}
```