---
updatedAt: 2026-09-05T11:38:42.000Z
agentTools:
  projectIndex: https://developer.servicem8.com/llms.txt
---

# Create Add-on notifications

Sends an in-app and push notification from the calling Add-on to each unique Staff recipient. All recipients are validated before any notifications are created. ServiceM8 supplies the sender, notification type, timestamp, and icon; Add-ons cannot override these fields.

Each successful request creates new notifications. Retrying a successful request may create duplicates.

# 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/notification.json": {
      "post": {
        "operationId": "createNotification",
        "tags": [
          "Notifications"
        ],
        "summary": "Create Add-on notifications",
        "description": "Sends an in-app and push notification from the calling Add-on to each unique Staff recipient. All recipients are validated before any notifications are created. ServiceM8 supplies the sender, notification type, timestamp, and icon; Add-ons cannot override these fields.\n\nEach successful request creates new notifications. Retrying a successful request may create duplicates.",
        "security": [
          {
            "oauth2": [
              "create_notifications"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NotificationCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Notifications created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationCreateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request body or recipient",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "OAuth Add-on authentication with the create_notifications scope is required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "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"
            }
          }
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "errorCode",
          "message"
        ],
        "properties": {
          "errorCode": {
            "type": "integer"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "NotificationCreateRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "recipient_staff_uuids",
          "message"
        ],
        "properties": {
          "recipient_staff_uuids": {
            "type": "array",
            "description": "Active Staff UUIDs from the current account. Duplicate UUIDs are ignored. If any recipient is invalid, no notifications are created.",
            "minItems": 1,
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "message": {
            "type": "string",
            "description": "Non-blank notification message. Supports the limited HTML subset `<b>`, `<i>`, and `<br>`. Other HTML tags are removed while preserving their text.",
            "example": "Stock is <b>ready</b> for pickup."
          },
          "title": {
            "type": "string",
            "description": "Optional plaintext notification title. HTML tags are removed.",
            "example": "Supplier update"
          },
          "destination_url": {
            "type": "string",
            "description": "Optional destination opened when the recipient selects the notification. Supported routes are `servicem8://job/{job_uuid}`, `servicem8://job/{job_uuid}/diary`, and `servicem8://inbox/{inbox_message_uuid}`. The referenced object must exist in the current account.",
            "example": "servicem8://job/550e8400-e29b-41d4-a716-446655440001/diary"
          },
          "urgency": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100,
            "example": 100
          }
        }
      },
      "NotificationCreateResponse": {
        "type": "object",
        "required": [
          "created",
          "notifications"
        ],
        "properties": {
          "created": {
            "type": "boolean",
            "example": true
          },
          "notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NotificationCreateResult"
            }
          }
        }
      },
      "NotificationCreateResult": {
        "type": "object",
        "required": [
          "uuid",
          "recipient_staff_uuid"
        ],
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid"
          },
          "recipient_staff_uuid": {
            "type": "string",
            "format": "uuid"
          }
        }
      }
    }
  }
}
```