---
updatedAt: 2026-09-15T12:55:50.000Z
agentTools:
  projectIndex: https://developer.servicem8.com/llms.txt
---

# Stream live logs for one add-on over SSE

Authenticates the developer and proxies CloudWatch Live Tail over SSE. AWS credentials remain server-side. Requires manage_addons or a full-access API key and Accept: text/event-stream. All executions of the owned add-on, including those for installing accounts, share one log group. Sessions last at most 59 minutes, with two concurrent sessions per developer Account per platform region. Reconnect gaps have no replay.

# 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/addon/{slug}/log-session.json": {
      "post": {
        "operationId": "createAddonSDKLogSession",
        "tags": [
          "Add-on Management"
        ],
        "summary": "Stream live logs for one add-on over SSE",
        "description": "Authenticates the developer and proxies CloudWatch Live Tail over SSE. AWS credentials remain server-side. Requires manage_addons or a full-access API key and Accept: text/event-stream. All executions of the owned add-on, including those for installing accounts, share one log group. Sessions last at most 59 minutes, with two concurrent sessions per developer Account per platform region. Reconnect gaps have no replay.",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "The add-on's unique slug (per-account; lowercase letters, digits, hyphens)",
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]([a-z0-9-]{0,62}[a-z0-9])?$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "SSE data records containing JSON: sessionStart (addonId), sessionUpdate (sampled, events), sessionEnd (reason: duration or upstreamClosed), or error (message, retryable). Empty sessionUpdate records are heartbeats. Reauthenticate on reconnection and verify the add-on ID has not changed.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            },
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                },
                "example": "data: {\"type\":\"sessionStart\",\"addonId\":\"12345\"}\n\ndata: {\"type\":\"sessionUpdate\",\"sampled\":false,\"events\":[]}\n\ndata: {\"type\":\"sessionEnd\",\"reason\":\"duration\"}\n\n"
              }
            }
          },
          "400": {
            "description": "Invalid slug, filter, streaming options, or unsupported deployed function",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AddonSDKError"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AddonSDKError"
                }
              }
            }
          },
          "403": {
            "description": "Requires manage_addons OAuth scope or a full-access API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AddonSDKError"
                }
              }
            }
          },
          "404": {
            "description": "Add-on not found, not owned, or no centralized log group exists yet",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AddonSDKError"
                }
              }
            }
          },
          "406": {
            "description": "SSE required; update Addon Kit and send Accept: text/event-stream",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AddonSDKError"
                }
              }
            }
          },
          "424": {
            "description": "Log streaming is temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AddonSDKError"
                }
              }
            }
          },
          "429": {
            "description": "Concurrent stream or AWS capacity limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AddonSDKError"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "manage_addons"
            ]
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "filter": {
                    "type": "string",
                    "maxLength": 1024,
                    "description": "Optional CloudWatch Logs filter pattern"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Api-Key",
        "description": "ServiceM8 account API key. All write operations require a full-access key; read-only keys receive 403. Read operations require a read-all or full-access key (granting the read_addons scope automatically)."
      },
      "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": {
      "AddonSDKError": {
        "type": "object",
        "properties": {
          "errorCode": {
            "type": "integer"
          },
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
```