Skip to main content

Dashboards - Update

Endpoint

/i/dashboards/update

Overview

Updates dashboard metadata such as name, theme, sharing configuration, and refresh settings.

Authentication

Countly API supports three authentication methods:

  1. API key query parameter: api_key=YOUR_API_KEY
  2. Auth token query parameter: auth_token=YOUR_AUTH_TOKEN
  3. Auth token header: countly-token: YOUR_AUTH_TOKEN

Permissions

No separate feature permission flag is checked. The handler enforces:

  • authenticated user,
  • dashboard visibility check,
  • owner-only update for non-global-admin users.

Request Parameters

ParameterTypeRequiredDescription
dashboard_idStringYesDashboard ID (24-char ObjectId string).
nameStringYesUpdated dashboard name.
share_withStringYesSharing mode: all-users, selected-users, or none.
themeString or NumberNoUpdated theme value.
shared_email_editJSON String (Array)NoNew edit email list.
shared_email_viewJSON String (Array)NoNew view email list.
shared_user_groups_editJSON String (Array)NoNew edit group list.
shared_user_groups_viewJSON String (Array)NoNew view group list.
use_refresh_rateBoolean StringNoEnables refresh-rate processing when not false.
refreshRateNumberNoRefresh interval in minutes; minimum persisted value is 5 minutes.
send_email_invitationBoolean StringNoIf true, invitations are sent to newly added recipients only.
api_keyStringConditionalRequired if auth_token is not provided.
auth_tokenStringConditionalRequired if api_key is not provided.

Array Parameter Structure

Examples of decoded JSON arrays:

  • shared_email_view: ["viewer@company.com"]
  • shared_user_groups_edit: ["65dc6a52a2f7156eb2576f00"]

Configuration Impact

SettingDefaultAffectsUser-visible impact
dashboards.sharing_statustrueProcessing flowIf disabled, sharing fields may not be updated for non-eligible users even when other dashboard fields are updated.

Response

Success Response

{
"acknowledged": true,
"matchedCount": 1,
"modifiedCount": 1
}

Response Fields

FieldTypeDescription
acknowledgedBooleanDatabase update operation acknowledgment.
matchedCountNumberNumber of matched dashboard documents.
modifiedCountNumberNumber of modified dashboard documents.
errorBooleanPresent in access-denied branch.
dashboard_access_deniedBooleantrue when user cannot view dashboard.

Error Responses

  • 400
{
"result": "Invalid parameter: dashboard_id"
}
  • 400
{
"result": "Missing parameter: name"
}
  • 400
{
"result": "Missing parameter: share_with"
}
  • 400
{
"result": "Parameter needs to be an array: shared_email_edit"
}
  • 400
{
"result": "Dashboard with the given id doesn't exist"
}
  • 500
{
"result": "Failed to update dashboard"
}
  • 200 (no dashboard access)
{
"error": true,
"dashboard_access_denied": true
}

Behavior/Processing

Behavior Modes

ModeTriggerProcessing PathResponse Shape
Full metadata updateValid inputs and owner/global-admin authorizationApplies dashboard field update and optional sharing updates, sends optional invitations, logs changes.Raw DB update result object
Sharing-restricted updatedashboards.sharing_status does not allow sharing edits for user contextUpdates base fields (for example name, theme) but skips share-list updates.Raw DB update result object
Access deniedUser fails view-access checkStops before update.Raw object with error and dashboard_access_denied

Impact on Other Data

  • Updates dashboard document fields in countly.dashboards.
  • Optional invitation flow reads countly.members to compute delta recipients.

Audit & System Logs

ActionTriggerPayload
dashboard_editedAfter successful dashboard update{ before, update } object

Database Collections

CollectionUsed forData touched by this endpoint
countly.dashboardsDashboard lookup and updateReads existing dashboard and updates metadata/sharing/refresh fields.
countly.membersAuthentication and optional invitation recipient expansionReads current member context; optionally reads recipient emails by group/all-user rules for invitation deltas.
countly.systemlogsAudit trailWrites dashboard_edited entry.

Examples

Update dashboard name and theme

/i/dashboards/update?
dashboard_id=65e1f3d2a4f41a5f6f6d7701&
name=Executive Dashboard - Q2&
share_with=none&
theme=2

Update sharing lists

/i/dashboards/update?
dashboard_id=65e1f3d2a4f41a5f6f6d7701&
name=Regional Dashboard&
share_with=selected-users&
shared_email_view=["viewer@company.com"]&
shared_email_edit=["editor@company.com"]&
shared_user_groups_view=["65dc6a52a2f7156eb2576f00"]

Enable refresh rate

/i/dashboards/update?
dashboard_id=65e1f3d2a4f41a5f6f6d7701&
name=Operational Monitor&
share_with=none&
use_refresh_rate=true&
refreshRate=10

Limitations

  • For non-global-admin users, update uses owner filter; users with shared edit access but not ownership cannot update dashboard metadata.
  • Update result object fields may vary slightly by MongoDB driver version.

Last Updated

2026-02-17