# End a Live Activity

Ends the logical activity immediately and accepts device end operations durably, including before an iOS update token arrives. HTTP 200 may have accepted: 0, failed: 0, queued: N. Late token registration flushes pending operations in sequence; queued is not provider acceptance or confirmed device removal. Suggested visible-character budgets, not guaranteed fit or API hard limits: proportional glyphs, device width and accessibility text size change fit. 0 means hidden. Expanded and Lock Screen subtitle replaces status on line 2; compact and small banners retain status. Omitted subtitle uses status. Overflow shares the two-line detail area with explicit detail. Compact percentage takes precedence over status when progress is supplied; terminal shows percentage or its prompt icon and never status. Expanded budgets (title/line 2/detail): standard 32/36/100; ring 32/30/80; hero 24/36/100; terminal 36/40/100; steps 32/36/100. Compact title/subtitle/detail are hidden; status budget is 8 without progress, except terminal 0.

HTML: https://notify.belweave.ai/docs/api/postActivitiesIdentifierEnd

Required scopes: `activities:write`

```http
POST /api/agent/activities/{identifier}/end
Authorization: Bearer ntf_your_token
```

## Operation schema

```json
{
  "summary": "End a Live Activity",
  "description": "Ends the logical activity immediately and accepts device end operations durably, including before an iOS update token arrives. HTTP 200 may have accepted: 0, failed: 0, queued: N. Late token registration flushes pending operations in sequence; queued is not provider acceptance or confirmed device removal. Suggested visible-character budgets, not guaranteed fit or API hard limits: proportional glyphs, device width and accessibility text size change fit. 0 means hidden. Expanded and Lock Screen subtitle replaces status on line 2; compact and small banners retain status. Omitted subtitle uses status. Overflow shares the two-line detail area with explicit detail. Compact percentage takes precedence over status when progress is supplied; terminal shows percentage or its prompt icon and never status. Expanded budgets (title/line 2/detail): standard 32/36/100; ring 32/30/80; hero 24/36/100; terminal 36/40/100; steps 32/36/100. Compact title/subtitle/detail are hidden; status budget is 8 without progress, except terminal 0.",
  "operationId": "postActivitiesIdentifierEnd",
  "security": [
    {
      "bearer": [
        "activities:write"
      ]
    }
  ],
  "x-notify-scopes": [
    "activities:write"
  ],
  "parameters": [
    {
      "name": "identifier",
      "in": "path",
      "schema": {
        "type": "string"
      },
      "required": true
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "schema": {
        "type": "string"
      },
      "required": false
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "subtitle": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120,
                  "description": "Optional full-word summary used instead of status on expanded Dynamic Island and Lock Screen line 2 only; compact and small banners retain status. Omit to use status; null clears it on update/end. Suggested character budgets: standard: compact 0, expanded 36; ring: compact 0, expanded 30; hero: compact 0, expanded 36; terminal: compact 0, expanded 40; steps: compact 0, expanded 36. Suggested visible-character budgets, not guaranteed fit or API hard limits: proportional glyphs, device width and accessibility text size change fit. 0 means hidden. Expanded and Lock Screen subtitle replaces status on line 2; compact and small banners retain status. Omitted subtitle uses status. Overflow shares the two-line detail area with explicit detail. Compact percentage takes precedence over status when progress is supplied; terminal shows percentage or its prompt icon and never status."
                },
                {
                  "type": "null"
                }
              ]
            },
            "status": {
              "default": "Complete",
              "type": "string",
              "minLength": 1,
              "maxLength": 60,
              "description": "Required task state; displayed on line 2 when subtitle is absent. Full status remains available to accessibility. Suggested character budgets: standard: compact 8, expanded 36; ring: compact 8, expanded 30; hero: compact 8, expanded 36; terminal: compact 0, expanded 40; steps: compact 8, expanded 36. Suggested visible-character budgets, not guaranteed fit or API hard limits: proportional glyphs, device width and accessibility text size change fit. 0 means hidden. Expanded and Lock Screen subtitle replaces status on line 2; compact and small banners retain status. Omitted subtitle uses status. Overflow shares the two-line detail area with explicit detail. Compact percentage takes precedence over status when progress is supplied; terminal shows percentage or its prompt icon and never status."
            },
            "detail": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 240,
                  "description": "Additional context in the two-line detail area, sharing space with line 2 overflow. Suggested character budgets: standard: compact 0, expanded 100; ring: compact 0, expanded 80; hero: compact 0, expanded 100; terminal: compact 0, expanded 100; steps: compact 0, expanded 100. Suggested visible-character budgets, not guaranteed fit or API hard limits: proportional glyphs, device width and accessibility text size change fit. 0 means hidden. Expanded and Lock Screen subtitle replaces status on line 2; compact and small banners retain status. Omitted subtitle uses status. Overflow shares the two-line detail area with explicit detail. Compact percentage takes precedence over status when progress is supplied; terminal shows percentage or its prompt icon and never status."
                },
                {
                  "type": "null"
                }
              ]
            },
            "progress": {
              "anyOf": [
                {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                {
                  "type": "null"
                }
              ]
            },
            "symbol": {
              "default": "success",
              "type": "string",
              "enum": [
                "terminal",
                "code",
                "build",
                "success",
                "warning"
              ]
            },
            "accentColor": {
              "type": "string",
              "pattern": "^#[0-9a-fA-F]{6}$"
            },
            "dismissAfterSeconds": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 14400
            },
            "ifSequence": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          }
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/LiveActivityMutation"
          }
        }
      }
    },
    "400": {
      "description": "Invalid request",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "401": {
      "description": "Missing, unknown, revoked, or expired token",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "403": {
      "description": "The token lacks a required scope or the account lacks permission",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "404": {
      "description": "Not found for this account",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "409": {
      "description": "Sequence conflict or activity already terminal"
    }
  }
}
```

Resolve schema references against [OpenAPI](https://notify.belweave.ai/openapi.json).
