---
updatedAt: 2026-09-15T02:10:43.000Z
agentTools:
  projectIndex: https://developer.servicem8.com/llms.txt
---

# Delete one key for an account

Deletes a single key stored by your Addon against the authenticated account.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Addon SDK API",
    "description": "API services for ServiceM8 Addons.\n\nExcept for the public manifest schema endpoint, these endpoints require App (Addon) authentication using your Addon's App ID via OAuth. They cannot be accessed using an API Key or user credentials.\n\n## Key Value Storage\n\nThe key value storage service lets your Addon store small amounts of data against jobs or the current account. Storage is private to your Addon — keys stored by one Addon are not visible to other Addons or to other API clients.\n\n* Values are stored against a job (`job_uuid`) or the authenticated account, without a job UUID\n* Account storage has a separate 64KB total limit per account per Addon, measured as the serialized size of all account keys and values\n* Account storage requires `read_addon_storage` to read and `manage_addon_storage` to set or delete keys; job permissions are not required\n* Account data persists across deployments and has no automatic expiry\n* Maximum total storage of 64KB per job (measured as the serialized size of all keys and values stored by your Addon against that job)\n* Keys are 1-128 characters using `a-z`, `0-9`, underscore or hyphen, and are case-insensitive (stored lowercase)\n* Values can be any JSON value (string, number, boolean, object or array)\n* Job storage accepts `read_jobs` or `read_addon_storage` to read keys, and `manage_jobs` or `manage_addon_storage` to set or delete keys. Use `read_addon_storage` and `manage_addon_storage` together to read and write add-on data without permission to modify normal job fields\n\n## Notifications\n\nThe Notifications service lets your Addon send in-app and push notifications to active Staff members. It requires the `create_notifications` OAuth scope and does not grant notification read or management access.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.servicem8.com"
    }
  ],
  "paths": {
    "/api_1.0/addonsdk/account/keyvalue/{key}.json": {
      "delete": {
        "operationId": "delete_account_key_value",
        "tags": [
          "Key Value Storage"
        ],
        "summary": "Delete one key for an account",
        "description": "Deletes a single key stored by your Addon against the authenticated account.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Key"
          }
        ],
        "responses": {
          "200": {
            "description": "The key was deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KeyValueDeleted"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "description": "Key not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "oauth2": [
              "manage_addon_storage"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "oauth2": {
        "type": "oauth2",
        "description": "App (Addon) OAuth authentication. Authenticate using your Addon's App ID (OAuth client credentials). API Keys are not accepted by Addon SDK endpoints.",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://go.servicem8.com/oauth/authorize",
            "tokenUrl": "https://go.servicem8.com/oauth/access_token",
            "scopes": {
              "read_jobs": "Read job data, including Addon SDK key value storage",
              "manage_jobs": "Manage job data, including Addon SDK key value storage",
              "read_addons": "View add-ons developed by this account and their deployment status",
              "manage_addons": "Create, deploy and manage add-ons developed by this account (implies read_addons)",
              "create_notifications": "Create notifications for active Staff members",
              "read_addon_storage": "Read job and account data stored by your Addon",
              "manage_addon_storage": "Create, update and delete job and account data stored by your Addon",
              "publish_diary_items": "Create immutable Add-on Job Diary items"
            }
          }
        }
      }
    },
    "parameters": {
      "Key": {
        "name": "key",
        "in": "path",
        "required": true,
        "description": "Key name. 1-128 characters using `a-z`, `0-9`, underscore or hyphen. Keys are case-insensitive and stored lowercase.",
        "schema": {
          "type": "string",
          "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,127}$"
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Bad request",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Forbidden": {
        "description": "Forbidden. The OAuth token is missing a required scope, or the request uses an API Key. Check the response message for the reason and any required scope. Key value storage requires App (Addon) OAuth authentication. Request the required scope in your add-on manifest and OAuth authorisation, then obtain a new access token.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "App (Addon) authentication required",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "errorCode",
          "message"
        ],
        "properties": {
          "errorCode": {
            "type": "integer"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "KeyValueDeleted": {
        "type": "object",
        "required": [
          "key",
          "deleted"
        ],
        "properties": {
          "key": {
            "type": "string"
          },
          "deleted": {
            "type": "boolean"
          }
        }
      }
    }
  }
}
```