Skip to main content

Notes - Note Delete

Endpoint

/i/notes/delete

Overview

Deletes a note by note_id after permission checks.

Authentication

  • API Key (parameter): api_key=YOUR_API_KEY
  • Auth Token (parameter): auth_token=YOUR_AUTH_TOKEN
  • Auth Token (header): countly-token: YOUR_AUTH_TOKEN

Permissions

  • Requires core delete permission for the target app (app_id) or global admin access.

Request Parameters

ParameterTypeRequiredDescription
api_keyStringYes (or use auth_token)Dashboard API key.
auth_tokenStringYes (or use api_key)Dashboard auth token.
app_idStringYes for non-global-admin usersTarget app ID used for permission validation.
note_idStringYesNote id to delete.

Response

Success Response

{
"result": "Success"
}

Response Fields

FieldTypeDescription
resultStringOperation status message.

Error Responses

Status Code: 403 Forbidden

{
"result": "Not allow to delete this note"
}

Status Code: 503 Service Unavailable

{
"result": "Error deleting note"
}

Behavior/Processing

Behavior Modes

ModeTriggerProcessing PathResponse Shape
Successful deleteUser has note-level delete permissionRemoves note by _id.Wrapped success message.
Permission deniedUser not eligible to delete the noteNo delete; returns forbidden message.Wrapped error message.

Database Collections

CollectionUsed forData touched by this endpoint
countly.notesPrimary notes storage.Reads note for permission check, removes note by id.

Examples

Example 1: Delete note

/i/notes/delete?api_key=YOUR_API_KEY&app_id=6991c75b024cb89cdc04efd2&note_id=67b2fc5a7274b47fce18c301
{
"result": "Success"
}

Limitations

  • Only eligible users can delete: note owner, app admin/global admin for public notes.
  • Use note_id for deletion. Passing only args._id is not sufficient for delete execution.

Last Updated

2026-02-17